Browse Source

implement separated restore action method

CPP-GTK4
yggverse 2 months ago
parent
commit
817c946270
  1. 25
      src/app/browser/main/tab.cpp
  2. 2
      src/app/browser/main/tab.hpp

25
src/app/browser/main/tab.cpp

@ -53,6 +53,21 @@ Tab::Tab(
[this] [this]
{ {
// Restore session from DB // 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; sqlite3_stmt* statement;
const int PREPARE = ::sqlite3_prepare_v3( const int PREPARE = ::sqlite3_prepare_v3(
@ -96,16 +111,6 @@ Tab::Tab(
statement 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() void Tab::save()
{ {

2
src/app/browser/main/tab.hpp

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

Loading…
Cancel
Save