implement separated restore action method

This commit is contained in:
yggverse 2024-09-09 23:23:40 +03:00
parent 55524221ff
commit 817c946270
2 changed files with 49 additions and 42 deletions

View file

@ -53,6 +53,21 @@ Tab::Tab(
[this]
{
// Restore session from DB
restore();
}
);
signal_switch_page().connect(
[this](Gtk::Widget*, guint)
{
// Refresh window elements, e.g. tab label to header bar
action__refresh->activate();
}
);
}
void Tab::restore()
{
sqlite3_stmt* statement;
const int PREPARE = ::sqlite3_prepare_v3(
@ -96,16 +111,6 @@ Tab::Tab(
statement
);
}
);
signal_switch_page().connect(
[this](Gtk::Widget*, guint)
{
// Refresh window elements, e.g. tab label to header bar
action__refresh->activate();
}
);
}
void Tab::save()
{

View file

@ -94,6 +94,8 @@ namespace app::browser::main
const int & PAGE_NUMBER
);
void restore();
void save();
void shutdown();