From 16e0c5730d1373848a30374e5bb5d1d230626b50 Mon Sep 17 00:00:00 2001 From: Jeffrey Goode Date: Fri, 7 May 2010 03:21:12 +0000 Subject: Hotkey menu items have their own icon git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25866 a1c6a512-1295-4272-9138-f99709370657 --- apps/bitmaps/native/default_icons.6x8x1.bmp | Bin 5174 -> 5334 bytes apps/bitmaps/native/default_icons.6x8x16.bmp | Bin 5174 -> 5334 bytes apps/bitmaps/native/default_icons.6x8x2.bmp | Bin 5174 -> 5334 bytes .../remote_native/remote_default_icons.6x8x1.bmp | Bin 5174 -> 5334 bytes .../remote_native/remote_default_icons.6x8x2.bmp | Bin 5174 -> 5334 bytes apps/gui/icon.h | 1 + apps/menu.c | 5 +++++ apps/menu.h | 1 + apps/menus/playlist_menu.c | 3 ++- apps/menus/settings_menu.c | 2 +- apps/onplay.c | 16 ++++++++++------ apps/player/icons.c | 1 + 12 files changed, 21 insertions(+), 8 deletions(-) (limited to 'apps') diff --git a/apps/bitmaps/native/default_icons.6x8x1.bmp b/apps/bitmaps/native/default_icons.6x8x1.bmp index 857b1e1d7b..0ff36743ad 100644 Binary files a/apps/bitmaps/native/default_icons.6x8x1.bmp and b/apps/bitmaps/native/default_icons.6x8x1.bmp differ diff --git a/apps/bitmaps/native/default_icons.6x8x16.bmp b/apps/bitmaps/native/default_icons.6x8x16.bmp index dad29b2e50..0de8f85cf6 100644 Binary files a/apps/bitmaps/native/default_icons.6x8x16.bmp and b/apps/bitmaps/native/default_icons.6x8x16.bmp differ diff --git a/apps/bitmaps/native/default_icons.6x8x2.bmp b/apps/bitmaps/native/default_icons.6x8x2.bmp index 857b1e1d7b..0ff36743ad 100644 Binary files a/apps/bitmaps/native/default_icons.6x8x2.bmp and b/apps/bitmaps/native/default_icons.6x8x2.bmp differ diff --git a/apps/bitmaps/remote_native/remote_default_icons.6x8x1.bmp b/apps/bitmaps/remote_native/remote_default_icons.6x8x1.bmp index 857b1e1d7b..0ff36743ad 100644 Binary files a/apps/bitmaps/remote_native/remote_default_icons.6x8x1.bmp and b/apps/bitmaps/remote_native/remote_default_icons.6x8x1.bmp differ diff --git a/apps/bitmaps/remote_native/remote_default_icons.6x8x2.bmp b/apps/bitmaps/remote_native/remote_default_icons.6x8x2.bmp index 857b1e1d7b..0ff36743ad 100644 Binary files a/apps/bitmaps/remote_native/remote_default_icons.6x8x2.bmp and b/apps/bitmaps/remote_native/remote_default_icons.6x8x2.bmp differ diff --git a/apps/gui/icon.h b/apps/gui/icon.h index 9a58076509..c5db23ff9e 100644 --- a/apps/gui/icon.h +++ b/apps/gui/icon.h @@ -68,6 +68,7 @@ enum themable_icons { Icon_file_view_menu, Icon_EQ, Icon_Rockbox, + Icon_Hotkey, Icon_Last_Themeable, }; diff --git a/apps/menu.c b/apps/menu.c index b640905c0f..a0af666cbb 100644 --- a/apps/menu.c +++ b/apps/menu.c @@ -153,6 +153,11 @@ static enum themable_icons menu_get_icon(int selected_item, void * data) else if (menu->flags&MENU_DYNAMIC_DESC) menu_icon = menu->menu_get_name_and_icon->icon_id; +#ifdef HAVE_HOTKEY + if (hotkey_settable_menu && (menu->flags&MENU_FUNC_HOTKEYABLE)) + menu_icon = Icon_Hotkey; +#endif + if (menu_icon == Icon_NOICON) { switch (menu->flags&MENU_TYPE_MASK) diff --git a/apps/menu.h b/apps/menu.h index b5bab90981..a7bd1c1a73 100644 --- a/apps/menu.h +++ b/apps/menu.h @@ -61,6 +61,7 @@ struct menu_func { /* Flags for MT_FUNCTION_CALL */ #define MENU_FUNC_USEPARAM 0x80 #define MENU_FUNC_CHECK_RETVAL 0x100 +#define MENU_FUNC_HOTKEYABLE 0x200 #define MENU_COUNT_MASK 0xFFF #define MENU_COUNT_SHIFT 12 diff --git a/apps/menus/playlist_menu.c b/apps/menus/playlist_menu.c index aa4a0604ba..0d08a4f04f 100644 --- a/apps/menus/playlist_menu.c +++ b/apps/menus/playlist_menu.c @@ -68,7 +68,8 @@ static int playlist_view_(void) MENUITEM_FUNCTION(create_playlist_item, 0, ID2P(LANG_CREATE_PLAYLIST), (int(*)(void))create_playlist, NULL, NULL, Icon_NOICON); -MENUITEM_FUNCTION(view_cur_playlist, MENU_FUNC_CHECK_RETVAL, ID2P(LANG_VIEW_DYNAMIC_PLAYLIST), +MENUITEM_FUNCTION(view_cur_playlist, MENU_FUNC_CHECK_RETVAL | MENU_FUNC_HOTKEYABLE, + ID2P(LANG_VIEW_DYNAMIC_PLAYLIST), (int(*)(void))playlist_view_, NULL, NULL, Icon_NOICON); MENUITEM_FUNCTION(save_playlist, MENU_FUNC_USEPARAM, ID2P(LANG_SAVE_DYNAMIC_PLAYLIST), (int(*)(void*))save_playlist_screen, diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c index 1007d2aeb0..26e6da40e4 100644 --- a/apps/menus/settings_menu.c +++ b/apps/menus/settings_menu.c @@ -442,7 +442,7 @@ MENUITEM_FUNCTION(hotkey_view, 0, ID2P(LANG_VIEW_HOTKEY), MENUITEM_FUNCTION(hotkey_reset, 0, ID2P(LANG_RESET), (int(*)(void))reset_hotkey_settings, NULL, NULL, Icon_NOICON); -MAKE_MENU(hotkey_menu, ID2P(LANG_HOTKEY), 0, Icon_NOICON, +MAKE_MENU(hotkey_menu, ID2P(LANG_HOTKEY), 0, Icon_Hotkey, &hotkey_view, &hotkey_reset); #endif /*have_hotkey */ /* HOTKEY MENU */ diff --git a/apps/onplay.c b/apps/onplay.c index 009b375871..82a8bddae7 100644 --- a/apps/onplay.c +++ b/apps/onplay.c @@ -270,7 +270,8 @@ static int treeplaylist_callback(int action, const struct menu_item_ex *this_item); /* insert items */ -MENUITEM_FUNCTION(i_pl_item, MENU_FUNC_USEPARAM, ID2P(LANG_INSERT), +MENUITEM_FUNCTION(i_pl_item, MENU_FUNC_USEPARAM | MENU_FUNC_HOTKEYABLE, + ID2P(LANG_INSERT), playlist_insert_func, (intptr_t*)PLAYLIST_INSERT, NULL, Icon_Playlist); MENUITEM_FUNCTION(i_first_pl_item, MENU_FUNC_USEPARAM, ID2P(LANG_INSERT_FIRST), @@ -959,10 +960,12 @@ MENUITEM_FUNCTION(view_cue_item, 0, ID2P(LANG_BROWSE_CUESHEET), view_cue, NULL, view_cue_item_callback, Icon_NOICON); /* CONTEXT_WPS items */ -MENUITEM_FUNCTION(browse_id3_item, 0, ID2P(LANG_MENU_SHOW_ID3_INFO), +MENUITEM_FUNCTION(browse_id3_item, MENU_FUNC_HOTKEYABLE, + ID2P(LANG_MENU_SHOW_ID3_INFO), browse_id3, NULL, NULL, Icon_NOICON); #ifdef HAVE_PITCHSCREEN -MENUITEM_FUNCTION(pitch_screen_item, 0, ID2P(LANG_PITCH), +MENUITEM_FUNCTION(pitch_screen_item, MENU_FUNC_HOTKEYABLE, + ID2P(LANG_PITCH), gui_syncpitchscreen_run, NULL, NULL, Icon_Audio); #endif @@ -976,9 +979,9 @@ MENUITEM_FUNCTION(clipboard_copy_item, 0, ID2P(LANG_COPY), clipboard_copy, NULL, clipboard_callback, Icon_NOICON); MENUITEM_FUNCTION(clipboard_paste_item, 0, ID2P(LANG_PASTE), clipboard_paste, NULL, clipboard_callback, Icon_NOICON); -MENUITEM_FUNCTION(delete_file_item, 0, ID2P(LANG_DELETE), +MENUITEM_FUNCTION(delete_file_item, MENU_FUNC_HOTKEYABLE, ID2P(LANG_DELETE), delete_file_dir, NULL, clipboard_callback, Icon_NOICON); -MENUITEM_FUNCTION(delete_dir_item, 0, ID2P(LANG_DELETE_DIR), +MENUITEM_FUNCTION(delete_dir_item, MENU_FUNC_HOTKEYABLE, ID2P(LANG_DELETE_DIR), delete_file_dir, NULL, clipboard_callback, Icon_NOICON); MENUITEM_FUNCTION(create_dir_item, 0, ID2P(LANG_CREATE_DIR), create_dir, NULL, clipboard_callback, Icon_NOICON); @@ -1000,7 +1003,8 @@ static bool onplay_load_plugin(void *param) return false; } -MENUITEM_FUNCTION(list_viewers_item, 0, ID2P(LANG_ONPLAY_OPEN_WITH), +MENUITEM_FUNCTION(list_viewers_item, MENU_FUNC_HOTKEYABLE, + ID2P(LANG_ONPLAY_OPEN_WITH), list_viewers, NULL, clipboard_callback, Icon_NOICON); MENUITEM_FUNCTION(properties_item, MENU_FUNC_USEPARAM, ID2P(LANG_PROPERTIES), onplay_load_plugin, (void *)"properties", diff --git a/apps/player/icons.c b/apps/player/icons.c index ce243ead55..dc7f747879 100644 --- a/apps/player/icons.c +++ b/apps/player/icons.c @@ -77,6 +77,7 @@ static const unsigned short icons[Icon_Last_Themeable] = { [Icon_file_view_menu] = , [Icon_EQ] = , [Icon_Rockbox] = , + [Icon_Hotkey] = , */ }; -- cgit v1.2.3