[Xfce4-commits] [apps/xfce4-notifyd] 17/29: Clean up toolbar buttons

noreply at xfce.org noreply at xfce.org
Sun Jan 29 20:52:07 CET 2017


This is an automated email from the git hooks/post-receive script.

ochosi pushed a commit to branch master
in repository apps/xfce4-notifyd.

commit 1afceb5b8b1646b8a0d7284321fb0b8575615bad
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Fri Jan 6 22:59:09 2017 +0100

    Clean up toolbar buttons
---
 xfce4-notifyd-config/main.c                     | 27 ++++++++++---------------
 xfce4-notifyd-config/xfce4-notifyd-config.glade | 18 -----------------
 2 files changed, 11 insertions(+), 34 deletions(-)

diff --git a/xfce4-notifyd-config/main.c b/xfce4-notifyd-config/main.c
index 862dc71..7b0a109 100644
--- a/xfce4-notifyd-config/main.c
+++ b/xfce4-notifyd-config/main.c
@@ -568,7 +568,7 @@ xfce4_notifyd_log_refresh (GtkButton *button, gpointer user_data) {
     xfce4_notifyd_log_populate (log_listbox);
 }
 
-static void xfce_notify_clear_log_button_clicked (GtkButton *button, gpointer user_data) {
+static void xfce_notify_log_clear_button_clicked (GtkButton *button, gpointer user_data) {
     GtkWidget *log_listbox = user_data;
     GtkCallback func = listbox_remove_all;
 
@@ -618,10 +618,8 @@ xfce4_notifyd_config_setup_dialog(GtkBuilder *builder)
     GtkWidget *log_scrolled_window;
     GtkWidget *log_listbox;
     GtkToolbar *log_toolbar;
-    GtkToolItem *log_clear_toolbar_btn;
-    GtkToolItem *log_refresh_toolbar_btn;
-    GtkWidget *clear_log_button;
-    GtkWidget *refresh_log_button;
+    GtkToolItem *log_clear_button;
+    GtkToolItem *log_refresh_button;
     GtkWidget *primary_monitor;
     GtkWidget *do_fadeout;
     GtkAdjustment *adj;
@@ -756,18 +754,15 @@ xfce4_notifyd_config_setup_dialog(GtkBuilder *builder)
     gtk_widget_show_all (placeholder_label);
     xfce4_notifyd_log_populate (log_listbox);
 
-    clear_log_button = GTK_WIDGET (gtk_builder_get_object (builder, "clear_log_button"));
-    g_signal_connect (G_OBJECT (clear_log_button), "clicked",
-                      G_CALLBACK (xfce_notify_clear_log_button_clicked), log_listbox);
-    refresh_log_button = GTK_WIDGET (gtk_builder_get_object (builder, "refresh_log_button"));
-    g_signal_connect (G_OBJECT (refresh_log_button), "clicked",
+    log_clear_button = gtk_tool_button_new (NULL, _("Clear"));
+    gtk_toolbar_insert(log_toolbar, GTK_TOOL_ITEM(log_clear_button), 0);
+    g_signal_connect (G_OBJECT (log_clear_button), "clicked",
+                      G_CALLBACK (xfce_notify_log_clear_button_clicked), log_listbox);
+
+    log_refresh_button = gtk_tool_button_new (NULL, _("Refresh"));
+    gtk_toolbar_insert(log_toolbar, GTK_TOOL_ITEM(log_refresh_button), 1);
+    g_signal_connect (G_OBJECT (log_refresh_button), "clicked",
                       G_CALLBACK (xfce4_notifyd_log_refresh), log_listbox);
-    log_clear_toolbar_btn = gtk_tool_item_new ();
-    gtk_container_add (GTK_CONTAINER(log_clear_toolbar_btn), clear_log_button);
-    gtk_toolbar_insert(log_toolbar, GTK_TOOL_ITEM(log_clear_toolbar_btn), 0);
-    log_refresh_toolbar_btn = gtk_tool_item_new ();
-    gtk_container_add (GTK_CONTAINER(log_refresh_toolbar_btn), refresh_log_button);
-    gtk_toolbar_insert(log_toolbar, GTK_TOOL_ITEM(log_refresh_toolbar_btn), 1);
     gtk_widget_show_all (GTK_WIDGET(log_toolbar));
 
     help_button = GTK_WIDGET(gtk_builder_get_object(builder, "help_btn"));
diff --git a/xfce4-notifyd-config/xfce4-notifyd-config.glade b/xfce4-notifyd-config/xfce4-notifyd-config.glade
index 573bc2f..7d80953 100644
--- a/xfce4-notifyd-config/xfce4-notifyd-config.glade
+++ b/xfce4-notifyd-config/xfce4-notifyd-config.glade
@@ -17,18 +17,6 @@
     <property name="page_increment">0.10000000000000001</property>
     <property name="page_size">0.01</property>
   </object>
-  <object class="GtkImage" id="image2">
-    <property name="visible">True</property>
-    <property name="can_focus">False</property>
-    <property name="stock">gtk-clear</property>
-  </object>
-  <object class="GtkButton" id="clear_log_button">
-    <property name="label" translatable="yes">Clear log</property>
-    <property name="visible">True</property>
-    <property name="can_focus">True</property>
-    <property name="receives_default">True</property>
-    <property name="image">image2</property>
-  </object>
   <object class="GtkListStore" id="liststore1">
     <columns>
       <!-- column-name gchararray -->
@@ -765,10 +753,4 @@
       <action-widget response="1">close_btn</action-widget>
     </action-widgets>
   </object>
-  <object class="GtkButton" id="refresh_log_button">
-    <property name="label" translatable="yes">Refresh</property>
-    <property name="visible">True</property>
-    <property name="can_focus">True</property>
-    <property name="receives_default">True</property>
-  </object>
 </interface>

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list