mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 09:35:28 +00:00
draft global accels preset
This commit is contained in:
parent
b328c25904
commit
d206beb82b
3 changed files with 25 additions and 27 deletions
|
|
@ -5,8 +5,8 @@
|
||||||
using namespace app;
|
using namespace app;
|
||||||
|
|
||||||
Browser::Browser(
|
Browser::Browser(
|
||||||
const Glib::RefPtr<Gtk::Application> & app,
|
//const Glib::RefPtr<Gtk::Application> & app,
|
||||||
const lib::Database & db
|
//const std::shared_ptr<lib::Database> & db
|
||||||
) {
|
) {
|
||||||
// Init window
|
// Init window
|
||||||
set_title(
|
set_title(
|
||||||
|
|
@ -48,17 +48,6 @@ Browser::Browser(
|
||||||
& Browser::debug
|
& Browser::debug
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Init
|
|
||||||
app->set_accel_for_action(
|
|
||||||
"win.tab",
|
|
||||||
"<Primary>t"
|
|
||||||
);
|
|
||||||
|
|
||||||
app->set_accel_for_action(
|
|
||||||
"win.debug",
|
|
||||||
"<Primary>i"
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Browser::~Browser()
|
Browser::~Browser()
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,8 @@ namespace app
|
||||||
const int HEIGHT = 480;
|
const int HEIGHT = 480;
|
||||||
|
|
||||||
Browser(
|
Browser(
|
||||||
const Glib::RefPtr<Gtk::Application> & app,
|
//const Glib::RefPtr<Gtk::Application> & app,
|
||||||
const lib::Database & db
|
//const std::shared_ptr<lib::Database> & db
|
||||||
);
|
);
|
||||||
|
|
||||||
~Browser();
|
~Browser();
|
||||||
|
|
|
||||||
33
src/main.cpp
33
src/main.cpp
|
|
@ -6,12 +6,18 @@ int main(
|
||||||
int argc,
|
int argc,
|
||||||
char * argv[]
|
char * argv[]
|
||||||
) {
|
) {
|
||||||
|
// Init profile database
|
||||||
|
const std::shared_ptr<lib::Database> db(
|
||||||
|
new lib::Database(
|
||||||
|
"database.sqlite3"
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
// Init app
|
// Init app
|
||||||
const Glib::RefPtr<Gtk::Application> app = Gtk::Application::create(
|
const Glib::RefPtr<Gtk::Application> app = Gtk::Application::create(
|
||||||
"io.github.yggverse.Yoda"
|
"io.github.yggverse.Yoda"
|
||||||
);
|
);
|
||||||
|
|
||||||
// Init actions
|
|
||||||
app->add_action(
|
app->add_action(
|
||||||
"quit",
|
"quit",
|
||||||
sigc::mem_fun(
|
sigc::mem_fun(
|
||||||
|
|
@ -20,24 +26,27 @@ int main(
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Init accels
|
// Init accels @TODO db settings
|
||||||
|
app->set_accel_for_action(
|
||||||
|
"win.tab",
|
||||||
|
"<Primary>t"
|
||||||
|
);
|
||||||
|
|
||||||
|
app->set_accel_for_action(
|
||||||
|
"win.debug",
|
||||||
|
"<Primary>i"
|
||||||
|
);
|
||||||
|
|
||||||
app->set_accel_for_action(
|
app->set_accel_for_action(
|
||||||
"app.quit",
|
"app.quit",
|
||||||
"<Primary>q"
|
"<Primary>q"
|
||||||
);
|
);
|
||||||
|
|
||||||
// Init profile
|
|
||||||
const std::shared_ptr<lib::Database> db(
|
|
||||||
new lib::Database(
|
|
||||||
"database.sqlite3"
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
// Launch browser component
|
// Launch browser component
|
||||||
return app->make_window_and_run<app::Browser>(
|
return app->make_window_and_run<app::Browser>(
|
||||||
argc,
|
argc,
|
||||||
argv,
|
argv
|
||||||
app,
|
//app,
|
||||||
db
|
//db
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue