mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
draft main tab features
This commit is contained in:
parent
aa4b15076b
commit
ee890b9859
11 changed files with 142 additions and 27 deletions
|
|
@ -1,5 +1,6 @@
|
|||
#include "browser.hpp"
|
||||
#include "browser/header.hpp"
|
||||
#include "browser/main.hpp"
|
||||
|
||||
using namespace app;
|
||||
|
||||
|
|
@ -7,6 +8,7 @@ Browser::Browser(
|
|||
const Glib::RefPtr<Gtk::Application> & app,
|
||||
const lib::Database & db
|
||||
) {
|
||||
// Init window
|
||||
set_title(
|
||||
TITLE
|
||||
);
|
||||
|
|
@ -16,8 +18,27 @@ Browser::Browser(
|
|||
HEIGHT
|
||||
);
|
||||
|
||||
// Init header widget
|
||||
header = new browser::Header();
|
||||
|
||||
set_titlebar(
|
||||
* new browser::Header()
|
||||
* header
|
||||
);
|
||||
|
||||
// Init main widget
|
||||
main = new browser::Main();
|
||||
|
||||
set_child(
|
||||
* main
|
||||
);
|
||||
|
||||
// Init actions
|
||||
add_action(
|
||||
"tab",
|
||||
sigc::mem_fun(
|
||||
* this,
|
||||
& Browser::mainTabAppend
|
||||
)
|
||||
);
|
||||
|
||||
add_action(
|
||||
|
|
@ -28,12 +49,23 @@ Browser::Browser(
|
|||
)
|
||||
);
|
||||
|
||||
// Init
|
||||
app->set_accel_for_action(
|
||||
"win.tab",
|
||||
"<Primary>t"
|
||||
);
|
||||
|
||||
app->set_accel_for_action(
|
||||
"win.debug",
|
||||
"<Primary>i"
|
||||
);
|
||||
}
|
||||
|
||||
void Browser::mainTabAppend()
|
||||
{
|
||||
main->tabAppend();
|
||||
};
|
||||
|
||||
void Browser::debug()
|
||||
{
|
||||
gtk_window_set_interactive_debugging(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue