[gedit] Remove more deprecated stuff



commit ec08f411c9eabfd9d526808ff882cf37bc46c979
Author: Paolo Borelli <pborelli gnome org>
Date:   Wed Feb 5 16:57:43 2014 +0100

    Remove more deprecated stuff

 docs/reference/gedit-sections.txt |    2 -
 gedit/gedit-commands-file.c       |   36 ++++++++----------------
 gedit/gedit-preferences-dialog.c  |    6 +---
 gedit/gedit-utils.c               |   56 -------------------------------------
 gedit/gedit-utils.h               |    8 -----
 5 files changed, 13 insertions(+), 95 deletions(-)
---
diff --git a/docs/reference/gedit-sections.txt b/docs/reference/gedit-sections.txt
index 3cf2abe..dccd60b 100644
--- a/docs/reference/gedit-sections.txt
+++ b/docs/reference/gedit-sections.txt
@@ -464,8 +464,6 @@ GPOINTER_TO_BOOLEAN
 IS_VALID_BOOLEAN
 gedit_utils_menu_position_under_widget
 gedit_utils_menu_position_under_tree_view
-gedit_gtk_button_new_with_stock_icon
-gedit_dialog_add_button
 gedit_utils_escape_underscores
 gedit_utils_escape_slashes
 gedit_utils_str_middle_truncate
diff --git a/gedit/gedit-commands-file.c b/gedit/gedit-commands-file.c
index ee23729..78cd128 100644
--- a/gedit/gedit-commands-file.c
+++ b/gedit/gedit-commands-file.c
@@ -561,14 +561,10 @@ replace_read_only_file (GtkWindow *parent,
                                                  _("Do you want to try to replace it "
                                                    "with the one you are saving?"));
 
-       gtk_dialog_add_button (GTK_DIALOG (dialog),
-                              GTK_STOCK_CANCEL,
-                              GTK_RESPONSE_CANCEL);
-
-       gedit_dialog_add_button (GTK_DIALOG (dialog),
-                                _("_Replace"),
-                                GTK_STOCK_SAVE_AS,
-                                GTK_RESPONSE_YES);
+       gtk_dialog_add_buttons (GTK_DIALOG (dialog),
+                               _("_Cancel"), GTK_RESPONSE_CANCEL,
+                               _("_Replace"), GTK_RESPONSE_YES,
+                               NULL);
 
        gtk_dialog_set_default_response (GTK_DIALOG (dialog),
                                         GTK_RESPONSE_CANCEL);
@@ -634,14 +630,10 @@ change_compression (GtkWindow *parent,
 
        g_free (name_for_display);
 
-       gtk_dialog_add_button (GTK_DIALOG (dialog),
-                              GTK_STOCK_CANCEL,
-                              GTK_RESPONSE_CANCEL);
-
-       gedit_dialog_add_button (GTK_DIALOG (dialog),
-                                button_label,
-                                GTK_STOCK_SAVE_AS,
-                                GTK_RESPONSE_YES);
+       gtk_dialog_add_buttons (GTK_DIALOG (dialog),
+                               _("_Cancel"), GTK_RESPONSE_CANCEL,
+                               button_label, GTK_RESPONSE_YES,
+                               NULL);
 
        gtk_dialog_set_default_response (GTK_DIALOG (dialog),
                                         GTK_RESPONSE_CANCEL);
@@ -1295,14 +1287,10 @@ revert_dialog (GeditWindow   *window,
 
        gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
 
-       gtk_dialog_add_button (GTK_DIALOG (dialog),
-                              GTK_STOCK_CANCEL,
-                              GTK_RESPONSE_CANCEL);
-
-       gedit_dialog_add_button (GTK_DIALOG (dialog),
-                                _("_Revert"),
-                                GTK_STOCK_REVERT_TO_SAVED,
-                                GTK_RESPONSE_OK);
+       gtk_dialog_add_buttons (GTK_DIALOG (dialog),
+                               _("_Cancel"), GTK_RESPONSE_CANCEL,
+                               _("_Revert"), GTK_RESPONSE_OK,
+                               NULL);
 
        gtk_dialog_set_default_response (GTK_DIALOG (dialog),
                                         GTK_RESPONSE_CANCEL);
diff --git a/gedit/gedit-preferences-dialog.c b/gedit/gedit-preferences-dialog.c
index 3e4b63f..076a567 100644
--- a/gedit/gedit-preferences-dialog.c
+++ b/gedit/gedit-preferences-dialog.c
@@ -859,13 +859,9 @@ install_scheme_clicked (GtkButton              *button,
                                               GTK_WINDOW (dlg),
                                               GTK_FILE_CHOOSER_ACTION_OPEN,
                                               GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+                                              _("A_dd Scheme"), GTK_RESPONSE_ACCEPT,
                                               NULL);
 
-       gedit_dialog_add_button (GTK_DIALOG (chooser),
-                                _("A_dd Scheme"),
-                                GTK_STOCK_ADD,
-                                GTK_RESPONSE_ACCEPT);
-
        gtk_window_set_destroy_with_parent (GTK_WINDOW (chooser), TRUE);
 
        /* Filters */
diff --git a/gedit/gedit-utils.c b/gedit/gedit-utils.c
index 9af2a7e..c256844 100644
--- a/gedit/gedit-utils.c
+++ b/gedit/gedit-utils.c
@@ -159,62 +159,6 @@ gedit_utils_menu_position_under_tree_view (GtkMenu  *menu,
 }
 
 /**
- * gedit_gtk_button_new_with_stock_icon:
- * @label:
- * @stock_id:
- *
- * Returns: (transfer full):
- */
-GtkWidget *
-gedit_gtk_button_new_with_stock_icon (const gchar *label,
-                                     const gchar *stock_id)
-{
-       GtkWidget *button;
-
-       G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
-       button = gtk_button_new_with_mnemonic (label);
-       gtk_button_set_image (GTK_BUTTON (button),
-                             gtk_image_new_from_stock (stock_id,
-                                                       GTK_ICON_SIZE_BUTTON));
-       G_GNUC_END_IGNORE_DEPRECATIONS;
-
-       return button;
-}
-
-/**
- * gedit_dialog_add_button:
- * @dialog:
- * @text:
- * @stock_id:
- * @response_id:
- *
- * Returns: (transfer none):
- */
-GtkWidget *
-gedit_dialog_add_button (GtkDialog   *dialog,
-                        const gchar *text,
-                        const gchar *stock_id,
-                        gint         response_id)
-{
-       GtkWidget *button;
-
-       g_return_val_if_fail (GTK_IS_DIALOG (dialog), NULL);
-       g_return_val_if_fail (text != NULL, NULL);
-       g_return_val_if_fail (stock_id != NULL, NULL);
-
-       button = gedit_gtk_button_new_with_stock_icon (text, stock_id);
-       g_return_val_if_fail (button != NULL, NULL);
-
-       gtk_widget_set_can_default (button, TRUE);
-
-       gtk_widget_show (button);
-
-       gtk_dialog_add_action_widget (dialog, button, response_id);
-
-       return button;
-}
-
-/**
  * gedit_utils_set_atk_name_description:
  * @widget: The Gtk widget for which name/description to be set
  * @name: Atk name string
diff --git a/gedit/gedit-utils.h b/gedit/gedit-utils.h
index 6d238bf..a6ff1a4 100644
--- a/gedit/gedit-utils.h
+++ b/gedit/gedit-utils.h
@@ -61,14 +61,6 @@ void          gedit_utils_menu_position_under_tree_view
                                                         gboolean         *push_in,
                                                         gpointer          user_data);
 
-GtkWidget      *gedit_gtk_button_new_with_stock_icon   (const gchar      *label,
-                                                        const gchar      *stock_id);
-
-GtkWidget      *gedit_dialog_add_button                (GtkDialog        *dialog,
-                                                        const gchar      *text,
-                                                        const gchar      *stock_id,
-                                                        gint              response_id);
-
 gchar          *gedit_utils_escape_underscores         (const gchar      *text,
                                                         gssize            length);
 


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