From 16e0c5730d1373848a30374e5bb5d1d230626b50 Mon Sep 17 00:00:00 2001 From: Jeffrey Goode Date: Fri, 7 May 2010 03:21:12 +0000 Subject: [PATCH] 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_default_icons.6x8x1.bmp | Bin 5174 -> 5334 bytes .../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 + icons/tango_small.bmp | Bin 13878 -> 14310 bytes icons/tango_small_mono.bmp | Bin 3190 -> 3286 bytes 14 files changed, 21 insertions(+), 8 deletions(-) diff --git a/apps/bitmaps/native/default_icons.6x8x1.bmp b/apps/bitmaps/native/default_icons.6x8x1.bmp index 857b1e1d7b82697a1add08efa353373c97f975e1..0ff36743ad6f5ec1fe20eec3d0b05baec66db3c7 100644 GIT binary patch delta 77 zcmdm{aZOXl$@iKF0~nYANev)o17Z$F1_nk339$GAp!^X&5T4A)Bs|%kUw(2OhwS8V RM#0G;Kpe{%u+jIWFaX#K4tM|n delta 61 zcmcbnxlKdI$=6JT0SwH5qy`YPfq0A{BmrVEFaYI`@PY8;g-pVe`8fnPet0Gf0P}tc Aw*UYD diff --git a/apps/bitmaps/native/default_icons.6x8x16.bmp b/apps/bitmaps/native/default_icons.6x8x16.bmp index dad29b2e500a8d12a95a6394841f6633e5ee25b1..0de8f85cf6ed1dbdf86e05a39809f22fc166c7e2 100644 GIT binary patch delta 63 zcmdm{aZOX%$@iKF0~nYANev)o17Z$F1_nk339$HriOSlO^EmV-M=%Ob4h7;k&VY@6 GFN6U{kqhwv delta 47 pcmcbnxlKda$=6JT0SwH5qy`YPfq0A{BmrVEFicd|-uUi?FaVfu2GIZj diff --git a/apps/bitmaps/native/default_icons.6x8x2.bmp b/apps/bitmaps/native/default_icons.6x8x2.bmp index 857b1e1d7b82697a1add08efa353373c97f975e1..0ff36743ad6f5ec1fe20eec3d0b05baec66db3c7 100644 GIT binary patch delta 77 zcmdm{aZOXl$@iKF0~nYANev)o17Z$F1_nk339$GAp!^X&5T4A)Bs|%kUw(2OhwS8V RM#0G;Kpe{%u+jIWFaX#K4tM|n delta 61 zcmcbnxlKdI$=6JT0SwH5qy`YPfq0A{BmrVEFaYI`@PY8;g-pVe`8fnPet0Gf0P}tc Aw*UYD diff --git a/apps/bitmaps/remote_native/remote_default_icons.6x8x1.bmp b/apps/bitmaps/remote_native/remote_default_icons.6x8x1.bmp index 857b1e1d7b82697a1add08efa353373c97f975e1..0ff36743ad6f5ec1fe20eec3d0b05baec66db3c7 100644 GIT binary patch delta 77 zcmdm{aZOXl$@iKF0~nYANev)o17Z$F1_nk339$GAp!^X&5T4A)Bs|%kUw(2OhwS8V RM#0G;Kpe{%u+jIWFaX#K4tM|n delta 61 zcmcbnxlKdI$=6JT0SwH5qy`YPfq0A{BmrVEFaYI`@PY8;g-pVe`8fnPet0Gf0P}tc Aw*UYD diff --git a/apps/bitmaps/remote_native/remote_default_icons.6x8x2.bmp b/apps/bitmaps/remote_native/remote_default_icons.6x8x2.bmp index 857b1e1d7b82697a1add08efa353373c97f975e1..0ff36743ad6f5ec1fe20eec3d0b05baec66db3c7 100644 GIT binary patch delta 77 zcmdm{aZOXl$@iKF0~nYANev)o17Z$F1_nk339$GAp!^X&5T4A)Bs|%kUw(2OhwS8V RM#0G;Kpe{%u+jIWFaX#K4tM|n delta 61 zcmcbnxlKdI$=6JT0SwH5qy`YPfq0A{BmrVEFaYI`@PY8;g-pVe`8fnPet0Gf0P}tc Aw*UYD 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] = , */ }; diff --git a/icons/tango_small.bmp b/icons/tango_small.bmp index d95172651f169a340984c51aa0b7cc6ae177e110..e2cb1d8383d4c4c8a2db367d3585d925385c0281 100644 GIT binary patch delta 424 zcmdm%^DN)X$@iH#0~nYANev+80pcD;1_nk339$GEpu7+_1cL>D#D9kW$jHiaj+N!) zKtZv|4yaS)u1VWDdPu)21F591t^@* T!w3{^qCgXY2rXG0F=QrrG|6@_X?$>^?IVzMrST(GK#wz729mx^ z?|mb(sxZZ+$bflrYD2NuR^+PL??|&+asflJue4n}mc}I%%GF?Pz2$t9K3buj0MTQ; z;|2wGM#|t^udc!4Vvlk|q96F)iSL|JNF4_~vtFpCaS7tRpk7EViD~CW4DC7e!`wKJ zd0h69#Gxu`RK`U;EJ+)2fx%k31nsId4gi)~7|av8ta0AKVrBg17VKyT^d^(QItl7m z5#&0O?c|?0pd0Ot){?V-pbCR@OGFlDEUM~UZV+B}{CC{RKl%c_RkqXf1#-W_3ppLD z#OXl4^wab;@m}MyKcx7obNs01(Qnp!qODb*t?`2Rh@JmRc4J3>+Dp4w)>y)>#swMO zC=Xp+4QL<6%LN(jLdV1Vs&Do~GaX~Z`ugRi_wajV}mvh}U{{|0V{eCsenYj9D=!EtI(%Q(OYU0^-%G-UgJ~_?N--mHlH2Z1KhlYKBU)XgLxU>DuZwRE$x_1 z_D}1Rf3lv_d}lkE*!~smKJ3SaJo>68?-3j1-%B%*htYf|Cs(U{j4PGb6Cx4yOk^_J zBCTV#Yqm*VsK4W|8dQHBt;TuW5A^e}n~uuWey4uF+(+H7;rmYeN2~k9StorADB26^ z?-+3ish@NFU>kHFa4e9LSyWc{DO5JaBe#KiG;pYo1$oK!;M{M>5&6_aKa#VI>|_3+ zer!l43^`2?%qJc{{4UJ;{!2Eo-RL|pLyc#Kxy~0b+-IKDy5A}8d1B^$&G|Izp@ld0 z&_Fq4K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