[Xfce4-commits] [xfce/xfce4-panel] 01/01: Re-introduce button images in panel dialogs

noreply at xfce.org noreply at xfce.org
Sat Oct 27 00:17:11 CEST 2018


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

o   c   h   o   s   i       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/xfce4-panel.

commit c4e5767f54ab4984aa05a965d6ebee5d0141a91a
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Sat Oct 27 00:17:00 2018 +0200

    Re-introduce button images in panel dialogs
    
    The images were lost as part of the transition away
    from GtkStock.
---
 panel/panel-item-dialog.c            | 13 +++++++++++--
 panel/panel-preferences-dialog.glade | 14 +++++++++++++-
 2 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/panel/panel-item-dialog.c b/panel/panel-item-dialog.c
index fdb349b..a38ab0f 100644
--- a/panel/panel-item-dialog.c
+++ b/panel/panel-item-dialog.c
@@ -167,6 +167,7 @@ panel_item_dialog_init (PanelItemDialog *dialog)
 {
   GtkWidget         *main_vbox;
   GtkWidget         *hbox;
+  GtkWidget         *button;
   GtkWidget         *label;
   GtkWidget         *entry;
   GtkWidget         *scroll;
@@ -203,9 +204,17 @@ panel_item_dialog_init (PanelItemDialog *dialog)
   gtk_button_set_image (GTK_BUTTON (dialog->add_button), icon);
   gtk_widget_show_all (dialog->add_button);
 
-  gtk_dialog_add_button (GTK_DIALOG (dialog), _("Help"), GTK_RESPONSE_HELP);
+  icon = gtk_image_new_from_icon_name ("help-browser", GTK_ICON_SIZE_BUTTON);
+  button = gtk_button_new_with_mnemonic (_("_Help"));
+  gtk_button_set_image (GTK_BUTTON (button), icon);
+  gtk_widget_show_all (button);
+  gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_HELP);
   gtk_dialog_add_action_widget (GTK_DIALOG (dialog), dialog->add_button, GTK_RESPONSE_OK);
-  gtk_dialog_add_button (GTK_DIALOG (dialog), _("Close"), GTK_RESPONSE_CLOSE);
+  icon = gtk_image_new_from_icon_name ("window-close", GTK_ICON_SIZE_BUTTON);
+  button = gtk_button_new_with_mnemonic (_("_Close"));
+  gtk_button_set_image (GTK_BUTTON (button), icon);
+  gtk_widget_show_all (button);
+  gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_CLOSE);
   gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CLOSE);
 
   main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BORDER * 2);
diff --git a/panel/panel-preferences-dialog.glade b/panel/panel-preferences-dialog.glade
index eba5fc4..f3784c5 100644
--- a/panel/panel-preferences-dialog.glade
+++ b/panel/panel-preferences-dialog.glade
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.0 -->
+<!-- Generated with glade 3.22.1 -->
 <interface>
   <requires lib="gtk+" version="3.20"/>
   <requires lib="libxfce4ui-2" version="4.12"/>
@@ -31,6 +31,16 @@
     <property name="can_focus">False</property>
     <property name="icon_name">package-x-generic</property>
   </object>
+  <object class="GtkImage" id="image11">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="icon_name">window-close</property>
+  </object>
+  <object class="GtkImage" id="image12">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="icon_name">help-browser</property>
+  </object>
   <object class="GtkAdjustment" id="leave-opacity">
     <property name="upper">100</property>
     <property name="value">100</property>
@@ -131,6 +141,7 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
+                <property name="image">image11</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
@@ -145,6 +156,7 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
+                <property name="image">image12</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>

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


More information about the Xfce4-commits mailing list