Advertisement
Songs0fFailure

Sansa, hotkey-bookmark, Clip+&Zip

Mar 16th, 2012
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 3.70 KB | None | 0 0
  1. diff --git a/apps/keymaps/keymap-clip.c b/apps/keymaps/keymap-clip.c
  2. index 3a9dbad..8a96956 100644
  3. --- apps/keymaps/keymap-clip.c
  4. +++ apps/keymaps/keymap-clip.c
  5. @@ -83,11 +83,7 @@ static const struct button_mapping button_context_wps[]  = {
  6.      { ACTION_WPS_PITCHSCREEN,   BUTTON_UP|BUTTON_REPEAT,        BUTTON_NONE },
  7.      { ACTION_WPS_ID3SCREEN,     BUTTON_SELECT|BUTTON_DOWN,      BUTTON_SELECT },
  8.  
  9. -#ifdef HAVE_HOTKEY /* down|repeat doesn't work in the file browser */
  10. -    { ACTION_WPS_HOTKEY,        BUTTON_DOWN|BUTTON_REPEAT,      BUTTON_NONE },
  11. -#else
  12. -    { ACTION_WPS_VIEW_PLAYLIST, BUTTON_DOWN|BUTTON_REPEAT,      BUTTON_NONE },
  13. -#endif
  14. +    { ACTION_WPS_HOTKEY,        BUTTON_DOWN|BUTTON_REPEAT,      BUTTON_DOWN },
  15.  
  16.  #ifndef HAS_BUTTON_HOLD /* Clip+ */
  17.      { ACTION_STD_KEYLOCK,       BUTTON_HOME|BUTTON_SELECT,      BUTTON_NONE },
  18. @@ -136,9 +132,9 @@ static const struct button_mapping button_context_list[]  = {
  19.  static const struct button_mapping button_context_tree[]  = {
  20.      { ACTION_TREE_WPS,    BUTTON_HOME|BUTTON_SELECT,    BUTTON_HOME },
  21.      { ACTION_TREE_STOP,   BUTTON_POWER|BUTTON_REL,      BUTTON_POWER },
  22. -#ifdef HAVE_HOTKEY
  23. +//#ifdef HAVE_HOTKEY
  24.  //    { ACTION_TREE_HOTKEY, BUTTON_NONE,                  BUTTON_NONE },
  25. -#endif
  26. +//#endif
  27.  
  28.      LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
  29.  }; /* button_context_tree */
  30. diff --git a/apps/onplay.c b/apps/onplay.c
  31. index 143745d..1e78313 100644
  32. --- apps/onplay.c
  33. +++ apps/onplay.c
  34. @@ -1297,6 +1297,9 @@ static struct hotkey_assignment hotkey_items[] = {
  35.              HOTKEY_FUNC(NULL, NULL),
  36.              ONPLAY_PICTUREFLOW },
  37.  #endif
  38. +    { HOTKEY_BOOKMARK,   LANG_BOOKMARK_MENU_CREATE,
  39. +            HOTKEY_FUNC(bookmark_create_menu, NULL),
  40. +            ONPLAY_OK },
  41.  };
  42.  
  43.  /* Return the language ID for this action */
  44. diff --git a/apps/onplay.h b/apps/onplay.h
  45. index d24bf56..24637ac 100644
  46. --- apps/onplay.h
  47. +++ apps/onplay.h
  48. @@ -45,6 +45,7 @@ enum hotkey_action {
  49.      HOTKEY_INSERT,
  50.      HOTKEY_INSERT_SHUFFLED,
  51.      HOTKEY_PICTUREFLOW,
  52. +    HOTKEY_BOOKMARK,
  53.  };
  54.  #endif
  55.  
  56. diff --git a/apps/settings_list.c b/apps/settings_list.c
  57. index 44295ac..57219a4 100644
  58. --- apps/settings_list.c
  59. +++ apps/settings_list.c
  60. @@ -1892,7 +1892,7 @@ const struct settings_list settings[] = {
  61.  #ifdef HAVE_HOTKEY
  62.      TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, hotkey_wps,
  63.          LANG_HOTKEY_WPS, HOTKEY_VIEW_PLAYLIST, "hotkey wps",
  64. -        "off,view playlist,show track info,pitchscreen,open with,delete"
  65. +        "off,view playlist,show track info,pitchscreen,open with,delete,bookmark"
  66.  #ifdef HAVE_PICTUREFLOW_INTEGRATION        
  67.          ",pictureflow"
  68.  #endif
  69. @@ -1904,7 +1904,7 @@ const struct settings_list settings[] = {
  70.  #endif
  71.          HOTKEY_OFF,
  72.          HOTKEY_VIEW_PLAYLIST, HOTKEY_SHOW_TRACK_INFO, HOTKEY_PITCHSCREEN,
  73. -        HOTKEY_OPEN_WITH, HOTKEY_DELETE
  74. +        HOTKEY_OPEN_WITH, HOTKEY_DELETE, HOTKEY_BOOKMARK
  75.  #ifdef HAVE_PICTUREFLOW_INTEGRATION        
  76.          , HOTKEY_PICTUREFLOW
  77.  #endif        
  78. diff --git a/firmware/export/config/sansaclipplus.h b/firmware/export/config/sansaclipplus.h
  79. index 0725431..a59a5f0 100644
  80. --- firmware/export/config/sansaclipplus.h
  81. +++ firmware/export/config/sansaclipplus.h
  82. @@ -221,4 +221,4 @@
  83.  #define DEFAULT_REC_RIGHT_GAIN  23
  84.  
  85.  /* Define this if a programmable hotkey is mapped */
  86. -//#define HAVE_HOTKEY
  87. +#define HAVE_HOTKEY
  88. diff --git a/firmware/export/config/sansaclipzip.h b/firmware/export/config/sansaclipzip.h
  89. --- firmware/export/config/sansaclipzip.h
  90. +++ firmware/export/config/sansaclipzip.h
  91. @@ -220,4 +220,4 @@
  92.  #define DEFAULT_REC_RIGHT_GAIN  23
  93.  
  94.  /* Define this if a programmable hotkey is mapped */
  95. -//#define HAVE_HOTKEY
  96. +#define HAVE_HOTKEY
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement