logo

badwolf

Minimalist and privacy-oriented WebKitGTK+ browser
commit: 27e52f39ecc17e934e642152117948321bd6abbe
parent: 689b862c6739b76e0853fb8c8b5806c9d1c90e7d
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Thu,  2 Apr 2020 05:48:49 +0200

badwolf.c: Call gtk_widget_set_name() on relevant widgets

Diffstat:

Mbadwolf.c24++++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/badwolf.c b/badwolf.c @@ -131,11 +131,15 @@ badwolf_new_tab_box(const gchar *title, struct Client *browser) { (void)browser; GtkWidget *tab_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + gtk_widget_set_name(tab_box, "browser__tabbox"); GtkWidget *close = gtk_button_new_from_icon_name("window-close-symbolic", GTK_ICON_SIZE_SMALL_TOOLBAR); + gtk_widget_set_name(close, "browser__tabbox__close"); GtkWidget *label = gtk_label_new(title); + gtk_widget_set_name(label, "browser__tabbox__label"); GtkWidget *playing = gtk_image_new_from_icon_name("audio-volume-high-symbolic", GTK_ICON_SIZE_SMALL_TOOLBAR); + gtk_widget_set_name(playing, "browser__tabbox__playing"); #ifdef BADWOLF_TAB_BOX_WIDTH gtk_widget_set_size_request(label, BADWOLF_TAB_BOX_WIDTH, -1); @@ -526,15 +530,22 @@ new_browser(struct Window *window, const gchar *target_url, WebKitWebView *relat if(browser == NULL) return NULL; - browser->window = window; - browser->box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); - browser->toolbar = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); - browser->location = gtk_entry_new(); + browser->window = window; + browser->box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); + gtk_widget_set_name(browser->box, "browser__box"); + browser->toolbar = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + gtk_widget_set_name(browser->toolbar, "browser__toolbar"); + browser->location = gtk_entry_new(); + gtk_widget_set_name(browser->location, "browser__location"); browser->javascript = gtk_check_button_new(); + gtk_widget_set_name(browser->javascript, "browser__javascript"); - browser->statusbar = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + browser->statusbar = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + gtk_widget_set_name(browser->statusbar, "browser__statusbar"); browser->statuslabel = gtk_label_new(NULL); - browser->search = gtk_search_entry_new(); + gtk_widget_set_name(browser->statuslabel, "browser__statuslabel"); + browser->search = gtk_search_entry_new(); + gtk_widget_set_name(browser->statuslabel, "browser__search"); setenv("GTK_THEME", ":light", 0); @@ -569,6 +580,7 @@ new_browser(struct Window *window, const gchar *target_url, WebKitWebView *relat "settings", settings, NULL)); + gtk_widget_set_name(GTK_WIDGET(browser->webView), "browser__webView"); gtk_widget_set_tooltip_text(browser->javascript, _("Toggle javascript"));