commit: 401c239d9be8d9162fd4459eb195bfd5b91369d1
parent bdcf4d1bda0c8c3efacfeaf8a8b75f64acd4a26a
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Fri, 14 Jun 2019 05:59:02 +0200
Sync & init the menu-label of a tab with it’s title
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/badwolf.c b/badwolf.c
@@ -369,7 +369,9 @@ webView_tab_label_change(struct Client *browser, const gchar *title)
gtk_notebook_set_tab_label(
GTK_NOTEBOOK(notebook), browser->box, badwolf_new_tab_box(title, browser));
+ gtk_notebook_set_menu_label_text(GTK_NOTEBOOK(notebook), browser->box, title);
+ // Set the window title if the title change was on the current tab
if(get_tab_position(GTK_CONTAINER(notebook), browser->box) ==
gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook)))
gtk_window_set_title(GTK_WINDOW(browser->window->main_window), title);
@@ -657,6 +659,7 @@ badwolf_new_tab(GtkNotebook *notebook, struct Client *browser)
gtk_notebook_set_tab_reorderable(notebook, browser->box, TRUE);
gtk_notebook_set_tab_label(notebook, browser->box, badwolf_new_tab_box(title, browser));
+ gtk_notebook_set_menu_label_text(GTK_NOTEBOOK(notebook), browser->box, title);
gtk_widget_queue_draw(GTK_WIDGET(notebook));