logo

badwolf

Minimalist and privacy-oriented WebKitGTK+ browser
commit: 3743ac4704e0c566716167f4f69d2a35a4a7f8f7
parent: 9eeacb4efd5676fefa08100a9361d4abbe90de1f
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Mon, 11 Mar 2019 08:22:48 +0100

badwolf.c: Add tooltips to widgets

Diffstat:

Mbadwolf.c7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/badwolf.c b/badwolf.c @@ -102,6 +102,8 @@ GtkWidget *badwolf_new_tab_box(const gchar *title, struct Client *browser) { gtk_label_set_ellipsize(GTK_LABEL(label), PANGO_ELLIPSIZE_MIDDLE); gtk_label_set_single_line_mode(GTK_LABEL(label), TRUE); + gtk_widget_set_tooltip_text(label, title); + gtk_widget_show_all(label); return label; @@ -270,6 +272,9 @@ struct Client *new_browser(struct Window *window, gchar *target_url, WebKitWebVi browser->webView = WEBKIT_WEB_VIEW(webkit_web_view_new_with_related_view(related_web_view)); } + gtk_widget_set_tooltip_text(browser->close, "Close current tab"); + gtk_widget_set_tooltip_text(browser->javascript, "Toggle javascript"); + gtk_box_pack_start(GTK_BOX(browser->toolbar), GTK_WIDGET(browser->javascript), FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(browser->toolbar), GTK_WIDGET(browser->location), TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(browser->toolbar), GTK_WIDGET(browser->search), FALSE, FALSE, 0); @@ -390,6 +395,8 @@ int main(int argc, char *argv[]) gtk_window_set_role(GTK_WINDOW(window->main_window), "browser"); + gtk_widget_set_tooltip_text(window->new_tab, "Open new tab"); + gtk_notebook_set_action_widget(GTK_NOTEBOOK(window->notebook), window->new_tab, GTK_PACK_END); gtk_notebook_set_scrollable(GTK_NOTEBOOK(window->notebook), TRUE); gtk_notebook_set_tab_pos(GTK_NOTEBOOK(window->notebook), BADWOLF_TAB_POSITION);