simple-scan-team team mailing list archive
-
simple-scan-team team
-
Mailing list archive
-
Message #00984
[Merge] lp:~moimael/simple-scan/remove-deprecated into lp:simple-scan
moimael has proposed merging lp:~moimael/simple-scan/remove-deprecated into lp:simple-scan.
Requested reviews:
Simple Scan Development Team (simple-scan-team)
For more details, see:
https://code.launchpad.net/~moimael/simple-scan/remove-deprecated/+merge/195432
Remove deprecated Gtk.Stock items and replace them with their newer counterparts.
--
https://code.launchpad.net/~moimael/simple-scan/remove-deprecated/+merge/195432
Your team Simple Scan Development Team is requested to review the proposed merge of lp:~moimael/simple-scan/remove-deprecated into lp:simple-scan.
=== modified file 'src/ui.vala'
--- src/ui.vala 2013-11-06 07:11:17 +0000
+++ src/ui.vala 2013-11-15 18:00:18 +0000
@@ -222,7 +222,7 @@
Gtk.MessageType.WARNING,
Gtk.ButtonsType.NONE,
"%s", error_title);
- dialog.add_button (Gtk.Stock.CLOSE, 0);
+ dialog.add_button ("_Close", 0);
dialog.format_secondary_text ("%s", error_text);
dialog.destroy ();
}
@@ -262,7 +262,7 @@
if (have_error)
{
type = Gtk.MessageType.ERROR;
- image_id = Gtk.Stock.DIALOG_ERROR;
+ image_id = "dialog-error";
title = error_title;
text = error_text;
show_close_button = true;
@@ -271,7 +271,7 @@
else if (device_model.iter_n_children (null) == 0)
{
type = Gtk.MessageType.WARNING;
- image_id = Gtk.Stock.DIALOG_WARNING;
+ image_id = "dialog-warning";
/* Warning displayed when no scanners are detected */
title = _("No scanners detected");
/* Hint to user on why there are no scanners detected */
@@ -284,7 +284,7 @@
}
info_bar.set_message_type (type);
- info_bar_image.set_from_stock (image_id, Gtk.IconSize.DIALOG);
+ info_bar_image.set_from_icon_name (image_id, Gtk.IconSize.DIALOG);
var message = "<big><b>%s</b></big>\n\n%s".printf (title, text);
info_bar_label.set_markup (message);
info_bar_close_button.set_visible (show_close_button);
@@ -414,8 +414,8 @@
_("Save As..."),
window,
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_dialog.set_do_overwrite_confirmation (true);
save_dialog.set_local_only (false);
@@ -576,8 +576,8 @@
/* Text in dialog warning when a document is about to be lost*/
_("If you don't save, changes will be permanently lost."));
dialog.add_button (discard_label, Gtk.ResponseType.NO);
- dialog.add_button (Gtk.Stock.CANCEL, Gtk.ResponseType.CANCEL);
- dialog.add_button (Gtk.Stock.SAVE, Gtk.ResponseType.YES);
+ dialog.add_button ("_Cancel", Gtk.ResponseType.CANCEL);
+ dialog.add_button ("_Save", Gtk.ResponseType.YES);
var response = dialog.run ();
dialog.destroy ();
@@ -1407,7 +1407,7 @@
content_area.add (hbox);
hbox.show ();
- info_bar_image = new Gtk.Image.from_stock (Gtk.Stock.DIALOG_WARNING, Gtk.IconSize.DIALOG);
+ info_bar_image = new Gtk.Image.from_icon_name ("dialog-warning", Gtk.IconSize.DIALOG);
hbox.pack_start (info_bar_image, false, true, 0);
info_bar_image.show ();
@@ -1416,7 +1416,7 @@
hbox.pack_start (info_bar_label, true, true, 0);
info_bar_label.show ();
- info_bar_close_button = (Gtk.Button) info_bar.add_button (Gtk.Stock.CLOSE, Gtk.ResponseType.CLOSE);
+ info_bar_close_button = (Gtk.Button) info_bar.add_button ("_Close", Gtk.ResponseType.CLOSE);
info_bar_change_scanner_button = (Gtk.Button) info_bar.add_button (/* Button in error infobar to open preferences dialog and change scanner */
_("Change _Scanner"), 1);
Follow ups