mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
draft children components save action delegation
This commit is contained in:
parent
7e8aaef1c5
commit
b1f2a1b893
7 changed files with 32 additions and 2 deletions
|
|
@ -129,7 +129,7 @@ int Tab::save()
|
||||||
// Save current tab session
|
// Save current tab session
|
||||||
for (int page_number = 0; page_number < get_n_pages(); page_number++)
|
for (int page_number = 0; page_number < get_n_pages(); page_number++)
|
||||||
{
|
{
|
||||||
auto tabLabel = get_tabLabel(
|
const auto TAB_LABEL = get_tabLabel(
|
||||||
page_number
|
page_number
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -151,12 +151,17 @@ int Tab::save()
|
||||||
)SQL",
|
)SQL",
|
||||||
page_number,
|
page_number,
|
||||||
page_number == get_current_page() ? 1 : 0,
|
page_number == get_current_page() ? 1 : 0,
|
||||||
tabLabel->get_text()
|
TAB_LABEL->get_text()
|
||||||
).c_str(),
|
).c_str(),
|
||||||
nullptr,
|
nullptr,
|
||||||
nullptr,
|
nullptr,
|
||||||
&error
|
&error
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Delegate save action to the page component
|
||||||
|
get_tabPage(
|
||||||
|
page_number
|
||||||
|
)->save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,13 @@ void Page::refresh()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int Page::save()
|
||||||
|
{
|
||||||
|
pageNavigation->save();
|
||||||
|
|
||||||
|
return 1; // @TODO SQL
|
||||||
|
}
|
||||||
|
|
||||||
void Page::update(
|
void Page::update(
|
||||||
const enum MIME & MIME,
|
const enum MIME & MIME,
|
||||||
const Glib::ustring & TITLE,
|
const Glib::ustring & TITLE,
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,8 @@ namespace app::browser::main::tab
|
||||||
// Actions
|
// Actions
|
||||||
void refresh();
|
void refresh();
|
||||||
|
|
||||||
|
int save();
|
||||||
|
|
||||||
void update(
|
void update(
|
||||||
const MIME & MIME,
|
const MIME & MIME,
|
||||||
const Glib::ustring & TITLE,
|
const Glib::ustring & TITLE,
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,13 @@ void Navigation::refresh(
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int Navigation::save()
|
||||||
|
{
|
||||||
|
navigationRequest->save();
|
||||||
|
|
||||||
|
return 1; // @TODO SQL
|
||||||
|
}
|
||||||
|
|
||||||
void Navigation::history_add(
|
void Navigation::history_add(
|
||||||
const Glib::ustring & REQUEST,
|
const Glib::ustring & REQUEST,
|
||||||
const bool & UPDATE_MEMORY_INDEX
|
const bool & UPDATE_MEMORY_INDEX
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,8 @@ namespace app::browser::main::tab::page
|
||||||
const double & PROGRESS_FRACTION
|
const double & PROGRESS_FRACTION
|
||||||
);
|
);
|
||||||
|
|
||||||
|
int save();
|
||||||
|
|
||||||
void history_add(
|
void history_add(
|
||||||
const Glib::ustring & REQUEST,
|
const Glib::ustring & REQUEST,
|
||||||
const bool & UPDATE_MEMORY_INDEX
|
const bool & UPDATE_MEMORY_INDEX
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,11 @@ void Request::refresh(
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int Request::save()
|
||||||
|
{
|
||||||
|
return 1; // @TODO SQL
|
||||||
|
}
|
||||||
|
|
||||||
void Request::parse()
|
void Request::parse()
|
||||||
{
|
{
|
||||||
auto match = Glib::Regex::split_simple(
|
auto match = Glib::Regex::split_simple(
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,8 @@ namespace app::browser::main::tab::page::navigation
|
||||||
const double & PROGRESS_FRACTION
|
const double & PROGRESS_FRACTION
|
||||||
);
|
);
|
||||||
|
|
||||||
|
int save();
|
||||||
|
|
||||||
// Getters
|
// Getters
|
||||||
Glib::ustring get_scheme();
|
Glib::ustring get_scheme();
|
||||||
Glib::ustring get_host();
|
Glib::ustring get_host();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue