[latexila] Menus and toolbars: don't use GtkStock (deprecated)
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [latexila] Menus and toolbars: don't use GtkStock (deprecated)
- Date: Sat, 27 Dec 2014 08:26:22 +0000 (UTC)
commit 43cf7cbaf08bacae64cf1d08a6016bda44c4218f
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sat Dec 27 09:03:07 2014 +0100
Menus and toolbars: don't use GtkStock (deprecated)
src/main_window_build_tools.vala | 8 ++++----
src/main_window_documents.vala | 8 ++++----
src/main_window_edit.vala | 20 ++++++++++----------
src/main_window_file.vala | 17 +++++++++--------
src/main_window_structure.vala | 14 +++++++-------
5 files changed, 34 insertions(+), 33 deletions(-)
---
diff --git a/src/main_window_build_tools.vala b/src/main_window_build_tools.vala
index 2da298f..aa1131f 100644
--- a/src/main_window_build_tools.vala
+++ b/src/main_window_build_tools.vala
@@ -31,22 +31,22 @@ public class MainWindowBuildTools
N_("Clean-up build files (*.aux, *.log, *.out, *.toc, etc)"),
on_clean },
- { "BuildStopExecution", Stock.STOP, N_("_Stop Execution"), null,
+ { "BuildStopExecution", "process-stop", N_("_Stop Execution"), null,
N_("Stop Execution"), on_stop_execution },
{ "BuildViewLog", "view_log", N_("View _Log"), null,
N_("View Log"), on_view_log },
- { "BuildToolsPreferences", Stock.PREFERENCES, N_("_Manage Build Tools"), null,
+ { "BuildToolsPreferences", "preferences-system", N_("_Manage Build Tools"), null,
N_("Manage Build Tools"), on_preferences }
};
private const ToggleActionEntry[] _toggle_action_entries =
{
- { "BuildShowDetails", Stock.ZOOM_IN, N_("Show _Details"), null,
+ { "BuildShowDetails", "zoom-in", N_("Show _Details"), null,
N_("Show Details"), null },
- { "BuildShowWarnings", Stock.DIALOG_WARNING, N_("Show _Warnings"), null,
+ { "BuildShowWarnings", "dialog-warning", N_("Show _Warnings"), null,
N_("Show Warnings"), null },
{ "BuildShowBadBoxes", "badbox", N_("Show _Bad Boxes"), null,
diff --git a/src/main_window_documents.vala b/src/main_window_documents.vala
index db51603..1c74492 100644
--- a/src/main_window_documents.vala
+++ b/src/main_window_documents.vala
@@ -29,16 +29,16 @@ public class MainWindowDocuments
{
{ "Documents", null, N_("_Documents") },
- { "DocumentsSaveAll", Stock.SAVE, N_("_Save All"), "<Shift><Control>L",
+ { "DocumentsSaveAll", "document-save", N_("_Save All"), "<Shift><Control>L",
N_("Save all open files"), on_save_all },
- { "DocumentsCloseAll", Stock.CLOSE, N_("_Close All"), "<Shift><Control>W",
+ { "DocumentsCloseAll", "window-close", N_("_Close All"), "<Shift><Control>W",
N_("Close all open files"), on_close_all },
- { "DocumentsPrevious", Stock.GO_BACK, N_("_Previous Document"),
+ { "DocumentsPrevious", "go-previous", N_("_Previous Document"),
"<Control><Alt>Page_Up", N_("Activate previous document"), on_previous },
- { "DocumentsNext", Stock.GO_FORWARD, N_("_Next Document"),
+ { "DocumentsNext", "go-next", N_("_Next Document"),
"<Control><Alt>Page_Down", N_("Activate next document"), on_next },
{ "DocumentsMoveToNewWindow", null, N_("_Move to New Window"), null,
diff --git a/src/main_window_edit.vala b/src/main_window_edit.vala
index 4bbdfa6..0e326df 100644
--- a/src/main_window_edit.vala
+++ b/src/main_window_edit.vala
@@ -29,29 +29,29 @@ public class MainWindowEdit
{
{ "Edit", null, N_("_Edit") },
- { "EditUndo", Stock.UNDO, null, "<Control>Z",
+ { "EditUndo", "edit-undo", N_("_Undo"), "<Control>Z",
N_("Undo the last action"), on_undo },
- { "EditRedo", Stock.REDO, null, "<Shift><Control>Z",
+ { "EditRedo", "edit-redo", N_("_Redo"), "<Shift><Control>Z",
N_("Redo the last undone action"), on_redo },
- { "EditCut", Stock.CUT, null, null,
+ { "EditCut", "edit-cut", N_("Cu_t"), "<Control>X",
N_("Cut the selection"), on_cut },
- { "EditCopy", Stock.COPY, null, null,
+ { "EditCopy", "edit-copy", N_("_Copy"), "<Control>C",
N_("Copy the selection"), on_copy },
- // No shortcut here because if the shortcut is null, Ctrl+V is used for the _all_
+ // No shortcut here because if the shortcut is null, Ctrl+V is used for _all_
// the window. In this case Ctrl+V in the search text entry would be broken (the
// text is pasted in the document instead of the entry).
// Anyway if we press Ctrl+V when the cursor is in the document, no problem.
- { "EditPaste", Stock.PASTE, null, "",
+ { "EditPaste", "edit-paste", N_("_Paste"), "",
N_("Paste the clipboard"), on_paste },
- { "EditDelete", Stock.DELETE, null, null,
+ { "EditDelete", "edit-delete", N_("_Delete"), null,
N_("Delete the selected text"), on_delete },
- { "EditSelectAll", Stock.SELECT_ALL, null, "<Control>A",
+ { "EditSelectAll", "edit-select-all", N_("Select _All"), "<Control>A",
N_("Select the entire document"), on_select_all },
{ "EditComment", null, N_("_Comment"), "<Control>M",
@@ -65,13 +65,13 @@ public class MainWindowEdit
{ "EditCompletion", null, N_("_Completion"), "<Control>space",
N_("Complete the LaTeX command"), on_completion },
- { "EditPreferences", Stock.PREFERENCES, null, null,
+ { "EditPreferences", "preferences-system", N_("_Preferences"), null,
N_("Configure the application"), on_open_preferences }
};
private const ToggleActionEntry[] _toggle_action_entries =
{
- { "EditSpellChecking", Stock.SPELL_CHECK, null, "",
+ { "EditSpellChecking", "tools-check-spelling", N_("_Spell Check"), null,
N_("Activate or disable the spell checking"), on_spell_checking }
};
diff --git a/src/main_window_file.vala b/src/main_window_file.vala
index e453413..d238f04 100644
--- a/src/main_window_file.vala
+++ b/src/main_window_file.vala
@@ -29,19 +29,19 @@ public class MainWindowFile
{
{ "File", null, N_("_File") },
- { "FileNew", Stock.NEW, null, null,
+ { "FileNew", "document-new", N_("_New"), "<Control>N",
N_("New file"), on_file_new },
{ "FileNewWindow", null, N_("New _Window"), null,
N_("Create a new window"), on_new_window },
- { "FileOpen", Stock.OPEN, null, null,
+ { "FileOpen", "document-open", N_("_Open"), "<Control>O",
N_("Open a file"), on_file_open },
- { "FileSave", Stock.SAVE, null, null,
+ { "FileSave", "document-save", N_("_Save"), "<Control>S",
N_("Save the current file"), on_file_save },
- { "FileSaveAs", Stock.SAVE_AS, null, "<Shift><Control>S",
+ { "FileSaveAs", "document-save-as", N_("Save _As"), "<Shift><Control>S",
N_("Save the current file with a different name"), on_file_save_as },
{ "FileCreateTemplate", null, N_("Create _Template From Document..."), null,
@@ -50,7 +50,7 @@ public class MainWindowFile
{ "FileDeleteTemplate", null, N_("_Delete Template..."), null,
N_("Delete personal template(s)"), on_delete_template },
- { "FileClose", Stock.CLOSE, null, null,
+ { "FileClose", "window-close", N_("_Close"), "<Control>W",
N_("Close the current file"), on_file_close }
};
@@ -80,7 +80,8 @@ public class MainWindowFile
Widget recent_menu = new RecentChooserMenu.for_manager (recent_manager);
configure_recent_chooser (recent_menu as RecentChooser);
- MenuToolButton open_button = new MenuToolButton.from_stock (Stock.OPEN);
+ MenuToolButton open_button = new MenuToolButton (null, null);
+ open_button.icon_name = "document-open";
open_button.set_menu (recent_menu);
open_button.set_tooltip_text (_("Open a file"));
open_button.set_arrow_tooltip_text (_("Open a recently used file"));
@@ -143,8 +144,8 @@ public class MainWindowFile
FileChooserDialog file_chooser = new FileChooserDialog (_("Open Files"),
_main_window,
FileChooserAction.OPEN,
- Stock.CANCEL, ResponseType.CANCEL,
- Stock.OPEN, ResponseType.ACCEPT
+ _("_Cancel"), ResponseType.CANCEL,
+ _("_Open"), ResponseType.ACCEPT
);
// Open in the directory of the current document
diff --git a/src/main_window_structure.vala b/src/main_window_structure.vala
index 9ee7bc8..5e57584 100644
--- a/src/main_window_structure.vala
+++ b/src/main_window_structure.vala
@@ -29,30 +29,30 @@ public class MainWindowStructure
{
{ "Structure", null, N_("S_tructure") },
- { "StructureCut", Stock.CUT, null, "",
+ { "StructureCut", "edit-cut", N_("Cu_t"), "",
N_("Cut the selected structure item"), on_cut },
- { "StructureCopy", Stock.COPY, null, "",
+ { "StructureCopy", "edit-copy", N_("_Copy"), "",
N_("Copy the selected structure item"), on_copy },
- { "StructureDelete", Stock.DELETE, null, "",
+ { "StructureDelete", "edit-delete", N_("_Delete"), "",
N_("Delete the selected structure item"), on_delete },
- { "StructureSelect", Stock.SELECT_ALL, N_("_Select"), "",
+ { "StructureSelect", "edit-select-all", N_("_Select"), "",
N_("Select the contents of the selected structure item"), on_select },
{ "StructureComment", null, N_("_Comment"), null,
N_("Comment the selected structure item"), on_comment },
- { "StructureShiftLeft", Stock.GO_BACK, N_("Shift _Left"), "",
+ { "StructureShiftLeft", "go-previous", N_("Shift _Left"), "",
N_("Shift the selected structure item to the left (e.g. section → chapter)"),
on_shift_left },
- { "StructureShiftRight", Stock.GO_FORWARD, N_("Shift _Right"), "",
+ { "StructureShiftRight", "go-next", N_("Shift _Right"), "",
N_("Shift the selected structure item to the right (e.g. chapter → section)"),
on_shift_right },
- { "StructureOpenFile", Stock.OPEN, N_("_Open File"), "",
+ { "StructureOpenFile", "document-open", N_("_Open File"), "",
N_("Open the file referenced by the selected structure item"),
on_open_file }
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]