[cheese] Avoid using GtkStock, as it is deprecated
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cheese] Avoid using GtkStock, as it is deprecated
- Date: Fri, 8 Nov 2013 20:55:22 +0000 (UTC)
commit c25390102bdd2a1383734087c09aedc7d8d02b4d
Author: David King <amigadave amigadave com>
Date: Fri Nov 8 20:51:45 2013 +0000
Avoid using GtkStock, as it is deprecated
https://bugzilla.gnome.org/show_bug.cgi?id=710217
data/cheese-prefs.ui | 10 ++++------
libcheese/cheese-avatar-chooser.c | 4 ++--
src/cheese-window.vala | 10 +++++-----
3 files changed, 11 insertions(+), 13 deletions(-)
---
diff --git a/data/cheese-prefs.ui b/data/cheese-prefs.ui
index 2f9cdd9..0f62c03 100644
--- a/data/cheese-prefs.ui
+++ b/data/cheese-prefs.ui
@@ -535,12 +535,11 @@
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="help">
- <property name="label">gtk-help</property>
+ <property name="label" translatable="yes">_Help</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
+ <property name="use-underline">True</property>
<signal name="clicked" handler="cheese_preferences_dialog_on_dialog_help" swapped="no"/>
</object>
<packing>
@@ -552,13 +551,12 @@
</child>
<child>
<object class="GtkButton" id="close">
- <property name="label">gtk-close</property>
+ <property name="label" translatable="yes">_Close</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK |
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
+ <property name="use-underline">True</property>
<signal name="clicked" handler="cheese_preferences_dialog_on_dialog_close" swapped="no"/>
</object>
<packing>
diff --git a/libcheese/cheese-avatar-chooser.c b/libcheese/cheese-avatar-chooser.c
index e0fd485..be2fcd7 100644
--- a/libcheese/cheese-avatar-chooser.c
+++ b/libcheese/cheese-avatar-chooser.c
@@ -91,9 +91,9 @@ cheese_avatar_chooser_init (CheeseAvatarChooser *chooser)
CheeseAvatarChooserPrivate *priv = chooser->priv = CHEESE_AVATAR_CHOOSER_GET_PRIVATE (chooser);
gtk_dialog_add_buttons (GTK_DIALOG (chooser),
- GTK_STOCK_CANCEL,
+ _("_Cancel"),
GTK_RESPONSE_REJECT,
- _("Select"),
+ _("_Select"),
GTK_RESPONSE_ACCEPT,
NULL);
gtk_window_set_title (GTK_WINDOW (chooser), _("Take a Photo"));
diff --git a/src/cheese-window.vala b/src/cheese-window.vala
index fd2b516..8b528a5 100644
--- a/src/cheese-window.vala
+++ b/src/cheese-window.vala
@@ -217,8 +217,8 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow
GLib.ngettext("Are you sure you want to permanently delete the file?",
"Are you sure you want to permanently delete %d files?",
files_length), files_length);
- confirmation_dialog.add_button (Gtk.Stock.CANCEL, Gtk.ResponseType.CANCEL);
- confirmation_dialog.add_button (Gtk.Stock.DELETE, Gtk.ResponseType.ACCEPT);
+ confirmation_dialog.add_button (_("_Cancel"), Gtk.ResponseType.CANCEL);
+ confirmation_dialog.add_button (_("_Delete"), Gtk.ResponseType.ACCEPT);
confirmation_dialog.format_secondary_text ("%s",
GLib.ngettext("If you delete an item, it will be permanently lost",
"If you delete the items, they will be permanently lost",
@@ -246,7 +246,7 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow
Gtk.MessageType.ERROR, Gtk.ButtonsType.NONE,
"Could not delete %s", file.get_path ());
- error_dialog.add_button (Gtk.Stock.CANCEL, Gtk.ResponseType.CANCEL);
+ error_dialog.add_button (_("_Cancel"), Gtk.ResponseType.CANCEL);
error_dialog.add_button ("Skip", DeleteResponse.SKIP);
error_dialog.add_button ("Skip all", DeleteResponse.SKIP_ALL);
@@ -321,8 +321,8 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow
save_as_dialog = new FileChooserDialog (_("Save File"),
this,
Gtk.FileChooserAction.SAVE,
- Gtk.Stock.CANCEL, Gtk.ResponseType.CANCEL,
- Gtk.Stock.SAVE, Gtk.ResponseType.ACCEPT,
+ _("_Cancel"), Gtk.ResponseType.CANCEL,
+ _("Save"), Gtk.ResponseType.ACCEPT,
null);
save_as_dialog.do_overwrite_confirmation = true;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]