mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
implement separated restore action method
This commit is contained in:
parent
55524221ff
commit
817c946270
2 changed files with 49 additions and 42 deletions
|
|
@ -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()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -94,6 +94,8 @@ namespace app::browser::main
|
|||
const int & PAGE_NUMBER
|
||||
);
|
||||
|
||||
void restore();
|
||||
|
||||
void save();
|
||||
|
||||
void shutdown();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue