diff options
| author | Jeffrey Goode <jeffg7@gmail.com> | 2010-05-07 03:21:12 +0000 |
|---|---|---|
| committer | Jeffrey Goode <jeffg7@gmail.com> | 2010-05-07 03:21:12 +0000 |
| commit | 16e0c5730d1373848a30374e5bb5d1d230626b50 (patch) | |
| tree | 66e25fd81700266a65ca649c0e7b7e3ca27c6e67 | |
| parent | affea5fe9e54b32ecd9f30ed02dd093d7aaa34b0 (diff) | |
| download | rockbox-16e0c5730d1373848a30374e5bb5d1d230626b50.zip rockbox-16e0c5730d1373848a30374e5bb5d1d230626b50.tar.gz rockbox-16e0c5730d1373848a30374e5bb5d1d230626b50.tar.bz2 rockbox-16e0c5730d1373848a30374e5bb5d1d230626b50.tar.xz | |
Hotkey menu items have their own icon
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25866 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | apps/bitmaps/native/default_icons.6x8x1.bmp | bin | 5174 -> 5334 bytes | |||
| -rw-r--r-- | apps/bitmaps/native/default_icons.6x8x16.bmp | bin | 5174 -> 5334 bytes | |||
| -rw-r--r-- | apps/bitmaps/native/default_icons.6x8x2.bmp | bin | 5174 -> 5334 bytes | |||
| -rw-r--r-- | apps/bitmaps/remote_native/remote_default_icons.6x8x1.bmp | bin | 5174 -> 5334 bytes | |||
| -rw-r--r-- | apps/bitmaps/remote_native/remote_default_icons.6x8x2.bmp | bin | 5174 -> 5334 bytes | |||
| -rw-r--r-- | apps/gui/icon.h | 1 | ||||
| -rw-r--r-- | apps/menu.c | 5 | ||||
| -rw-r--r-- | apps/menu.h | 1 | ||||
| -rw-r--r-- | apps/menus/playlist_menu.c | 3 | ||||
| -rw-r--r-- | apps/menus/settings_menu.c | 2 | ||||
| -rw-r--r-- | apps/onplay.c | 16 | ||||
| -rw-r--r-- | apps/player/icons.c | 1 | ||||
| -rw-r--r-- | icons/tango_small.bmp | bin | 13878 -> 14310 bytes | |||
| -rw-r--r-- | 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 Binary files differindex 857b1e1..0ff3674 100644 --- a/apps/bitmaps/native/default_icons.6x8x1.bmp +++ b/apps/bitmaps/native/default_icons.6x8x1.bmp diff --git a/apps/bitmaps/native/default_icons.6x8x16.bmp b/apps/bitmaps/native/default_icons.6x8x16.bmp Binary files differindex dad29b2..0de8f85 100644 --- a/apps/bitmaps/native/default_icons.6x8x16.bmp +++ b/apps/bitmaps/native/default_icons.6x8x16.bmp diff --git a/apps/bitmaps/native/default_icons.6x8x2.bmp b/apps/bitmaps/native/default_icons.6x8x2.bmp Binary files differindex 857b1e1..0ff3674 100644 --- a/apps/bitmaps/native/default_icons.6x8x2.bmp +++ b/apps/bitmaps/native/default_icons.6x8x2.bmp diff --git a/apps/bitmaps/remote_native/remote_default_icons.6x8x1.bmp b/apps/bitmaps/remote_native/remote_default_icons.6x8x1.bmp Binary files differindex 857b1e1..0ff3674 100644 --- a/apps/bitmaps/remote_native/remote_default_icons.6x8x1.bmp +++ b/apps/bitmaps/remote_native/remote_default_icons.6x8x1.bmp diff --git a/apps/bitmaps/remote_native/remote_default_icons.6x8x2.bmp b/apps/bitmaps/remote_native/remote_default_icons.6x8x2.bmp Binary files differindex 857b1e1..0ff3674 100644 --- a/apps/bitmaps/remote_native/remote_default_icons.6x8x2.bmp +++ b/apps/bitmaps/remote_native/remote_default_icons.6x8x2.bmp diff --git a/apps/gui/icon.h b/apps/gui/icon.h index 9a58076..c5db23f 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 b640905..a0af666 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 b5bab90..a7bd1c1 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 aa4a060..0d08a4f 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 1007d2a..26e6da4 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 009b375..82a8bdd 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 ce243ea..dc7f747 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 Binary files differindex d951726..e2cb1d8 100644 --- a/icons/tango_small.bmp +++ b/icons/tango_small.bmp diff --git a/icons/tango_small_mono.bmp b/icons/tango_small_mono.bmp Binary files differindex b7c884a..9f448aa 100644 --- a/icons/tango_small_mono.bmp +++ b/icons/tango_small_mono.bmp |