Hotkey menu items have their own icon

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25866 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jeffrey Goode 2010-05-07 03:21:12 +00:00
parent affea5fe9e
commit 16e0c5730d
14 changed files with 21 additions and 8 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View file

@ -68,6 +68,7 @@ enum themable_icons {
Icon_file_view_menu,
Icon_EQ,
Icon_Rockbox,
Icon_Hotkey,
Icon_Last_Themeable,
};

View file

@ -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)

View file

@ -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

View file

@ -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,

View file

@ -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 */

View file

@ -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",

View file

@ -77,6 +77,7 @@ static const unsigned short icons[Icon_Last_Themeable] = {
[Icon_file_view_menu] = ,
[Icon_EQ] = ,
[Icon_Rockbox] = ,
[Icon_Hotkey] = ,
*/
};

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB