mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-02-06 00:14:13 +00:00
update window subtitle on refresh
This commit is contained in:
parent
fb71cfa2be
commit
61613c12af
@ -102,7 +102,11 @@ Browser::Browser(
|
|||||||
browserMain->refresh();
|
browserMain->refresh();
|
||||||
|
|
||||||
browserHeader->set_title(
|
browserHeader->set_title(
|
||||||
browserMain->get_current_tab_label_text()
|
browserMain->get_current_tab_page_title()
|
||||||
|
);
|
||||||
|
|
||||||
|
browserHeader->set_subtitle(
|
||||||
|
browserMain->get_current_tab_page_subtitle()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -28,9 +28,16 @@ Main::~Main()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Getters
|
// Getters
|
||||||
Glib::ustring Main::get_current_tab_label_text()
|
Glib::ustring Main::get_current_tab_page_title()
|
||||||
{
|
{
|
||||||
return mainTab->get_label_text(
|
return mainTab->get_page_title(
|
||||||
|
mainTab->get_current_page()
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
Glib::ustring Main::get_current_tab_page_subtitle()
|
||||||
|
{
|
||||||
|
return mainTab->get_page_subtitle(
|
||||||
mainTab->get_current_page()
|
mainTab->get_current_page()
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -26,7 +26,8 @@ namespace app::browser
|
|||||||
~Main();
|
~Main();
|
||||||
|
|
||||||
// Getters
|
// Getters
|
||||||
Glib::ustring get_current_tab_label_text();
|
Glib::ustring get_current_tab_page_title();
|
||||||
|
Glib::ustring get_current_tab_page_subtitle();
|
||||||
|
|
||||||
// Actions
|
// Actions
|
||||||
void tab_append();
|
void tab_append();
|
||||||
|
@ -26,7 +26,7 @@ Tab::Tab()
|
|||||||
Tab::~Tab() = default;
|
Tab::~Tab() = default;
|
||||||
|
|
||||||
// Getters
|
// Getters
|
||||||
Glib::ustring Tab::get_label_text(
|
Glib::ustring Tab::get_page_title(
|
||||||
const int & PAGE_NUMBER
|
const int & PAGE_NUMBER
|
||||||
) {
|
) {
|
||||||
auto pageWidget = get_nth_page(
|
auto pageWidget = get_nth_page(
|
||||||
@ -35,9 +35,26 @@ Glib::ustring Tab::get_label_text(
|
|||||||
|
|
||||||
if (pageWidget != nullptr)
|
if (pageWidget != nullptr)
|
||||||
{
|
{
|
||||||
return get_tab_label_text(
|
auto tabPage = (tab::Page *) pageWidget;
|
||||||
* pageWidget
|
|
||||||
);
|
return tabPage->get_title();
|
||||||
|
}
|
||||||
|
|
||||||
|
return ""; // @TODO
|
||||||
|
};
|
||||||
|
|
||||||
|
Glib::ustring Tab::get_page_subtitle(
|
||||||
|
const int & PAGE_NUMBER
|
||||||
|
) {
|
||||||
|
auto pageWidget = get_nth_page(
|
||||||
|
PAGE_NUMBER
|
||||||
|
);
|
||||||
|
|
||||||
|
if (pageWidget != nullptr)
|
||||||
|
{
|
||||||
|
auto tabPage = (tab::Page *) pageWidget;
|
||||||
|
|
||||||
|
return tabPage->get_subtitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
return ""; // @TODO
|
return ""; // @TODO
|
||||||
|
@ -18,7 +18,11 @@ namespace app::browser::main
|
|||||||
|
|
||||||
~Tab();
|
~Tab();
|
||||||
|
|
||||||
Glib::ustring get_label_text(
|
Glib::ustring get_page_title(
|
||||||
|
const int & PAGE_NUMBER
|
||||||
|
);
|
||||||
|
|
||||||
|
Glib::ustring get_page_subtitle(
|
||||||
const int & PAGE_NUMBER
|
const int & PAGE_NUMBER
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user