[latexila] Don't add icons to buttons



commit 660251f0d33025f03421e571c2780b859b6cba56
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat Dec 27 08:43:54 2014 +0100

    Don't add icons to buttons
    
    It's no longer recommended. When replacing GtkStock by text, the icon is
    also removed.

 src/preferences_dialog.vala |   11 ++++++-----
 src/project_dialogs.vala    |   10 +---------
 src/utils.vala              |   16 ----------------
 3 files changed, 7 insertions(+), 30 deletions(-)
---
diff --git a/src/preferences_dialog.vala b/src/preferences_dialog.vala
index 227b108..a0242ac 100644
--- a/src/preferences_dialog.vala
+++ b/src/preferences_dialog.vala
@@ -34,8 +34,6 @@ public class PreferencesDialog : Dialog
 
         // reset all button
         Button reset_button = new Button.with_label (_("Reset All"));
-        Image image = new Image.from_icon_name ("edit-clear", IconSize.MENU);
-        reset_button.set_image (image);
         reset_button.set_tooltip_text (_("Reset all preferences"));
         reset_button.show_all ();
         add_action_widget (reset_button, ResponseType.APPLY);
@@ -112,10 +110,13 @@ public class PreferencesDialog : Dialog
 
     private void reset_all ()
     {
-        // build tools are not reset, since there is another button for that
+        Dialog dialog = new MessageDialog (this, DialogFlags.DESTROY_WITH_PARENT,
+            MessageType.QUESTION, ButtonsType.NONE,
+            "%s", _("Do you really want to reset all preferences?"));
+
+        dialog.add_button (Stock.CANCEL, ResponseType.CANCEL);
+        dialog.add_button (_("Reset All"), ResponseType.YES);
 
-        Dialog dialog = Utils.get_reset_all_confirm_dialog (this,
-            _("Do you really want to reset all preferences?"));
         int resp = dialog.run ();
         dialog.destroy ();
         if (resp != ResponseType.YES)
diff --git a/src/project_dialogs.vala b/src/project_dialogs.vala
index 0c9ce25..df64501 100644
--- a/src/project_dialogs.vala
+++ b/src/project_dialogs.vala
@@ -239,10 +239,7 @@ namespace ProjectDialogs
 
         Button edit_button = new Button.from_stock (Stock.PROPERTIES);
         Button delete_button = new Button.from_stock (Stock.DELETE);
-
         Button clear_all_button = new Button.with_label (_("Clear All"));
-        Image image = new Image.from_icon_name ("edit-clear", IconSize.MENU);
-        clear_all_button.set_image (image);
 
         grid.add (edit_button);
         grid.add (delete_button);
@@ -296,12 +293,7 @@ namespace ProjectDialogs
                 "%s", _("Do you really want to clear all projects?"));
 
             clear_dialog.add_button (Stock.CANCEL, ResponseType.CANCEL);
-
-            Button button = new Button.with_label (_("Clear All"));
-            Image img = new Image.from_icon_name ("edit-clear", IconSize.BUTTON);
-            button.set_image (img);
-            button.show_all ();
-            clear_dialog.add_action_widget (button, ResponseType.YES);
+            clear_dialog.add_button (_("Clear All"), ResponseType.YES);
 
             if (clear_dialog.run () == ResponseType.YES)
             {
diff --git a/src/utils.vala b/src/utils.vala
index 14a51b4..e13c9de 100644
--- a/src/utils.vala
+++ b/src/utils.vala
@@ -313,22 +313,6 @@ namespace Utils
         return null;
     }
 
-    private Dialog get_reset_all_confirm_dialog (Gtk.Window window, string msg)
-    {
-        Dialog dialog = new MessageDialog (window, DialogFlags.DESTROY_WITH_PARENT,
-            MessageType.QUESTION, ButtonsType.NONE, "%s", msg);
-
-        dialog.add_button (Stock.CANCEL, ResponseType.CANCEL);
-
-        Button button = new Button.with_label (_("Reset All"));
-        Image image = new Image.from_icon_name ("edit-clear", IconSize.BUTTON);
-        button.set_image (image);
-        button.show_all ();
-        dialog.add_action_widget (button, ResponseType.YES);
-
-        return dialog;
-    }
-
 
     /*************************************************************************/
     // Misc


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]