From 74cccb0aae98d31a39230995db11f87bf6b3ff26 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Tue, 10 Mar 2009 19:35:11 +0100 Subject: [PATCH] Add tooltips to Enable and Disable buttons --- panels/midori-addons.c | 2 ++ panels/midori-console.c | 9 ++++++--- panels/midori-extensions.c | 2 ++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/panels/midori-addons.c b/panels/midori-addons.c index 4d04b1dd..2e612313 100644 --- a/panels/midori-addons.c +++ b/panels/midori-addons.c @@ -1003,6 +1003,7 @@ midori_addons_get_toolbar (MidoriViewable* addons) /* enable button */ toolitem = gtk_tool_button_new_from_stock (GTK_STOCK_YES); gtk_tool_button_set_label (GTK_TOOL_BUTTON (toolitem), _("_Enable")); + gtk_widget_set_tooltip_text (GTK_WIDGET (toolitem), _("Enable")); g_signal_connect (toolitem, "clicked", G_CALLBACK (midori_addons_button_status_clicked_cb), addons); gtk_toolbar_insert (GTK_TOOLBAR (toolbar), toolitem, -1); @@ -1012,6 +1013,7 @@ midori_addons_get_toolbar (MidoriViewable* addons) /* disable button */ toolitem = gtk_tool_button_new_from_stock (GTK_STOCK_NO); gtk_tool_button_set_label (GTK_TOOL_BUTTON (toolitem), _("_Disable")); + gtk_widget_set_tooltip_text (GTK_WIDGET (toolitem), _("Disable")); g_signal_connect (toolitem, "clicked", G_CALLBACK (midori_addons_button_status_clicked_cb), addons); gtk_toolbar_insert (GTK_TOOLBAR (toolbar), toolitem, -1); diff --git a/panels/midori-console.c b/panels/midori-console.c index 4946caf2..59dddc2d 100644 --- a/panels/midori-console.c +++ b/panels/midori-console.c @@ -337,11 +337,14 @@ midori_console_add (MidoriConsole* console, gint line, const gchar* source_id) { + GtkTreeView* treeview; + GtkTreeModel* model; + g_return_if_fail (MIDORI_IS_CONSOLE (console)); - GtkTreeView* treeview = GTK_TREE_VIEW (console->treeview); - GtkTreeModel* treemodel = gtk_tree_view_get_model (treeview); - gtk_tree_store_insert_with_values (GTK_TREE_STORE (treemodel), + treeview = GTK_TREE_VIEW (console->treeview); + model = gtk_tree_view_get_model (treeview); + gtk_tree_store_insert_with_values (GTK_TREE_STORE (model), NULL, NULL, G_MAXINT, 0, message, 1, line, 2, source_id, -1); } diff --git a/panels/midori-extensions.c b/panels/midori-extensions.c index 45afa567..fd4703b3 100644 --- a/panels/midori-extensions.c +++ b/panels/midori-extensions.c @@ -142,6 +142,7 @@ midori_extensions_get_toolbar (MidoriViewable* extensions) /* enable button */ toolitem = gtk_tool_button_new_from_stock (GTK_STOCK_YES); gtk_tool_button_set_label (GTK_TOOL_BUTTON (toolitem), _("_Enable")); + gtk_widget_set_tooltip_text (GTK_WIDGET (toolitem), _("Enable")); g_signal_connect (toolitem, "clicked", G_CALLBACK (midori_extensions_button_status_clicked_cb), extensions); gtk_toolbar_insert (GTK_TOOLBAR (toolbar), toolitem, -1); @@ -151,6 +152,7 @@ midori_extensions_get_toolbar (MidoriViewable* extensions) /* disable button */ toolitem = gtk_tool_button_new_from_stock (GTK_STOCK_NO); gtk_tool_button_set_label (GTK_TOOL_BUTTON (toolitem), _("_Disable")); + gtk_widget_set_tooltip_text (GTK_WIDGET (toolitem), _("Disable")); g_signal_connect (toolitem, "clicked", G_CALLBACK (midori_extensions_button_status_clicked_cb), extensions); gtk_toolbar_insert (GTK_TOOLBAR (toolbar), toolitem, -1); -- 2.39.5