|
|
@ -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( |
|
|
|
app->set_accel_for_action( |
|
|
|
"app.quit", |
|
|
|
"win.tab", |
|
|
|
"<Primary>q" |
|
|
|
"<Primary>t" |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
// Init profile
|
|
|
|
app->set_accel_for_action( |
|
|
|
const std::shared_ptr<lib::Database> db( |
|
|
|
"win.debug", |
|
|
|
new lib::Database( |
|
|
|
"<Primary>i" |
|
|
|
"database.sqlite3" |
|
|
|
); |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
app->set_accel_for_action( |
|
|
|
|
|
|
|
"app.quit", |
|
|
|
|
|
|
|
"<Primary>q" |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
// 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
|
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |