commit: 5da95c27a526d62de2d600d949ac4bf1f6179a9d
parent: 50866af3a272a2f2138e72942f78df49a9290efa
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Mon, 11 May 2020 01:31:54 +0200
Use a toggle-button+icon for js
Diffstat:
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/badwolf.c b/badwolf.c
@@ -526,8 +526,10 @@ new_browser(struct Window *window, const gchar *target_url, WebKitWebView *relat
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();
+ browser->javascript = gtk_toggle_button_new();
gtk_widget_set_name(browser->javascript, "browser__javascript");
+ gtk_container_add(GTK_CONTAINER(browser->javascript),
+ gtk_image_new_from_icon_name("text-x-script", GTK_ICON_SIZE_LARGE_TOOLBAR));
browser->statusbar = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
gtk_widget_set_name(browser->statusbar, "browser__statusbar");
@@ -574,15 +576,15 @@ new_browser(struct Window *window, const gchar *target_url, WebKitWebView *relat
gtk_widget_set_tooltip_text(browser->javascript, _("Toggle javascript"));
gtk_box_pack_start(GTK_BOX(browser->toolbar),
- GTK_WIDGET(browser->javascript),
- FALSE,
- FALSE,
- BADWOLF_TOOLBAR_PADDING);
- gtk_box_pack_start(GTK_BOX(browser->toolbar),
GTK_WIDGET(browser->location),
TRUE,
TRUE,
BADWOLF_TOOLBAR_PADDING);
+ gtk_box_pack_start(GTK_BOX(browser->toolbar),
+ GTK_WIDGET(browser->javascript),
+ FALSE,
+ FALSE,
+ BADWOLF_TOOLBAR_PADDING);
gtk_box_pack_start(
GTK_BOX(browser->box), GTK_WIDGET(browser->toolbar), FALSE, FALSE, BADWOLF_BOX_PADDING);
diff --git a/badwolf.h b/badwolf.h
@@ -20,8 +20,8 @@ struct Client
GtkWidget *box;
GtkWidget *toolbar;
- GtkWidget *javascript;
GtkWidget *location;
+ GtkWidget *javascript;
WebKitWebView *webView;
struct Window *window;