[Xfce4-commits] <parole:bluesabre/gtk3> Avoid usage of stock items and functions (gtk 3.10)

Sean Davis noreply at xfce.org
Sun Aug 25 16:16:01 CEST 2013


Updating branch refs/heads/bluesabre/gtk3
         to 0a01424bb69834da0bb2c244033737ecad2deb54 (commit)
       from 1b1ca850b7991e93f107286f9f546f5a37657e80 (commit)

commit 0a01424bb69834da0bb2c244033737ecad2deb54
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Sun Aug 25 10:15:11 2013 -0400

    Avoid usage of stock items and functions (gtk 3.10)

 data/interfaces/open-location.ui   |    2 +-
 data/interfaces/parole-settings.ui |    2 +-
 data/interfaces/parole.ui          |   12 ++++++------
 src/gst/parole-gst.c               |    2 +-
 src/parole-player.c                |   27 ++++++++++++++++-----------
 src/plugins/tray/tray-provider.c   |   16 ++++++++++------
 6 files changed, 35 insertions(+), 26 deletions(-)

diff --git a/data/interfaces/open-location.ui b/data/interfaces/open-location.ui
index 69725ad..3d2b124 100644
--- a/data/interfaces/open-location.ui
+++ b/data/interfaces/open-location.ui
@@ -4,7 +4,7 @@
   <object class="GtkImage" id="image1">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
-    <property name="stock">gtk-clear</property>
+    <property name="icon_name">gtk-clear</property>
   </object>
   <object class="GtkDialog" id="open-location">
     <property name="can_focus">False</property>
diff --git a/data/interfaces/parole-settings.ui b/data/interfaces/parole-settings.ui
index dfcf9d6..48d14b7 100644
--- a/data/interfaces/parole-settings.ui
+++ b/data/interfaces/parole-settings.ui
@@ -5,7 +5,7 @@
   <object class="GtkImage" id="image2">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
-    <property name="stock">gtk-revert-to-saved</property>
+    <property name="icon_name">document-revert</property>
   </object>
   <object class="GtkListStore" id="liststore1">
     <columns>
diff --git a/data/interfaces/parole.ui b/data/interfaces/parole.ui
index b16a5b8..b548ef4 100644
--- a/data/interfaces/parole.ui
+++ b/data/interfaces/parole.ui
@@ -6,17 +6,17 @@
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
   </object>
-  <object class="GtkImage" id="image1">
+  <object class="GtkImage" id="image10">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
     <property name="pixel_size">16</property>
-    <property name="icon_name">media-optical-symbolic</property>
+    <property name="icon_name">face-sick-symbolic</property>
   </object>
-  <object class="GtkImage" id="image10">
+  <object class="GtkImage" id="image1">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
     <property name="pixel_size">16</property>
-    <property name="icon_name">face-sick-symbolic</property>
+    <property name="icon_name">media-optical-symbolic</property>
   </object>
   <object class="GtkImage" id="image11">
     <property name="visible">True</property>
@@ -318,8 +318,8 @@
                         <property name="use_underline">True</property>
                         <property name="image">image3</property>
                         <property name="use_stock">False</property>
-                        <accelerator key="plus" signal="activate"/>
                         <accelerator key="equal" signal="activate"/>
+                        <accelerator key="plus" signal="activate"/>
                         <signal name="activate" handler="parole_player_volume_up" swapped="no"/>
                       </object>
                     </child>
@@ -729,7 +729,7 @@
                           <object class="GtkImage" id="logo">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="stock">gtk-missing-image</property>
+                            <property name="icon_name">image-missing</property>
                           </object>
                           <packing>
                             <property name="expand">True</property>
diff --git a/src/gst/parole-gst.c b/src/gst/parole-gst.c
index 2552f8b..b1818d0 100644
--- a/src/gst/parole-gst.c
+++ b/src/gst/parole-gst.c
@@ -1494,7 +1494,7 @@ parole_gst_missing_codec_dialog(ParoleGst *gst, GstMessage *msg)
                             NULL );
 #elif defined(__FreeBSD__)
     gtk_dialog_add_button(  GTK_DIALOG(dialog), 
-                            "gtk-ok",
+                            _("OK"),
                             GTK_RESPONSE_ACCEPT);
 #endif
     
diff --git a/src/parole-player.c b/src/parole-player.c
index 7b806e2..be7ec69 100644
--- a/src/parole-player.c
+++ b/src/parole-player.c
@@ -543,8 +543,8 @@ parole_player_open_iso_image (ParolePlayer *player, ParoleIsoImage image)
     
     chooser = gtk_file_chooser_dialog_new (_("Open ISO image"), GTK_WINDOW (player->priv->window),
                                            GTK_FILE_CHOOSER_ACTION_OPEN,
-                                           "gtk-cancel", GTK_RESPONSE_CANCEL,
-                                           "document-open", GTK_RESPONSE_OK,
+                                           _("Cancel"), GTK_RESPONSE_CANCEL,
+                                           _("Open"), GTK_RESPONSE_OK,
                                            NULL);
                 
     gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (chooser), FALSE);
@@ -943,7 +943,7 @@ parole_player_select_custom_subtitle (GtkMenuItem *widget, gpointer data)
     ParolePlayer  *player;
     ParoleFile    *file;
     
-    GtkWidget     *chooser;
+    GtkWidget     *chooser, *button, *img;
     GtkFileFilter *filter, *all_files;
     gint           response;
     
@@ -956,9 +956,14 @@ parole_player_select_custom_subtitle (GtkMenuItem *widget, gpointer data)
     /* Build the FileChooser dialog for subtitle selection. */
     chooser = gtk_file_chooser_dialog_new (_("Select Subtitle File"), NULL,
                                            GTK_FILE_CHOOSER_ACTION_OPEN,
-                                           "gtk-cancel", GTK_RESPONSE_CANCEL,
-                                           "document-open", GTK_RESPONSE_OK,
+                                           NULL,
                                            NULL);
+    button = gtk_dialog_add_button(GTK_DIALOG(chooser), _("Cancel"), GTK_RESPONSE_CANCEL);
+    img = gtk_image_new_from_icon_name("gtk-cancel", GTK_ICON_SIZE_BUTTON);
+    gtk_button_set_image(GTK_BUTTON(button), img);
+    button = gtk_dialog_add_button(GTK_DIALOG(chooser), _("Open"), GTK_RESPONSE_OK);
+    img = gtk_image_new_from_icon_name("document-open", GTK_ICON_SIZE_BUTTON);
+    gtk_button_set_image(GTK_BUTTON(button), img);
                 
     gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (chooser), FALSE);
     gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (chooser), FALSE);
@@ -1151,7 +1156,7 @@ parole_player_recent_menu_clear_activated_cb (GtkWidget *widget, ParolePlayer *p
     gtk_message_dialog_format_secondary_text ( GTK_MESSAGE_DIALOG(dlg), 
     _("Are you sure you wish to clear your recent items history?  This cannot be undone."));
     
-    gtk_dialog_add_button (GTK_DIALOG(dlg), "gtk-cancel", 0);
+    gtk_dialog_add_button (GTK_DIALOG(dlg), _("Cancel"), 0);
     clear_button = gtk_dialog_add_button(GTK_DIALOG(dlg),
                                          "edit-clear",
                                          1);
@@ -1357,10 +1362,10 @@ parole_player_playing (ParolePlayer *player, const ParoleStream *stream)
     gboolean seekable;
     gboolean live;
     
-    pix = parole_icon_load ("player_play", 16);
+    pix = parole_icon_load ("media-playback-start-symbolic", 16);
     
     if ( !pix )
-        pix = parole_icon_load ("gtk-media-play-ltr", 16);
+        pix = parole_icon_load ("media-playback-start", 16);
     
     parole_media_list_set_row_pixbuf (player->priv->list, player->priv->row, pix);
     
@@ -1861,10 +1866,10 @@ parole_player_dvd_chapter_change_cb (ParoleGst *gst, gint chapter_count, ParoleP
     
     player->priv->row = parole_media_list_get_row_n (player->priv->list, chapter_count-1);
 
-    pix = parole_icon_load ("player_play", 16);
+    pix = parole_icon_load ("media-playback-start-symbolic", 16);
     
     if ( !pix )
-        pix = parole_icon_load ("gtk-media-play-ltr", 16);
+        pix = parole_icon_load ("media-playback-start", 16);
     
     parole_media_list_set_row_pixbuf (player->priv->list, player->priv->row, pix);
     parole_media_list_select_row (player->priv->list, player->priv->row);
@@ -3217,7 +3222,7 @@ parole_player_init (ParolePlayer *player)
     gtk_container_add(GTK_CONTAINER(content_area), subtitle_box);
     
     infobar_close = gtk_button_new_with_label(_("Close"));
-    close_icon = gtk_image_new_from_icon_name("dialog-close", GTK_ICON_SIZE_BUTTON);
+    close_icon = gtk_image_new_from_icon_name("gtk-close", GTK_ICON_SIZE_BUTTON);
     gtk_button_set_image(GTK_BUTTON(infobar_close), close_icon);
     g_signal_connect (infobar_close, "clicked",
               G_CALLBACK (on_infobar_close_clicked), player);
diff --git a/src/plugins/tray/tray-provider.c b/src/plugins/tray/tray-provider.c
index 59319d3..09a9632 100644
--- a/src/plugins/tray/tray-provider.c
+++ b/src/plugins/tray/tray-provider.c
@@ -278,7 +278,7 @@ configure_plugin (TrayProvider *tray, GtkWidget *widget)
     dialog = gtk_dialog_new_with_buttons   (_("Tray icon plugin"), 
                                             GTK_WINDOW (widget),
                                             GTK_DIALOG_DESTROY_WITH_PARENT,
-                                            "gtk-close",
+                                            _("Close"),
                                             GTK_RESPONSE_CANCEL,
                                             NULL);
 
@@ -312,7 +312,7 @@ action_on_hide_confirmed_cb (GtkWidget *widget, gpointer data)
 static gboolean
 delete_event_cb (GtkWidget *widget, GdkEvent *ev, TrayProvider *tray)
 {
-    GtkWidget *dialog, *check, *content_area;
+    GtkWidget *dialog, *check, *content_area, *button;
     GtkWidget *minimize, *img;
     gboolean confirmed, ret_val = TRUE, minimize_to_tray;
     
@@ -342,13 +342,17 @@ delete_event_cb (GtkWidget *widget, GdkEvent *ev, TrayProvider *tray)
     img = gtk_image_new_from_icon_name ("go-down", GTK_ICON_SIZE_BUTTON);
     gtk_button_set_image (GTK_BUTTON (minimize), img);
     
-    gtk_dialog_add_button(  GTK_DIALOG(dialog),
-                            "gtk-cancel",
-                            GTK_RESPONSE_CANCEL );
+    button = gtk_dialog_add_button( GTK_DIALOG(dialog),
+                                    _("Cancel"),
+                                    GTK_RESPONSE_CANCEL );
+    img = gtk_image_new_from_icon_name ("gtk-cancel", GTK_ICON_SIZE_BUTTON);
+    gtk_button_set_image(GTK_BUTTON(button), img);
     
     gtk_dialog_add_button(  GTK_DIALOG(dialog),
-                            "gtk-quit",
+                            _("Quit"),
                             GTK_RESPONSE_CLOSE );
+    img = gtk_image_new_from_icon_name ("gtk-quit", GTK_ICON_SIZE_BUTTON);
+    gtk_button_set_image(GTK_BUTTON(button), img);
                                     
     gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
     


More information about the Xfce4-commits mailing list