[meld] Fix action capitalisation to follow HIG (bgo#698445)
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] Fix action capitalisation to follow HIG (bgo#698445)
- Date: Sat, 20 Apr 2013 21:12:46 +0000 (UTC)
commit ba902ef89e2cf4e742eeb94dbd03b551e273aac4
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sun Apr 21 06:48:56 2013 +1000
Fix action capitalisation to follow HIG (bgo#698445)
This change also involved a *lot* of PEP8, thus the size of the diff.
meld/dirdiff.py | 2 +-
meld/filediff.py | 76 +++++++++++++++++++++++--------
meld/meldwindow.py | 129 +++++++++++++++++++++++++++++++++++++++--------------
3 files changed, 153 insertions(+), 54 deletions(-)
---
diff --git a/meld/dirdiff.py b/meld/dirdiff.py
index c6a5b69..8755b5d 100644
--- a/meld/dirdiff.py
+++ b/meld/dirdiff.py
@@ -274,7 +274,7 @@ class DirDiff(melddoc.MeldDoc, gnomeglade.Component):
)
toggleactions = (
- ("IgnoreCase", gtk.STOCK_ITALIC, _("Ignore filename case"), None, _("Consider
differently-cased filenames that are otherwise-identical to be the same"),
self.on_button_ignore_case_toggled, False),
+ ("IgnoreCase", gtk.STOCK_ITALIC, _("Ignore Filename Case"), None, _("Consider
differently-cased filenames that are otherwise-identical to be the same"),
self.on_button_ignore_case_toggled, False),
("ShowSame", gtk.STOCK_APPLY, _("Same"), None, _("Show identical"),
self.on_filter_state_toggled, False),
("ShowNew", gtk.STOCK_ADD, _("New"), None, _("Show new"),
self.on_filter_state_toggled, False),
("ShowModified", gtk.STOCK_REMOVE, _("Modified"), None, _("Show modified"),
self.on_filter_state_toggled, False),
diff --git a/meld/filediff.py b/meld/filediff.py
index ce07a73..ae9c560 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -218,34 +218,72 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
buf.create_tag("inline")
actions = (
- ("MakePatch", None, _("Format as patch..."), None, _("Create a patch using differences between
files"), self.make_patch),
- ("SplitAdd", None, _("Add synchronization point"), None,
+ ("MakePatch", None, _("Format as Patch..."), None,
+ _("Create a patch using differences between files"),
+ self.make_patch),
+ ("SplitAdd", None, _("Add Synchronization Point"), None,
_("Add a manual point for synchronization of changes between "
"files"),
self.add_sync_point),
- ("SplitClear", None, _("Clear synchronization points"), None,
+ ("SplitClear", None, _("Clear Synchronization Points"), None,
_("Clear manual change sychronization points"),
self.clear_sync_points),
- ("PrevConflict", None, _("Previous conflict"), "<Ctrl>I", _("Go to the previous conflict"),
lambda x: self.on_next_conflict(gtk.gdk.SCROLL_UP)),
- ("NextConflict", None, _("Next conflict"), "<Ctrl>K", _("Go to the next conflict"), lambda x:
self.on_next_conflict(gtk.gdk.SCROLL_DOWN)),
- ("PushLeft", gtk.STOCK_GO_BACK, _("Push to left"), "<Alt>Left", _("Push current change to
the left"), lambda x: self.push_change(-1)),
- ("PushRight", gtk.STOCK_GO_FORWARD, _("Push to right"), "<Alt>Right", _("Push current change
to the right"), lambda x: self.push_change(1)),
+ ("PrevConflict", None, _("Previous Conflict"), "<Ctrl>I",
+ _("Go to the previous conflict"),
+ lambda x: self.on_next_conflict(gtk.gdk.SCROLL_UP)),
+ ("NextConflict", None, _("Next Conflict"), "<Ctrl>K",
+ _("Go to the next conflict"),
+ lambda x: self.on_next_conflict(gtk.gdk.SCROLL_DOWN)),
+ ("PushLeft", gtk.STOCK_GO_BACK, _("Push to Left"), "<Alt>Left",
+ _("Push current change to the left"),
+ lambda x: self.push_change(-1)),
+ ("PushRight", gtk.STOCK_GO_FORWARD,
+ _("Push to Right"), "<Alt>Right",
+ _("Push current change to the right"),
+ lambda x: self.push_change(1)),
# FIXME: using LAST and FIRST is terrible and unreliable icon abuse
- ("PullLeft", gtk.STOCK_GOTO_LAST, _("Pull from left"), "<Alt><Shift>Right", _("Pull change
from the left"), lambda x: self.pull_change(-1)),
- ("PullRight", gtk.STOCK_GOTO_FIRST, _("Pull from right"), "<Alt><Shift>Left", _("Pull change
from the right"), lambda x: self.pull_change(1)),
- ("CopyLeftUp", None, _("Copy above left"), "<Alt>bracketleft", _("Copy change above the left
chunk"), lambda x: self.copy_change(-1, -1)),
- ("CopyLeftDown", None, _("Copy below left"), "<Alt>semicolon", _("Copy change below the left
chunk"), lambda x: self.copy_change(-1, 1)),
- ("CopyRightUp", None, _("Copy above right"), "<Alt>bracketright", _("Copy change above the right
chunk"), lambda x: self.copy_change(1, -1)),
- ("CopyRightDown", None, _("Copy below right"), "<Alt>quoteright", _("Copy change below the right
chunk"), lambda x: self.copy_change(1, 1)),
- ("Delete", gtk.STOCK_DELETE, _("Delete"), "<Alt>Delete", _("Delete change"),
self.delete_change),
- ("MergeFromLeft", None, _("Merge all changes from left"), None, _("Merge all non-conflicting
changes from the left"), lambda x: self.pull_all_non_conflicting_changes(-1)),
- ("MergeFromRight", None, _("Merge all changes from right"), None, _("Merge all non-conflicting
changes from the right"), lambda x: self.pull_all_non_conflicting_changes(1)),
- ("MergeAll", None, _("Merge all non-conflicting"), None, _("Merge all non-conflicting
changes from left and right panes"), lambda x: self.merge_all_non_conflicting_changes()),
- ("CycleDocuments", None, _("Cycle through documents"), "<control>Escape", _("Move keyboard focus
to the next document in this comparison"), self.action_cycle_documents),
+ ("PullLeft", gtk.STOCK_GOTO_LAST,
+ _("Pull from Left"), "<Alt><Shift>Right",
+ _("Pull change from the left"),
+ lambda x: self.pull_change(-1)),
+ ("PullRight", gtk.STOCK_GOTO_FIRST,
+ _("Pull from Right"), "<Alt><Shift>Left",
+ _("Pull change from the right"),
+ lambda x: self.pull_change(1)),
+ ("CopyLeftUp", None, _("Copy Above Left"), "<Alt>bracketleft",
+ _("Copy change above the left chunk"),
+ lambda x: self.copy_change(-1, -1)),
+ ("CopyLeftDown", None, _("Copy Below Left"), "<Alt>semicolon",
+ _("Copy change below the left chunk"),
+ lambda x: self.copy_change(-1, 1)),
+ ("CopyRightUp", None, _("Copy Above Right"), "<Alt>bracketright",
+ _("Copy change above the right chunk"),
+ lambda x: self.copy_change(1, -1)),
+ ("CopyRightDown", None, _("Copy Below Right"), "<Alt>quoteright",
+ _("Copy change below the right chunk"),
+ lambda x: self.copy_change(1, 1)),
+ ("Delete", gtk.STOCK_DELETE, _("Delete"), "<Alt>Delete",
+ _("Delete change"),
+ self.delete_change),
+ ("MergeFromLeft", None, _("Merge All Changes from Left"), None,
+ _("Merge all non-conflicting changes from the left"),
+ lambda x: self.pull_all_non_conflicting_changes(-1)),
+ ("MergeFromRight", None, _("Merge All Changes from Right"), None,
+ _("Merge all non-conflicting changes from the right"),
+ lambda x: self.pull_all_non_conflicting_changes(1)),
+ ("MergeAll", None, _("Merge All Non-conflicting"), None,
+ _("Merge all non-conflicting changes from left and right "
+ "panes"),
+ lambda x: self.merge_all_non_conflicting_changes()),
+ ("CycleDocuments", None,
+ _("Cycle Through Documents"), "<control>Escape",
+ _("Move keyboard focus to the next document in this "
+ "comparison"),
+ self.action_cycle_documents),
)
toggle_actions = (
- ("LockScrolling", None, _("Lock scrolling"), None,
+ ("LockScrolling", None, _("Lock Scrolling"), None,
_("Lock scrolling of all panes"),
self.on_action_lock_scrolling_toggled, True),
)
diff --git a/meld/meldwindow.py b/meld/meldwindow.py
index 99b4398..e6deed9 100644
--- a/meld/meldwindow.py
+++ b/meld/meldwindow.py
@@ -59,52 +59,113 @@ class MeldWindow(gnomeglade.Component):
actions = (
("FileMenu", None, _("_File")),
- ("New", gtk.STOCK_NEW, _("_New comparison"), "<control>N", _("Start a new comparison"),
self.on_menu_file_new_activate),
- ("Save", gtk.STOCK_SAVE, None, None, _("Save the current file"),
self.on_menu_save_activate),
- ("SaveAs", gtk.STOCK_SAVE_AS, None, "<control><shift>S", "Save the current file with a
different name", self.on_menu_save_as_activate),
- ("Close", gtk.STOCK_CLOSE, None, None, _("Close the current file"),
self.on_menu_close_activate),
- ("Quit", gtk.STOCK_QUIT, None, None, _("Quit the program"), self.on_menu_quit_activate),
+ ("New", gtk.STOCK_NEW, _("_New Comparison"), "<control>N",
+ _("Start a new comparison"),
+ self.on_menu_file_new_activate),
+ ("Save", gtk.STOCK_SAVE, None, None,
+ _("Save the current file"),
+ self.on_menu_save_activate),
+ ("SaveAs", gtk.STOCK_SAVE_AS, None, "<control><shift>S",
+ _("Save the current file with a different name"),
+ self.on_menu_save_as_activate),
+ ("Close", gtk.STOCK_CLOSE, None, None,
+ _("Close the current file"),
+ self.on_menu_close_activate),
+ ("Quit", gtk.STOCK_QUIT, None, None,
+ _("Quit the program"),
+ self.on_menu_quit_activate),
("EditMenu", None, _("_Edit")),
- ("Undo", gtk.STOCK_UNDO, None, "<control>Z", _("Undo the last action"),
self.on_menu_undo_activate),
- ("Redo", gtk.STOCK_REDO, None, "<control><shift>Z", _("Redo the last undone action"),
self.on_menu_redo_activate),
- ("Cut", gtk.STOCK_CUT, None, None, _("Cut the selection"), self.on_menu_cut_activate),
- ("Copy", gtk.STOCK_COPY, None, None, _("Copy the selection"), self.on_menu_copy_activate),
- ("Paste", gtk.STOCK_PASTE, None, None, _("Paste the clipboard"),
self.on_menu_paste_activate),
- ("Find", gtk.STOCK_FIND, None, None, _("Search for text"), self.on_menu_find_activate),
- ("FindNext", None, _("Find Ne_xt"), "<control>G", _("Search forwards for the same
text"), self.on_menu_find_next_activate),
- ("FindPrevious", None, _("Find _Previous"), "<control><shift>G", _("Search backwards
for the same text"), self.on_menu_find_previous_activate),
- ("Replace", gtk.STOCK_FIND_AND_REPLACE, _("_Replace"), "<control>H", _("Find and replace text"),
self.on_menu_replace_activate),
- ("Preferences", gtk.STOCK_PREFERENCES, _("Prefere_nces"), None, _("Configure the application"),
self.on_menu_preferences_activate),
+ ("Undo", gtk.STOCK_UNDO, None, "<control>Z",
+ _("Undo the last action"),
+ self.on_menu_undo_activate),
+ ("Redo", gtk.STOCK_REDO, None, "<control><shift>Z",
+ _("Redo the last undone action"),
+ self.on_menu_redo_activate),
+ ("Cut", gtk.STOCK_CUT, None, None, _("Cut the selection"),
+ self.on_menu_cut_activate),
+ ("Copy", gtk.STOCK_COPY, None, None, _("Copy the selection"),
+ self.on_menu_copy_activate),
+ ("Paste", gtk.STOCK_PASTE, None, None, _("Paste the clipboard"),
+ self.on_menu_paste_activate),
+ ("Find", gtk.STOCK_FIND, None, None, _("Search for text"),
+ self.on_menu_find_activate),
+ ("FindNext", None, _("Find Ne_xt"), "<control>G",
+ _("Search forwards for the same text"),
+ self.on_menu_find_next_activate),
+ ("FindPrevious", None, _("Find _Previous"), "<control><shift>G",
+ _("Search backwards for the same text"),
+ self.on_menu_find_previous_activate),
+ ("Replace", gtk.STOCK_FIND_AND_REPLACE,
+ _("_Replace"), "<control>H",
+ _("Find and replace text"),
+ self.on_menu_replace_activate),
+ ("Preferences", gtk.STOCK_PREFERENCES, _("Prefere_nces"), None,
+ _("Configure the application"),
+ self.on_menu_preferences_activate),
("ChangesMenu", None, _("_Changes")),
- ("NextChange", gtk.STOCK_GO_DOWN, _("Next change"), "<Alt>Down", _("Go to the next change"),
self.on_menu_edit_down_activate),
- ("PrevChange", gtk.STOCK_GO_UP, _("Previous change"), "<Alt>Up", _("Go to the previous
change"), self.on_menu_edit_up_activate),
- ("OpenExternal", None, _("Open externally"), None, _("Open selected file or directory in the
default external application"), self.on_open_external),
+ ("NextChange", gtk.STOCK_GO_DOWN, _("Next Change"), "<Alt>Down",
+ _("Go to the next change"),
+ self.on_menu_edit_down_activate),
+ ("PrevChange", gtk.STOCK_GO_UP, _("Previous Change"), "<Alt>Up",
+ _("Go to the previous change"),
+ self.on_menu_edit_up_activate),
+ ("OpenExternal", None, _("Open Externally"), None,
+ _("Open selected file or directory in the default external "
+ "application"),
+ self.on_open_external),
("ViewMenu", None, _("_View")),
- ("FileStatus", None, _("File status")),
- ("VcStatus", None, _("Version status")),
- ("FileFilters", None, _("File filters")),
- ("Stop", gtk.STOCK_STOP, None, "Escape", _("Stop the current action"),
self.on_toolbar_stop_clicked),
- ("Refresh", gtk.STOCK_REFRESH, None, "<control>R", _("Refresh the view"),
self.on_menu_refresh_activate),
- ("Reload", gtk.STOCK_REFRESH, _("Reload"), "<control><shift>R", _("Reload the comparison"),
self.on_menu_reload_activate),
+ ("FileStatus", None, _("File Status")),
+ ("VcStatus", None, _("Version Status")),
+ ("FileFilters", None, _("File Filters")),
+ ("Stop", gtk.STOCK_STOP, None, "Escape",
+ _("Stop the current action"),
+ self.on_toolbar_stop_clicked),
+ ("Refresh", gtk.STOCK_REFRESH, None, "<control>R",
+ _("Refresh the view"),
+ self.on_menu_refresh_activate),
+ ("Reload", gtk.STOCK_REFRESH, _("Reload"), "<control><shift>R",
+ _("Reload the comparison"),
+ self.on_menu_reload_activate),
("TabMenu", None, _("_Tabs")),
- ("PrevTab", None, _("_Previous Tab"), "<Ctrl><Alt>Page_Up", _("Activate previous tab"),
self.on_prev_tab),
- ("NextTab", None, _("_Next Tab"), "<Ctrl><Alt>Page_Down", _("Activate next tab"),
self.on_next_tab),
- ("MoveTabPrev", None, _("Move Tab _Left"), "<Ctrl><Alt><Shift>Page_Up", _("Move current tab to
left"), self.on_move_tab_prev),
- ("MoveTabNext", None, _("Move Tab _Right"), "<Ctrl><Alt><Shift>Page_Down", _("Move current tab
to right"), self.on_move_tab_next),
+ ("PrevTab", None, _("_Previous Tab"), "<Ctrl><Alt>Page_Up",
+ _("Activate previous tab"),
+ self.on_prev_tab),
+ ("NextTab", None, _("_Next Tab"), "<Ctrl><Alt>Page_Down",
+ _("Activate next tab"),
+ self.on_next_tab),
+ ("MoveTabPrev", None,
+ _("Move Tab _Left"), "<Ctrl><Alt><Shift>Page_Up",
+ _("Move current tab to left"),
+ self.on_move_tab_prev),
+ ("MoveTabNext", None,
+ _("Move Tab _Right"), "<Ctrl><Alt><Shift>Page_Down",
+ _("Move current tab to right"),
+ self.on_move_tab_next),
("HelpMenu", None, _("_Help")),
- ("Help", gtk.STOCK_HELP, _("_Contents"), "F1", _("Open the Meld manual"),
self.on_menu_help_activate),
- ("BugReport", gtk.STOCK_DIALOG_WARNING, _("Report _Bug"), None, _("Report a bug in Meld"),
self.on_menu_help_bug_activate),
- ("About", gtk.STOCK_ABOUT, None, None, _("About this program"),
self.on_menu_about_activate),
+ ("Help", gtk.STOCK_HELP, _("_Contents"), "F1",
+ _("Open the Meld manual"), self.on_menu_help_activate),
+ ("BugReport", gtk.STOCK_DIALOG_WARNING, _("Report _Bug"), None,
+ _("Report a bug in Meld"),
+ self.on_menu_help_bug_activate),
+ ("About", gtk.STOCK_ABOUT, None, None,
+ _("About this program"),
+ self.on_menu_about_activate),
)
toggleactions = (
- ("Fullscreen", None, _("Full Screen"), "F11", _("View the comparison in full screen"),
self.on_action_fullscreen_toggled, False),
- ("ToolbarVisible", None, _("_Toolbar"), None, _("Show or hide the toolbar"),
self.on_menu_toolbar_toggled, app.prefs.toolbar_visible),
- ("StatusbarVisible", None, _("_Statusbar"), None, _("Show or hide the statusbar"),
self.on_menu_statusbar_toggled, app.prefs.statusbar_visible)
+ ("Fullscreen", None, _("Full Screen"), "F11",
+ _("View the comparison in full screen"),
+ self.on_action_fullscreen_toggled, False),
+ ("ToolbarVisible", None, _("_Toolbar"), None,
+ _("Show or hide the toolbar"),
+ self.on_menu_toolbar_toggled, app.prefs.toolbar_visible),
+ ("StatusbarVisible", None, _("_Statusbar"), None,
+ _("Show or hide the statusbar"),
+ self.on_menu_statusbar_toggled, app.prefs.statusbar_visible)
)
ui_file = paths.ui_dir("meldapp-ui.xml")
self.actiongroup = gtk.ActionGroup('MainActions')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]