[easytag] Use correct platform-specific accelarator modifier
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag] Use correct platform-specific accelarator modifier
- Date: Sun, 18 Aug 2013 10:09:14 +0000 (UTC)
commit 1f15ebcf47d58b9511309445f8f7e910f147f469
Author: David King <amigadave amigadave com>
Date: Sun Aug 18 11:05:18 2013 +0100
Use correct platform-specific accelarator modifier
GTK+ 2.24.7 (and GTK+ 3.2.1) introduced the concept of a
platform-agnostic accelerator modifier, "Primary", which can be used
instead of "Control". Using "Primary", the correct modifier is chosen
depending on the platform, for example the Option key would be used on
Mac OS X.
Use the new "Primary" modifier and bump the GTK+ dependencies to build
with versions which include the support.
configure.ac | 4 ++--
src/bar.c | 47 ++++++++++++++++++++++++++---------------------
2 files changed, 28 insertions(+), 23 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index fb7d8b5..93e0d35 100644
--- a/configure.ac
+++ b/configure.ac
@@ -119,8 +119,8 @@ dnl Checks for libraries.
dnl -------------------------------
dnl GTK+ libraries
-GTK2_DEPS="gtk+-2.0 >= 2.24.0"
-GTK3_DEPS="gtk+-3.0 >= 3.0.0"
+GTK2_DEPS="gtk+-2.0 >= 2.24.7"
+GTK3_DEPS="gtk+-3.0 >= 3.2.1"
PKG_CHECK_EXISTS([$GTK2_DEPS], [have_gtk2=yes], [have_gtk2=no])
PKG_CHECK_EXISTS([$GTK3_DEPS], [have_gtk3=yes], [have_gtk3=no])
diff --git a/src/bar.c b/src/bar.c
index cd4fc14..d1e2446 100644
--- a/src/bar.c
+++ b/src/bar.c
@@ -202,39 +202,44 @@ void Create_UI (GtkWidget **ppmenubar, GtkWidget **pptoolbar)
{ AM_SORT_DESCENDING_FILE_SAMPLERATE, GTK_STOCK_SORT_DESCENDING, _("Descending by samplerate"),
NULL, _("Descending by samplerate"), G_CALLBACK(Menu_Sort_Action) },
{ AM_OPEN_FILE_WITH, GTK_STOCK_OPEN, _("Open Files With…"),
- "<Control><Shift>O", _("Run a command on the selected files"),
+ "<Primary><Shift>O", _("Run a command on the selected files"),
G_CALLBACK (Browser_Open_Run_Program_List_Window) },
- { AM_SELECT_ALL, GTK_STOCK_SELECT_ALL, NULL, "<Control>A",
+ { AM_SELECT_ALL, GTK_STOCK_SELECT_ALL, NULL, "<Primary>A",
_("Select all"), G_CALLBACK (et_on_action_select_all) },
{ AM_UNSELECT_ALL, "easytag-unselect-all", _("Unselect All"),
- "<Shift><Control>A", _("Clear the current selection"),
+ "<Primary><Shift>A", _("Clear the current selection"),
G_CALLBACK (et_on_action_unselect_all) },
{ AM_INVERT_SELECTION, "easytag-invert-selection",
- _("Invert File Selection"), "<Control>I",
+ _("Invert File Selection"), "<Primary>I",
_("Invert file selection"),
G_CALLBACK (Action_Invert_Files_Selection) },
{ AM_DELETE_FILE, GTK_STOCK_DELETE, _("Delete Files"), NULL,
_("Delete files"), G_CALLBACK(Action_Delete_Selected_Files) },
- { AM_FIRST, GTK_STOCK_GOTO_FIRST, _("_First File"),
"<Control>Home", _("First file"), G_CALLBACK(Action_Select_First_File) },
+ { AM_FIRST, GTK_STOCK_GOTO_FIRST, _("_First File"), "<Primary>Home",
+ _("First file"), G_CALLBACK (Action_Select_First_File) },
{ AM_PREV, GTK_STOCK_GO_BACK, _("_Previous File"), "Page_Up",
_("Previous file"), G_CALLBACK(Action_Select_Prev_File) },
{ AM_NEXT, GTK_STOCK_GO_FORWARD, _("_Next File"), "Page_Down",
_("Next file"), G_CALLBACK(Action_Select_Next_File) },
- { AM_LAST, GTK_STOCK_GOTO_LAST, _("_Last File"),
"<Control>End", _("Last file"), G_CALLBACK(Action_Select_Last_File) },
+ { AM_LAST, GTK_STOCK_GOTO_LAST, _("_Last File"), "<Primary>End",
+ _("Last file"), G_CALLBACK (Action_Select_Last_File) },
{ AM_SCAN_FILES, GTK_STOCK_APPLY, _("S_can Files"), NULL,
_("Scan selected files"), G_CALLBACK (Action_Scan_Selected_Files) },
- { AM_REMOVE, GTK_STOCK_CLEAR, _("_Remove Tags"), "<Control>E",
+ { AM_REMOVE, GTK_STOCK_CLEAR, _("_Remove Tags"), "<Primary>E",
_("Remove tags"), G_CALLBACK (Action_Remove_Selected_Tags) },
- { AM_UNDO, GTK_STOCK_UNDO, _("_Undo Last Files Changes"), "<Control>Z",
+ { AM_UNDO, GTK_STOCK_UNDO, _("_Undo Last Files Changes"), "<Primary>Z",
_("Undo last files changes"),
G_CALLBACK(Action_Undo_Selected_Files) },
- { AM_REDO, GTK_STOCK_REDO, _("R_edo Last Files Changes"),
"<Shift><Control>Z", _("Redo last files changes"), G_CALLBACK(Action_Redo_Selected_File) },
- { AM_SAVE, GTK_STOCK_SAVE, _("_Save Files"), "<Control>S",
+ { AM_REDO, GTK_STOCK_REDO, _("R_edo Last Files Changes"),
+ "<Primary><Shift>Z", _("Redo last files changes"),
+ G_CALLBACK (Action_Redo_Selected_File) },
+ { AM_SAVE, GTK_STOCK_SAVE, _("_Save Files"), "<Primary>S",
_("Save changes to selected files"),
G_CALLBACK(Action_Save_Selected_Files) },
{ AM_SAVE_FORCED, GTK_STOCK_SAVE, _("_Force Save Files"),
- "<Shift><Control>S", _("Force saving files"),
+ "<Primary><Shift>S", _("Force saving files"),
G_CALLBACK (Action_Force_Saving_Selected_Files) },
{ AM_UNDO_HISTORY, GTK_STOCK_UNDO, _("Undo Last Changes"), NULL,
_("Undo last changes"), G_CALLBACK(Action_Undo_From_History_List) },
{ AM_REDO_HISTORY, GTK_STOCK_REDO, _("Redo Last Changes"), NULL,
_("Redo last changes"), G_CALLBACK(Action_Redo_From_History_List) },
- { AM_QUIT, GTK_STOCK_QUIT, _("_Quit"), "<Control>Q",
_("Quit"), G_CALLBACK(Quit_MainWindow) },
+ { AM_QUIT, GTK_STOCK_QUIT, _("_Quit"), "<Primary>Q", _("Quit"),
+ G_CALLBACK (Quit_MainWindow) },
{ MENU_BROWSER, NULL, _("_Browser"), NULL,
NULL, NULL },
{ AM_LOAD_HOME_DIR, GTK_STOCK_HOME, _("_Home Directory"), "<Alt>Home",
@@ -256,40 +261,40 @@ void Create_UI (GtkWidget **ppmenubar, GtkWidget **pptoolbar)
"<Alt>Up", _("Go to parent directory"),
G_CALLBACK (et_browser_on_action_parent_directory) },
{ AM_LOAD_DEFAULT_DIR, GTK_STOCK_JUMP_TO, _("_Default Directory"),
- "<Control>D", _("Go to default directory"),
+ "<Primary>D", _("Go to default directory"),
G_CALLBACK (Browser_Load_Default_Directory) },
{ AM_SET_PATH_AS_DEFAULT, GTK_STOCK_DIRECTORY, _("Set _Current Path as Default"), NULL,
_("Set current path as default"), G_CALLBACK(Set_Current_Path_As_Default) },
{ AM_RENAME_DIR, GTK_STOCK_INDEX, _("Rename Directory…"), "F2",
_("Rename directory"), G_CALLBACK(Browser_Open_Rename_Directory_Window) },
{ AM_RELOAD_DIRECTORY, GTK_STOCK_REFRESH, _("Reload Directory"),
- "<Control>R", _("Reload directory"),
+ "<Primary>R", _("Reload directory"),
G_CALLBACK (Browser_Reload_Directory) },
{ AM_BROWSE_DIRECTORY_WITH, GTK_STOCK_EXECUTE,
_("Browse Directory With…"), NULL,
_("Run a command on the directory"),
G_CALLBACK (Browser_Open_Run_Program_Tree_Window) },
- { AM_COLLAPSE_TREE, NULL, _("_Collapse Tree"), "<Control><Shift>C",
+ { AM_COLLAPSE_TREE, NULL, _("_Collapse Tree"), "<Primary><Shift>C",
_("Collapse directory tree"), G_CALLBACK (Browser_Tree_Collapse) },
{ AM_INITIALIZE_TREE, GTK_STOCK_REFRESH, _("_Reload Tree"),
- "<Control><Shift>R", _("Reload directory tree"),
+ "<Primary><Shift>R", _("Reload directory tree"),
G_CALLBACK (Browser_Tree_Rebuild) },
{ MENU_SCANNER, NULL, _("S_canner Mode"), NULL, NULL, NULL },
{ MENU_MISC, NULL, _("_Miscellaneous"),
NULL, NULL, NULL },
- { AM_SEARCH_FILE, GTK_STOCK_FIND, _("_Find…"), "<Control>F",
+ { AM_SEARCH_FILE, GTK_STOCK_FIND, _("_Find…"), "<Primary>F",
_("Search filenames and tags"),
G_CALLBACK (Open_Search_File_Window) },
- { AM_CDDB_SEARCH, GTK_STOCK_CDROM, _("CDD_B Search…"), "<Control>B",
+ { AM_CDDB_SEARCH, GTK_STOCK_CDROM, _("CDD_B Search…"), "<Primary>B",
_("CDDB search"), G_CALLBACK (Open_Cddb_Window) },
{ AM_FILENAME_FROM_TXT, GTK_STOCK_OPEN,
- _("Load Filenames From a Text File…"), "<Control>T",
+ _("Load Filenames From a Text File…"), "<Primary>T",
_("Load filenames from a text file"),
G_CALLBACK (Open_Load_Filename_Window) },
{ AM_WRITE_PLAYLIST, GTK_STOCK_SAVE_AS, _("Generate Playlist…"),
- "<Control>W", _("Generate a playlist"),
+ "<Primary>W", _("Generate a playlist"),
G_CALLBACK (Open_Write_Playlist_Window) },
{ AM_RUN_AUDIO_PLAYER, GTK_STOCK_MEDIA_PLAY, _("Run Audio Player"),
- "<Control>M", _("Run audio player"),
+ "<Primary>M", _("Run audio player"),
G_CALLBACK (Run_Audio_Player_Using_Selection) },
{ MENU_EDIT, NULL, _("_Edit"), NULL, NULL, NULL },
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]