Commit 05a4bae2 authored by Wolfgang Steitz's avatar Wolfgang Steitz Committed by Jim Nelson

Further work removing GtkStock and deprecations: Bug #719188

parent ad0ad8f3
......@@ -188,7 +188,6 @@ ICON_FILES = \
crop-pivot-reticle.png \
crop.svg \
drag_nub.png \
enhance.png \
five-star-filter.svg \
five-stars.svg \
flag-page.png \
......@@ -217,6 +216,7 @@ ICON_FILES = \
shotwell.ico \
shotwell-street.jpg \
shotwell.svg \
shotwell-auto-enhance.png \
sprocket.png \
straighten.svg \
three-star-filter-plus.svg \
......
......@@ -10,8 +10,8 @@ public class FullscreenWindow : PageWindow {
public const int TOOLBAR_CHECK_DISMISSAL_MSEC = 500;
private Gtk.Window toolbar_window = new Gtk.Window(Gtk.WindowType.POPUP);
private Gtk.ToolButton close_button = new Gtk.ToolButton.from_stock(Gtk.Stock.LEAVE_FULLSCREEN);
private Gtk.ToggleToolButton pin_button = new Gtk.ToggleToolButton.from_stock(Resources.PIN_TOOLBAR);
private Gtk.ToolButton close_button = new Gtk.ToolButton(null, null);
private Gtk.ToggleToolButton pin_button = new Gtk.ToggleToolButton();
private bool is_toolbar_shown = false;
private bool waiting_for_invoke = false;
private time_t left_toolbar_time = 0;
......@@ -49,11 +49,13 @@ public class FullscreenWindow : PageWindow {
// restore pin state
is_toolbar_dismissal_enabled = Config.Facade.get_instance().get_pin_toolbar_state();
pin_button.set_icon_name("pin-toolbar");
pin_button.set_label(_("Pin Toolbar"));
pin_button.set_tooltip_text(_("Pin the toolbar open"));
pin_button.set_active(!is_toolbar_dismissal_enabled);
pin_button.clicked.connect(update_toolbar_dismissal);
close_button.set_icon_name("view-restore");
close_button.set_tooltip_text(_("Leave fullscreen"));
close_button.clicked.connect(on_close);
......@@ -129,10 +131,10 @@ public class FullscreenWindow : PageWindow {
private Gtk.ActionEntry[] create_actions() {
Gtk.ActionEntry[] actions = new Gtk.ActionEntry[0];
Gtk.ActionEntry leave_fullscreen = { "LeaveFullscreen", Gtk.Stock.LEAVE_FULLSCREEN,
Gtk.ActionEntry leave_fullscreen = { "LeaveFullscreen", Resources.LEAVE_FULLSCREEN_LABEL,
TRANSLATABLE, "F11", TRANSLATABLE, on_close };
leave_fullscreen.label = _("Leave _Fullscreen");
leave_fullscreen.tooltip = _("Leave fullscreen");
leave_fullscreen.label = Resources.LEAVE_FULLSCREEN_LABEL;
leave_fullscreen.tooltip = Resources.LEAVE_FULLSCREEN_LABEL;
actions += leave_fullscreen;
return actions;
......@@ -503,19 +505,19 @@ public abstract class AppWindow : PageWindow {
private Gtk.ActionEntry[] create_common_actions() {
Gtk.ActionEntry[] actions = new Gtk.ActionEntry[0];
Gtk.ActionEntry quit = { "CommonQuit", Gtk.Stock.QUIT, TRANSLATABLE, "<Ctrl>Q",
Gtk.ActionEntry quit = { "CommonQuit", Resources.QUIT_LABEL, TRANSLATABLE, "<Ctrl>Q",
TRANSLATABLE, on_quit };
quit.label = _("_Quit");
quit.label = Resources.QUIT_LABEL;
actions += quit;
Gtk.ActionEntry about = { "CommonAbout", Gtk.Stock.ABOUT, TRANSLATABLE, null,
Gtk.ActionEntry about = { "CommonAbout", Resources.ABOUT_LABEL, TRANSLATABLE, null,
TRANSLATABLE, on_about };
about.label = _("_About");
about.label = Resources.ABOUT_LABEL;
actions += about;
Gtk.ActionEntry fullscreen = { "CommonFullscreen", Gtk.Stock.FULLSCREEN,
Gtk.ActionEntry fullscreen = { "CommonFullscreen", Resources.FULLSCREEN_LABEL,
TRANSLATABLE, "F11", TRANSLATABLE, on_fullscreen };
fullscreen.label = _("Fulls_creen");
fullscreen.label = Resources.FULLSCREEN_LABEL;
actions += fullscreen;
Gtk.ActionEntry help_contents = { "CommonHelpContents", Resources.HELP_LABEL,
......@@ -533,22 +535,22 @@ public abstract class AppWindow : PageWindow {
help_report_problem.label = _("_Report a Problem...");
actions += help_report_problem;
Gtk.ActionEntry undo = { "CommonUndo", Gtk.Stock.UNDO, TRANSLATABLE, "<Ctrl>Z",
Gtk.ActionEntry undo = { "CommonUndo", Resources.UNDO_MENU, TRANSLATABLE, "<Ctrl>Z",
TRANSLATABLE, on_undo };
undo.label = Resources.UNDO_MENU;
actions += undo;
Gtk.ActionEntry redo = { "CommonRedo", Gtk.Stock.REDO, TRANSLATABLE, "<Ctrl><Shift>Z",
Gtk.ActionEntry redo = { "CommonRedo", Resources.REDO_MENU, TRANSLATABLE, "<Ctrl><Shift>Z",
TRANSLATABLE, on_redo };
redo.label = Resources.REDO_MENU;
actions += redo;
Gtk.ActionEntry jump_to_file = { "CommonJumpToFile", Gtk.Stock.JUMP_TO, TRANSLATABLE,
Gtk.ActionEntry jump_to_file = { "CommonJumpToFile", Resources.JUMP_TO_FILE_MENU, TRANSLATABLE,
"<Ctrl><Shift>M", TRANSLATABLE, on_jump_to_file };
jump_to_file.label = Resources.JUMP_TO_FILE_MENU;
actions += jump_to_file;
Gtk.ActionEntry select_all = { "CommonSelectAll", Gtk.Stock.SELECT_ALL, TRANSLATABLE,
Gtk.ActionEntry select_all = { "CommonSelectAll", Resources.SELECT_ALL_MENU, TRANSLATABLE,
"<Ctrl>A", TRANSLATABLE, on_select_all };
select_all.label = Resources.SELECT_ALL_MENU;
actions += select_all;
......
......@@ -142,7 +142,7 @@ public abstract class CollectionPage : MediaPage {
protected override Gtk.ActionEntry[] init_collect_action_entries() {
Gtk.ActionEntry[] actions = base.init_collect_action_entries();
Gtk.ActionEntry print = { "Print", Gtk.Stock.PRINT, TRANSLATABLE, "<Ctrl>P",
Gtk.ActionEntry print = { "Print", Resources.PRINT_LABEL, TRANSLATABLE, "<Ctrl>P",
TRANSLATABLE, on_print };
print.label = Resources.PRINT_MENU;
actions += print;
......@@ -193,7 +193,7 @@ public abstract class CollectionPage : MediaPage {
paste_adjustments.tooltip = Resources.PASTE_ADJUSTMENTS_TOOLTIP;
actions += paste_adjustments;
Gtk.ActionEntry revert = { "Revert", Gtk.Stock.REVERT_TO_SAVED, TRANSLATABLE, null,
Gtk.ActionEntry revert = { "Revert", null, TRANSLATABLE, null,
TRANSLATABLE, on_revert };
revert.label = Resources.REVERT_MENU;
actions += revert;
......
......@@ -59,7 +59,7 @@ public File? choose_file(string current_file_basename) {
Gtk.FileChooserDialog chooser = new Gtk.FileChooserDialog(file_chooser_title,
AppWindow.get_instance(), Gtk.FileChooserAction.SAVE, Resources.CANCEL_LABEL,
Gtk.ResponseType.CANCEL, Gtk.Stock.SAVE, Gtk.ResponseType.ACCEPT, null);
Gtk.ResponseType.CANCEL, Resources.SAVE_LABEL, Gtk.ResponseType.ACCEPT, null);
chooser.set_do_overwrite_confirmation(true);
chooser.set_current_folder(current_export_dir.get_path());
chooser.set_current_name(current_file_basename);
......@@ -890,7 +890,7 @@ public bool report_manifest(ImportManifest manifest, bool show_dest_id,
internal void save_import_results(Gtk.Window? chooser_dialog_parent, string results_log) {
Gtk.FileChooserDialog chooser_dialog = new Gtk.FileChooserDialog(
ImportUI.SAVE_RESULTS_FILE_CHOOSER_TITLE, chooser_dialog_parent, Gtk.FileChooserAction.SAVE,
Resources.CANCEL_LABEL, Gtk.ResponseType.CANCEL, Gtk.Stock.SAVE, Gtk.ResponseType.ACCEPT, null);
Resources.CANCEL_LABEL, Gtk.ResponseType.CANCEL, Resources.SAVE_AS_LABEL, Gtk.ResponseType.ACCEPT, null);
chooser_dialog.set_do_overwrite_confirmation(true);
chooser_dialog.set_current_folder(Environment.get_home_dir());
chooser_dialog.set_current_name("Shotwell Import Log.txt");
......@@ -1218,7 +1218,7 @@ public class TextEntryDialog : Gtk.Dialog {
action_area_box.set_layout(Gtk.ButtonBoxStyle.END);
button1 = (Gtk.Button) add_button(Resources.CANCEL_LABEL, Gtk.ResponseType.CANCEL);
button2 = (Gtk.Button) add_button(Gtk.Stock.SAVE, Gtk.ResponseType.OK);
button2 = (Gtk.Button) add_button(Resources.SAVE_LABEL, Gtk.ResponseType.OK);
set_default_response(Gtk.ResponseType.OK);
if (completion_list != null) { // Textfield with autocompletion
......@@ -1290,7 +1290,7 @@ public class MultiTextEntryDialog : Gtk.Dialog {
action_area_box.set_layout(Gtk.ButtonBoxStyle.END);
button1 = (Gtk.Button) add_button(Resources.CANCEL_LABEL, Gtk.ResponseType.CANCEL);
button2 = (Gtk.Button) add_button(Gtk.Stock.SAVE, Gtk.ResponseType.OK);
button2 = (Gtk.Button) add_button(Resources.SAVE_LABEL, Gtk.ResponseType.OK);
set_default_response(Gtk.ResponseType.OK);
set_has_resize_grip(true);
......@@ -2566,13 +2566,13 @@ public class PreferencesDialog {
if (is_string_empty(example) && !is_string_empty(dir_pattern_entry.text)) {
// Invalid pattern.
dir_pattern_example.set_text(_("Invalid pattern"));
dir_pattern_entry.set_icon_from_stock(Gtk.EntryIconPosition.SECONDARY, Gtk.Stock.DIALOG_ERROR);
dir_pattern_entry.set_icon_from_icon_name(Gtk.EntryIconPosition.SECONDARY, "dialog-error");
dir_pattern_entry.set_icon_activatable(Gtk.EntryIconPosition.SECONDARY, false);
set_allow_closing(false);
} else {
// Valid pattern.
dir_pattern_example.set_text(example);
dir_pattern_entry.set_icon_from_stock(Gtk.EntryIconPosition.SECONDARY, null);
dir_pattern_entry.set_icon_from_icon_name(Gtk.EntryIconPosition.SECONDARY, null);
set_allow_closing(true);
}
}
......
......@@ -285,7 +285,7 @@ public abstract class MediaPage : CheckerboardPage {
protected override Gtk.ActionEntry[] init_collect_action_entries() {
Gtk.ActionEntry[] actions = base.init_collect_action_entries();
Gtk.ActionEntry export = { "Export", Gtk.Stock.SAVE_AS, TRANSLATABLE, "<Ctrl><Shift>E",
Gtk.ActionEntry export = { "Export", Resources.SAVE_AS_LABEL, TRANSLATABLE, "<Ctrl><Shift>E",
TRANSLATABLE, on_export };
export.label = Resources.EXPORT_MENU;
actions += export;
......@@ -312,7 +312,7 @@ public abstract class MediaPage : CheckerboardPage {
move_to_trash.label = Resources.MOVE_TO_TRASH_MENU;
actions += move_to_trash;
Gtk.ActionEntry new_event = { "NewEvent", Gtk.Stock.NEW, TRANSLATABLE, "<Ctrl>N",
Gtk.ActionEntry new_event = { "NewEvent", Resources.NEW_LABEL, TRANSLATABLE, "<Ctrl>N",
TRANSLATABLE, on_new_event };
new_event.label = Resources.NEW_EVENT_MENU;
actions += new_event;
......@@ -417,7 +417,7 @@ public abstract class MediaPage : CheckerboardPage {
filter_photos.label = Resources.FILTER_PHOTOS_MENU;
actions += filter_photos;
Gtk.ActionEntry play = { "PlayVideo", Gtk.Stock.MEDIA_PLAY, TRANSLATABLE, "<Ctrl>Y",
Gtk.ActionEntry play = { "PlayVideo", Resources.PLAY_LABEL, TRANSLATABLE, "<Ctrl>Y",
TRANSLATABLE, on_play_video };
play.label = _("_Play Video");
play.tooltip = _("Open the selected videos in the system video player");
......
......@@ -398,8 +398,8 @@ public abstract class EditingHostPage : SinglePhotoPage {
private Gtk.ToggleToolButton straighten_button = null;
private Gtk.ToolButton enhance_button = null;
private Gtk.Scale zoom_slider = null;
private Gtk.ToolButton prev_button = new Gtk.ToolButton.from_stock(Gtk.Stock.GO_BACK);
private Gtk.ToolButton next_button = new Gtk.ToolButton.from_stock(Gtk.Stock.GO_FORWARD);
private Gtk.ToolButton prev_button = new Gtk.ToolButton(null, Resources.PREVIOUS_LABEL);
private Gtk.ToolButton next_button = new Gtk.ToolButton(null, Resources.NEXT_LABEL);
private EditingTools.EditingTool current_tool = null;
private Gtk.ToggleToolButton current_editing_toggle = null;
private Gdk.Pixbuf cancel_editing_pixbuf = null;
......@@ -467,7 +467,8 @@ public abstract class EditingHostPage : SinglePhotoPage {
toolbar.insert(redeye_button, -1);
// adjust tool
adjust_button = new Gtk.ToggleToolButton.from_stock(Resources.ADJUST);
adjust_button = new Gtk.ToggleToolButton();
adjust_button.set_icon_name(Resources.ADJUST);
adjust_button.set_label(Resources.ADJUST_LABEL);
adjust_button.set_tooltip_text(Resources.ADJUST_TOOLTIP);
adjust_button.toggled.connect(on_adjust_toggled);
......@@ -475,8 +476,8 @@ public abstract class EditingHostPage : SinglePhotoPage {
toolbar.insert(adjust_button, -1);
// enhance tool
enhance_button = new Gtk.ToolButton.from_stock(Resources.ENHANCE);
enhance_button.set_label(Resources.ENHANCE_LABEL);
enhance_button = new Gtk.ToolButton(null, Resources.ENHANCE_LABEL);
enhance_button.set_icon_name(Resources.ENHANCE);
enhance_button.set_tooltip_text(Resources.ENHANCE_TOOLTIP);
enhance_button.clicked.connect(on_enhance);
enhance_button.is_important = true;
......@@ -530,11 +531,13 @@ public abstract class EditingHostPage : SinglePhotoPage {
// previous button
prev_button.set_tooltip_text(_("Previous photo"));
prev_button.set_icon_name("go-previous");
prev_button.clicked.connect(on_previous_photo);
toolbar.insert(prev_button, -1);
// next button
next_button.set_tooltip_text(_("Next photo"));
next_button.set_icon_name("go-next");
next_button.clicked.connect(on_next_photo);
toolbar.insert(next_button, -1);
}
......@@ -1157,7 +1160,7 @@ public abstract class EditingHostPage : SinglePhotoPage {
}
if (pixbuf == null) {
// Create empty pixbuf.
pixbuf = AppWindow.get_instance().render_icon(Gtk.Stock.MISSING_IMAGE,
pixbuf = AppWindow.get_instance().render_icon("image-missing",
Gtk.IconSize.DIALOG, null);
get_canvas_scaling().perform_on_pixbuf(pixbuf, Gdk.InterpType.NEAREST, true);
......@@ -2381,12 +2384,12 @@ public class LibraryPhotoPage : EditingHostPage {
protected override Gtk.ActionEntry[] init_collect_action_entries() {
Gtk.ActionEntry[] actions = base.init_collect_action_entries();
Gtk.ActionEntry export = { "Export", Gtk.Stock.SAVE_AS, TRANSLATABLE, "<Ctrl><Shift>E",
Gtk.ActionEntry export = { "Export", Resources.SAVE_AS_LABEL, TRANSLATABLE, "<Ctrl><Shift>E",
TRANSLATABLE, on_export };
export.label = Resources.EXPORT_MENU;
actions += export;
Gtk.ActionEntry print = { "Print", Gtk.Stock.PRINT, TRANSLATABLE, "<Ctrl>P",
Gtk.ActionEntry print = { "Print", Resources.PRINT_LABEL, TRANSLATABLE, "<Ctrl>P",
TRANSLATABLE, on_print };
print.label = Resources.PRINT_MENU;
actions += print;
......@@ -2473,7 +2476,7 @@ public class LibraryPhotoPage : EditingHostPage {
crop.tooltip = Resources.CROP_TOOLTIP;
actions += crop;
Gtk.ActionEntry straighten = { "Straighten", Gtk.Stock.REFRESH, TRANSLATABLE, "<Ctrl>A",
Gtk.ActionEntry straighten = { "Straighten", Resources.REFRESH_LABEL, TRANSLATABLE, "<Ctrl>A",
TRANSLATABLE, toggle_straighten };
straighten.label = Resources.STRAIGHTEN_MENU;
straighten.tooltip = Resources.STRAIGHTEN_TOOLTIP;
......@@ -2491,7 +2494,7 @@ public class LibraryPhotoPage : EditingHostPage {
adjust.tooltip = Resources.ADJUST_TOOLTIP;
actions += adjust;
Gtk.ActionEntry revert = { "Revert", Gtk.Stock.REVERT_TO_SAVED, TRANSLATABLE,
Gtk.ActionEntry revert = { "Revert", Resources.REVERT_TO_SAVED_LABEL, TRANSLATABLE,
null, TRANSLATABLE, on_revert };
revert.label = Resources.REVERT_MENU;
actions += revert;
......
......@@ -73,7 +73,7 @@ along with Shotwell; if not, write to the Free Software Foundation, Inc.,
public const string CROP = "shotwell-crop";
public const string STRAIGHTEN = "shotwell-straighten";
public const string REDEYE = "shotwell-redeye";
public const string ADJUST = "shotwell-adjust";
public const string ADJUST = "image-adjust";
public const string PIN_TOOLBAR = "shotwell-pin-toolbar";
public const string MAKE_PRIMARY = "shotwell-make-primary";
public const string IMPORT = "shotwell-import";
......@@ -157,17 +157,31 @@ along with Shotwell; if not, write to the Free Software Foundation, Inc.,
public const string VFLIP_MENU = _("Flip Verti_cally");
public const string VFLIP_LABEL = _("Flip Vertically");
public const string ABOUT_LABEL = _("_About");
public const string APPLY_LABEL = _("_Apply");
public const string CANCEL_LABEL = _("_Cancel");
public const string DELETE_LABEL = _("_Delete");
public const string EDIT_LABEL = _("_Edit");
public const string FORWARD_LABEL = _("_Forward");
public const string FULLSCREEN_LABEL = _("Fulls_creen");
public const string HELP_LABEL = _("_Help");
public const string LEAVE_FULLSCREEN_LABEL = _("Leave _Fullscreen");
public const string NEW_LABEL = _("_New");
public const string NEXT_LABEL = _("_Next");
public const string OK_LABEL = _("_OK");
public const string PLAY_LABEL = _("_Play");
public const string PREFERENCES_LABEL = _("_Preferences");
public const string PREVIOUS_LABEL = _("_Previous");
public const string PRINT_LABEL = _("_Print");
public const string QUIT_LABEL = _("_Quit");
public const string REFRESH_LABEL = _("_Refresh");
public const string REMOVE_LABEL = _("_Remove");
public const string REVERT_TO_SAVED_LABEL = _("_Revert");
public const string SAVE_LABEL = _("_Save");
public const string SAVE_AS_LABEL = _("Save _As");
public const string SORT_ASCENDING_LABEL = _("Sort _Ascending");
public const string SORT_DESCENDING_LABEL = _("Sort _Descending");
public const string STOP_LABEL = _("_Stop");
public const string UNDELETE_LABEL = _("_Undelete");
public const string ZOOM_100_LABEL = _("_Normal Size");
public const string ZOOM_FIT_LABEL = _("Best _Fit");
......@@ -704,13 +718,11 @@ along with Shotwell; if not, write to the Free Software Foundation, Inc.,
File icons_dir = AppDirs.get_resources_dir().get_child("icons");
add_stock_icon(icons_dir.get_child("crop.svg"), CROP);
add_stock_icon(icons_dir.get_child("redeye.png"), REDEYE);
add_stock_icon(icons_dir.get_child("image-adjust.svg"), ADJUST);
add_stock_icon(icons_dir.get_child("pin-toolbar.svg"), PIN_TOOLBAR);
add_stock_icon(icons_dir.get_child("make-primary.svg"), MAKE_PRIMARY);
add_stock_icon(icons_dir.get_child("import.svg"), IMPORT);
add_stock_icon(icons_dir.get_child("straighten.svg"), STRAIGHTEN);
add_stock_icon(icons_dir.get_child("import-all.png"), IMPORT_ALL);
add_stock_icon(icons_dir.get_child("enhance.png"), ENHANCE);
add_stock_icon(icons_dir.get_child("shotwell-auto-enhance.png"), ENHANCE);
add_stock_icon(icons_dir.get_child("crop-pivot-reticle.png"), CROP_PIVOT_RETICLE);
add_stock_icon(icons_dir.get_child("merge.svg"), MERGE);
add_stock_icon_from_themed_icon(new GLib.ThemedIcon(ICON_FLAGGED_PAGE), ICON_FLAGGED_PAGE);
......
......@@ -714,7 +714,7 @@ public class SearchFilterToolbar : Gtk.Revealer {
// the searchbar.
// The close menu. Populated below in the constructor.
private Gtk.Menu close_menu = new Gtk.Menu();
private Gtk.ImageMenuItem close_item = new Gtk.ImageMenuItem.from_stock(Gtk.Stock.CLOSE, null);
private Gtk.MenuItem close_item = new Gtk.MenuItem();
// Text search box.
protected class SearchBox : Gtk.ToolItem {
......@@ -942,8 +942,8 @@ public class SearchFilterToolbar : Gtk.Revealer {
// Prepare the close menu for use, but don't
// display it yet; we'll connect it to secondary
// click later on.
((Gtk.MenuItem) close_item).show();
close_item.always_show_image = true;
close_item.set_label(_("Close"));
close_item.show();
close_item.activate.connect(on_context_menu_close_chosen);
close_menu.append(close_item);
......
......@@ -157,28 +157,29 @@ class SlideshowPage : SinglePhotoPage {
Gtk.Toolbar toolbar = get_toolbar();
// add toolbar buttons
Gtk.ToolButton previous_button = new Gtk.ToolButton.from_stock(Gtk.Stock.GO_BACK);
previous_button.set_label(_("Back"));
Gtk.ToolButton previous_button = new Gtk.ToolButton(null, _("Back"));
previous_button.set_icon_name("go-previous");
previous_button.set_tooltip_text(_("Go to the previous photo"));
previous_button.clicked.connect(on_previous_photo);
toolbar.insert(previous_button, -1);
play_pause_button = new Gtk.ToolButton.from_stock(Gtk.Stock.MEDIA_PAUSE);
play_pause_button.set_label(_("Pause"));
play_pause_button = new Gtk.ToolButton(null, _("Pause"));
play_pause_button.set_icon_name("media-playback-pause");
play_pause_button.set_tooltip_text(_("Pause the slideshow"));
play_pause_button.clicked.connect(on_play_pause);
toolbar.insert(play_pause_button, -1);
Gtk.ToolButton next_button = new Gtk.ToolButton.from_stock(Gtk.Stock.GO_FORWARD);
next_button.set_label(_("Next"));
Gtk.ToolButton next_button = new Gtk.ToolButton(null, _("Next"));
next_button.set_icon_name("go-next");
next_button.set_tooltip_text(_("Go to the next photo"));
next_button.clicked.connect(on_next_photo);
toolbar.insert(next_button, -1);
settings_button = new Gtk.ToolButton.from_stock(Gtk.Stock.PREFERENCES);
settings_button = new Gtk.ToolButton(null, null);
settings_button.set_icon_name("preferences-system");
settings_button.set_label(_("Settings"));
settings_button.set_tooltip_text(_("Change slideshow settings"));
settings_button.clicked.connect(on_change_settings);
......@@ -265,11 +266,11 @@ class SlideshowPage : SinglePhotoPage {
private void on_play_pause() {
if (playing) {
play_pause_button.set_stock_id(Gtk.Stock.MEDIA_PLAY);
play_pause_button.set_icon_name("media-playback-start");
play_pause_button.set_label(_("Play"));
play_pause_button.set_tooltip_text(_("Continue the slideshow"));
} else {
play_pause_button.set_stock_id(Gtk.Stock.MEDIA_PAUSE);
play_pause_button.set_icon_name("media-playback-pause");
play_pause_button.set_label(_("Pause"));
play_pause_button.set_tooltip_text(_("Pause the slideshow"));
}
......
......@@ -289,7 +289,7 @@ class ImportPreview : MediaSourceItem {
bool using_placeholder = (pixbuf == null);
if (pixbuf == null) {
if (placeholder_preview == null) {
placeholder_preview = AppWindow.get_instance().render_icon(Gtk.Stock.MISSING_IMAGE,
placeholder_preview = AppWindow.get_instance().render_icon("image-missing",
Gtk.IconSize.DIALOG, null);
placeholder_preview = scale_pixbuf(placeholder_preview, MAX_SCALE,
Gdk.InterpType.BILINEAR, true);
......@@ -810,13 +810,15 @@ public class ImportPage : CheckerboardPage {
toolbar.insert(new Gtk.SeparatorToolItem(), -1);
// Import selected
Gtk.ToolButton import_selected_button = new Gtk.ToolButton.from_stock(Resources.IMPORT);
Gtk.ToolButton import_selected_button = new Gtk.ToolButton(null, null);
import_selected_button.set_icon_name(Resources.IMPORT);
import_selected_button.set_related_action(get_action("ImportSelected"));
toolbar.insert(import_selected_button, -1);
// Import all
Gtk.ToolButton import_all_button = new Gtk.ToolButton.from_stock(Resources.IMPORT_ALL);
Gtk.ToolButton import_all_button = new Gtk.ToolButton(null, null);
import_all_button.set_icon_name(Resources.IMPORT_ALL);
import_all_button.set_related_action(get_action("ImportAll"));
toolbar.insert(import_all_button, -1);
......
......@@ -46,13 +46,13 @@ public class DirectPhotoPage : EditingHostPage {
file.label = _("_File");
actions += file;
Gtk.ActionEntry save = { "Save", Gtk.Stock.SAVE, TRANSLATABLE, "<Ctrl>S", TRANSLATABLE,
Gtk.ActionEntry save = { "Save", Resources.SAVE_LABEL, TRANSLATABLE, "<Ctrl>S", TRANSLATABLE,
on_save };
save.label = _("_Save");
save.tooltip = _("Save photo");
actions += save;
Gtk.ActionEntry save_as = { "SaveAs", Gtk.Stock.SAVE_AS, TRANSLATABLE,
Gtk.ActionEntry save_as = { "SaveAs", Resources.SAVE_AS_LABEL, TRANSLATABLE,
"<Ctrl><Shift>S", TRANSLATABLE, on_save_as };
save_as.label = _("Save _As...");
save_as.tooltip = _("Save photo with a different name");
......@@ -63,7 +63,7 @@ public class DirectPhotoPage : EditingHostPage {
send_to.label = Resources.SEND_TO_MENU;
actions += send_to;
Gtk.ActionEntry print = { "Print", Gtk.Stock.PRINT, TRANSLATABLE, "<Ctrl>P",
Gtk.ActionEntry print = { "Print", Resources.PRINT_LABEL, TRANSLATABLE, "<Ctrl>P",
TRANSLATABLE, on_print };
print.label = Resources.PRINT_MENU;
print.tooltip = _("Print the photo to a printer connected to your computer");
......@@ -127,7 +127,7 @@ public class DirectPhotoPage : EditingHostPage {
crop.tooltip = Resources.CROP_TOOLTIP;
actions += crop;
Gtk.ActionEntry straighten = { "Straighten", Gtk.Stock.REFRESH, TRANSLATABLE, "<Ctrl>A",
Gtk.ActionEntry straighten = { "Straighten", Resources.REFRESH_LABEL, TRANSLATABLE, "<Ctrl>A",
TRANSLATABLE, toggle_straighten };
straighten.label = Resources.STRAIGHTEN_MENU;
straighten.tooltip = Resources.STRAIGHTEN_TOOLTIP;
......@@ -145,7 +145,7 @@ public class DirectPhotoPage : EditingHostPage {
adjust.tooltip = Resources.ADJUST_TOOLTIP;
actions += adjust;
Gtk.ActionEntry revert = { "Revert", Gtk.Stock.REVERT_TO_SAVED, TRANSLATABLE,
Gtk.ActionEntry revert = { "Revert", Resources.REVERT_LABEL, TRANSLATABLE,
null, TRANSLATABLE, on_revert };
revert.label = Resources.REVERT_MENU;
actions += revert;
......
......@@ -1890,9 +1890,9 @@ public class RedeyeTool : EditingTool {
private Gtk.Label slider_label = new Gtk.Label.with_mnemonic(_("Size:"));
public Gtk.Button apply_button =
new Gtk.Button.from_stock(Gtk.Stock.APPLY);
new Gtk.Button.with_mnemonic(Resources.APPLY_LABEL);
public Gtk.Button close_button =
new Gtk.Button.from_stock(Gtk.Stock.CLOSE);
new Gtk.Button.with_mnemonic(Resources.CANCEL_LABEL);
public Gtk.Scale slider = new Gtk.Scale.with_range(Gtk.Orientation.HORIZONTAL,
RedeyeInstance.MIN_RADIUS, RedeyeInstance.MAX_RADIUS, 1.0);
......
......@@ -28,7 +28,8 @@ public class ImportQueuePage : SinglePhotoPage {
Gtk.Toolbar toolbar = get_toolbar();
// Stop button
Gtk.ToolButton stop_button = new Gtk.ToolButton.from_stock(Gtk.Stock.STOP);
Gtk.ToolButton stop_button = new Gtk.ToolButton(null, null);
stop_button.set_icon_name("stop");
stop_button.set_related_action(get_action("Stop"));
toolbar.insert(stop_button, -1);
......@@ -61,7 +62,7 @@ public class ImportQueuePage : SinglePhotoPage {
protected override Gtk.ActionEntry[] init_collect_action_entries() {
Gtk.ActionEntry[] actions = base.init_collect_action_entries();
Gtk.ActionEntry stop = { "Stop", Gtk.Stock.STOP, TRANSLATABLE, null, TRANSLATABLE,
Gtk.ActionEntry stop = { "Stop", Resources.STOP_LABEL, TRANSLATABLE, null, TRANSLATABLE,
on_stop };
stop.label = _("_Stop Import");
stop.tooltip = _("Stop importing photos");
......
......@@ -313,12 +313,12 @@ public class LibraryWindow : AppWindow {
sort.label = _("Sort _Events");
actions += sort;
Gtk.ActionEntry preferences = { "CommonPreferences", Gtk.Stock.PREFERENCES, TRANSLATABLE,
Gtk.ActionEntry preferences = { "CommonPreferences", Resources.PREFERENCES_LABEL, TRANSLATABLE,
null, TRANSLATABLE, on_preferences };
preferences.label = Resources.PREFERENCES_MENU;
actions += preferences;
Gtk.ActionEntry empty = { "CommonEmptyTrash", Gtk.Stock.CLEAR, TRANSLATABLE, null, null,
Gtk.ActionEntry empty = { "CommonEmptyTrash", null, TRANSLATABLE, null, null,
on_empty_trash };
empty.label = _("Empty T_rash");
empty.tooltip = _("Delete all photos in the trash");
......@@ -329,8 +329,7 @@ public class LibraryWindow : AppWindow {
jump_to_event.label = _("View Eve_nt for Photo");
actions += jump_to_event;
Gtk.ActionEntry find = { "CommonFind", Gtk.Stock.FIND, TRANSLATABLE, null, null,
on_find };
Gtk.ActionEntry find = { "CommonFind", null, TRANSLATABLE, null, null, on_find };
find.label = _("_Find");
find.tooltip = _("Find photos and videos by search criteria");
actions += find;
......@@ -398,7 +397,7 @@ public class LibraryWindow : AppWindow {
extended_props.tooltip = _("Display extended information for the selection");
actions += extended_props;
Gtk.ToggleActionEntry searchbar = { "CommonDisplaySearchbar", Gtk.Stock.FIND, TRANSLATABLE,
Gtk.ToggleActionEntry searchbar = { "CommonDisplaySearchbar", "edit-find", TRANSLATABLE,
"F8", TRANSLATABLE, on_display_searchbar, is_search_toolbar_visible };
searchbar.label = _("_Search Bar");
searchbar.tooltip = _("Display the search bar");
......
......@@ -28,13 +28,13 @@
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="cancel_button">
<property name="label">gtk-cancel</property>
<property name="label">_Cancel</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
......@@ -44,14 +44,14 @@
</child>
<child>
<object class="GtkButton" id="ok_button">
<property name="label">gtk-ok</property>
<property name="label">_OK</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
......
......@@ -67,13 +67,13 @@
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="cancel_button">
<property name="label">gtk-cancel</property>
<property name="label">_Cancel</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
......@@ -83,7 +83,7 @@
</child>
<child>
<object class="GtkButton" id="ok_button">
<property name="label">gtk-ok</property>
<property name="label">_OK</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
......@@ -92,7 +92,7 @@
<property name="receives_default">True</property>
<property name="has_tooltip">True</property>
<property name="tooltip_text" translatable="yes">Generate desktop background slideshow</property>
<property name="use_stock">True</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
......
......@@ -648,11 +648,11 @@
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="about-plugin-button">
<property name="label">gtk-about</property>
<property name="label">_About</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment