Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

Jemand
Sunday, February 1st, 2009 at 1:34:02pm UTC 

  1. Index: apps/recorder/keyboard.c
  2. ===================================================================
  3. --- apps/recorder/keyboard.c    (Revision 19896)
  4. +++ apps/recorder/keyboard.c    (Arbeitskopie)
  5. @@ -7,7 +7,7 @@
  6.   *                     \/            \/     \/    \/            \/
  7.   * $Id$
  8.   *
  9. - * Copyright (C) 2002 by Bj�rn Stenberg
  10. + * Copyright (C) 2002 by Björn Stenberg
  11.   *
  12.   * This program is free software; you can redistribute it and/or
  13.   * modify it under the terms of the GNU General Public License
  14. @@ -298,7 +298,7 @@
  15.      int morse_tick = 0;
  16.      char buf[2];
  17.  #endif
  18. -    char oldbars = viewportmanager_set_statusbar(0);
  19. +    char oldbars = viewportmanager_set_statusbar(VP_SB_HIDE_ALL);
  20.      FOR_NB_SCREENS(l)
  21.      {
  22.          struct keyboard_parameters *pm = &param[l];
  23. Index: apps/plugins/lib/oldmenuapi.c
  24. ===================================================================
  25. --- apps/plugins/lib/oldmenuapi.c       (Revision 19896)
  26. +++ apps/plugins/lib/oldmenuapi.c       (Arbeitskopie)
  27. @@ -94,7 +94,7 @@
  28.      bool exit = false;
  29.      int key;
  30.  
  31. -    char bars = rb->viewportmanager_set_statusbar(VP_ALLSCREENS);
  32. +    int bars = rb->viewportmanager_set_statusbar(VP_SB_ALLSCREENS);
  33.      rb->gui_synclist_draw(&(menus[m].synclist));
  34.      while (!exit) {
  35.          key = rb->get_action(CONTEXT_MAINMENU,HZ/2);
  36. Index: apps/gui/list.c
  37. ===================================================================
  38. --- apps/gui/list.c     (Revision 19896)
  39. +++ apps/gui/list.c     (Arbeitskopie)
  40. @@ -845,7 +845,7 @@
  41.  {
  42.      struct gui_synclist lists;
  43.      int action, old_line_count = simplelist_line_count;
  44. -    char oldbars = viewportmanager_set_statusbar(VP_ALLSCREENS);
  45. +    int oldbars = viewportmanager_set_statusbar(VP_SB_ALLSCREENS);
  46.      char* (*getname)(int item, void * data, char *buffer, size_t buffer_len);
  47.      int wrap = LIST_WRAP_UNLESS_HELD;
  48.      if (info->get_name)
  49. Index: apps/gui/viewport.c
  50. ===================================================================
  51. --- apps/gui/viewport.c (Revision 19896)
  52. +++ apps/gui/viewport.c (Arbeitskopie)
  53. @@ -35,7 +35,7 @@
  54.  #include "screen_access.h"
  55.  #include "appevents.h"
  56.  
  57. -static char statusbar_enabled = VP_ALLSCREENS;
  58. +static int statusbar_enabled = VP_SB_ALLSCREENS;
  59.  
  60.  int viewport_get_nb_lines(struct viewport *vp)
  61.  {
  62. @@ -49,8 +49,9 @@
  63.  
  64.  static bool showing_bars(enum screen_type screen)
  65.  {
  66. -    if (statusbar_enabled&(1<<screen))
  67. -        return global_settings.statusbar || (statusbar_enabled&(1<<(screen+4)));
  68. +    if (statusbar_enabled & VP_SB_ONSCREEN(screen))
  69. +        return global_settings.statusbar ||
  70. +           (statusbar_enabled & VP_SB_IGNORE_SETTING(screen));
  71.      return false;
  72.  }   
  73.  
  74. @@ -92,10 +93,10 @@
  75.  #endif
  76.  }
  77.  
  78. -/* returns true if it was enabled BEFORE this call */
  79. -char viewportmanager_set_statusbar(char enabled)
  80. +
  81. +int viewportmanager_set_statusbar(int enabled)
  82.  {
  83. -    char old = statusbar_enabled;
  84. +    int old = statusbar_enabled;
  85.      if (enabled)
  86.      {
  87.          int i;
  88. Index: apps/gui/gwps.c
  89. ===================================================================
  90. --- apps/gui/gwps.c     (Revision 19896)
  91. +++ apps/gui/gwps.c     (Arbeitskopie)
  92. @@ -115,24 +115,25 @@
  93.  
  94.      audio_next();
  95.  }
  96. -static char fix_wps_bars(void)
  97. +static int fix_wps_bars(void)
  98.  {
  99.  #ifdef HAVE_LCD_BITMAP
  100.      int i; 
  101. -    char wpsbars = 0;
  102. +    int wpsbars = VP_SB_HIDE_ALL;
  103.      FOR_NB_SCREENS(i)
  104.      {
  105.          bool draw = global_settings.statusbar;
  106.          if (gui_wps[i].data->wps_sb_tag)
  107.              draw = gui_wps[i].data->show_sb_on_wps;
  108.          if (draw)
  109. -            wpsbars |=  VP_IGNORE_SB_SETTING(i)|(1<<i);
  110. +            wpsbars |= (VP_SB_ONSCREEN(i) | VP_SB_IGNORE_SETTING(i));
  111.      }
  112.      return wpsbars;
  113.  #else
  114. -    return 1;   
  115. +    return VP_SB_ALLSCREENS;
  116.  #endif
  117.  }
  118. +
  119.  long gui_wps_show(void)
  120.  {
  121.      long button = 0;
  122. @@ -143,7 +144,7 @@
  123.      bool update_track = false;
  124.      int i;
  125.      long last_left = 0, last_right = 0;
  126. -    char wpsbars = 0, oldbars = 0;
  127. +    int wpsbars, oldbars;
  128.      
  129.      wps_state_init();
  130.  
  131. @@ -165,7 +166,7 @@
  132.      ab_reset_markers();
  133.  #endif
  134.  
  135. -    oldbars = viewportmanager_set_statusbar(0);
  136. +    oldbars = viewportmanager_set_statusbar(VP_SB_HIDE_ALL);
  137.      if(audio_status() & AUDIO_STATUS_PLAY)
  138.      {
  139.          wps_state.id3 = audio_current_track();
  140. Index: apps/gui/viewport.h
  141. ===================================================================
  142. --- apps/gui/viewport.h (Revision 19896)
  143. +++ apps/gui/viewport.h (Arbeitskopie)
  144. @@ -41,19 +41,32 @@
  145.  
  146.  void viewport_set_defaults(struct viewport *vp, enum screen_type screen);
  147.  
  148. -/* viewportmanager_set_statusbar() is used to specify which screens the statusbar
  149. - * should be displayed on.
  150. - * *usually* enabled will be VP_ALLSCREENS which means display the bar if the setting
  151. - * is enabled. (and it will be on both screens)
  152. - * For the WPS (and other possible exceptions) use VP_IGNORE_SB_SETTING() to
  153. - * FORCE the statusbar on for the given screen (i.e it will show regardless of the setting
  154. +/* Used to specify which screens the statusbar (SB) should be displayed on.
  155. + *
  156. + * The parameter is a bit OR'ed combination of the following (screen is
  157. + * SCREEN_MAIN or SCREEN_REMOTE from screen_access.h):
  158. + *
  159. + * VP_SB_HIDE_ALL means "hide the SB on all screens"
  160. + * VP_SB_ONSCREEN(screen) means "display the SB on the given screen
  161. + *                              as specified by the SB setting for that screen"
  162. + * VP_SB_IGNORE_SETTING(screen) means "ignore the SB setting for that screen"
  163. + * VP_SB_ALLSCREENS means "VP_SB_ONSCREEN for all screens"
  164. + *
  165. + * In most cases, VP_SB_ALLSCREENS should be used which means display the SB
  166. + * as specified by the settings.
  167. + * For the WPS (and other possible exceptions) use VP_SB_IGNORE_SETTING() to
  168. + * FORCE the statusbar on for the given screen (i.e it will show regardless
  169. + * of the setting)
  170. + *
  171. + * Returns the status before the call. This value can be used to restore the
  172. + * SB "displaying rules".
  173.   */
  174. -#define VP_SB_ONSCREEN(screen) (1<<screen) /* turn the SB on "screen" only */
  175. -#define VP_ALLSCREENS (VP_SB_ONSCREEN(0)|VP_SB_ONSCREEN(1)) /* SB on for both screens */
  176. -#define VP_IGNORE_SB_SETTING(screen) (1<<(4+screen))
  177. -char viewportmanager_set_statusbar(char enabled);
  178. +#define VP_SB_HIDE_ALL 0
  179. +#define VP_SB_ONSCREEN(screen) (1<<screen)
  180. +#define VP_SB_IGNORE_SETTING(screen) (1<<(4+screen))
  181. +#define VP_SB_ALLSCREENS (VP_SB_ONSCREEN(0)|VP_SB_ONSCREEN(1))
  182. +int viewportmanager_set_statusbar(int enabled);
  183.  
  184.  /* callbacks for GUI_EVENT_* events */
  185.  void viewportmanager_draw_statusbars(void*data);
  186.  void viewportmanager_statusbar_changed(void* data);
  187. -
  188. Index: apps/menu.c
  189. ===================================================================
  190. --- apps/menu.c (Revision 19896)
  191. +++ apps/menu.c (Arbeitskopie)
  192. @@ -355,7 +355,8 @@
  193.      const struct menu_item_ex *temp, *menu;
  194.      int ret = 0, i;
  195.      bool redraw_lists;
  196. -    char oldbars = viewportmanager_set_statusbar(hide_bars?0:VP_ALLSCREENS);
  197. +    int oldbars = viewportmanager_set_statusbar(
  198. +            hide_bars ? VP_SB_HIDE_ALL : VP_SB_ALLSCREENS);
  199.      
  200.      const struct menu_item_ex *menu_stack[MAX_MENUS];
  201.      int menu_stack_selected_item[MAX_MENUS];
  202. Index: apps/menus/eq_menu.c
  203. ===================================================================
  204. --- apps/menus/eq_menu.c        (Revision 19896)
  205. +++ apps/menus/eq_menu.c        (Arbeitskopie)
  206. @@ -392,7 +392,7 @@
  207.      enum eq_type current_type;
  208.      char buf[24];
  209.      int i, w, h, height, start_item, nb_eq_sliders[NB_SCREENS];
  210. -    char barsenabled = viewportmanager_set_statusbar(0);
  211. +    int barsenabled = viewportmanager_set_statusbar(VP_SB_HIDE_ALL);
  212.  
  213.  
  214.      FOR_NB_SCREENS(i) {
  215. Index: apps/plugin.c
  216. ===================================================================
  217. --- apps/plugin.c       (Revision 19896)
  218. +++ apps/plugin.c       (Arbeitskopie)
  219. @@ -636,7 +636,7 @@
  220.  int plugin_load(const char* plugin, const void* parameter)
  221.  {
  222.      int rc;
  223. -    char oldbars;
  224. +    int oldbars;
  225.      struct plugin_header *hdr;
  226.  #ifdef SIMULATOR
  227.      void *pd;
  228. @@ -743,7 +743,7 @@
  229.  #endif
  230.  
  231.      invalidate_icache();
  232. -    oldbars = viewportmanager_set_statusbar(0);
  233. +    oldbars = viewportmanager_set_statusbar(VP_SB_HIDE_ALL);
  234.  
  235.      rc = hdr->entry_point(parameter);
  236.      
  237. Index: apps/plugin.h
  238. ===================================================================
  239. --- apps/plugin.h       (Revision 19896)
  240. +++ apps/plugin.h       (Arbeitskopie)
  241. @@ -126,12 +126,12 @@
  242.  #define PLUGIN_MAGIC 0x526F634B /* RocK */
  243.  
  244.  /* increase this every time the api struct changes */
  245. -#define PLUGIN_API_VERSION 140
  246. +#define PLUGIN_API_VERSION 141
  247.  
  248.  /* update this to latest version if a change to the api struct breaks
  249.     backwards compatibility (and please take the opportunity to sort in any
  250.     new function which are "waiting" at the end of the function table) */
  251. -#define PLUGIN_MIN_API_VERSION 140
  252. +#define PLUGIN_MIN_API_VERSION 141
  253.  
  254.  /* plugin return codes */
  255.  enum plugin_status {
  256. @@ -312,7 +312,7 @@
  257.                                int height);
  258.  #endif
  259.      void (*viewport_set_defaults)(struct viewport *vp, enum screen_type screen);
  260. -    char (*viewportmanager_set_statusbar)(char enabled);
  261. +    int (*viewportmanager_set_statusbar)(int enable_status);
  262.      /* list */
  263.      void (*gui_synclist_init)(struct gui_synclist * lists,
  264.              list_get_name callback_get_item_name, void * data,
  265. Index: apps/root_menu.c
  266. ===================================================================
  267. --- apps/root_menu.c    (Revision 19896)
  268. +++ apps/root_menu.c    (Arbeitskopie)
  269. @@ -270,7 +270,7 @@
  270.      show_remote_main_backdrop();
  271.  #endif
  272.      /* always re-enable the statusbar after the WPS */
  273. -    viewportmanager_set_statusbar(VP_ALLSCREENS);
  274. +    viewportmanager_set_statusbar(VP_SB_ALLSCREENS);
  275.      return ret_val;
  276.  }
  277.  #if CONFIG_TUNER
  278. Index: apps/debug_menu.c
  279. ===================================================================
  280. --- apps/debug_menu.c   (Revision 19896)
  281. +++ apps/debug_menu.c   (Arbeitskopie)
  282. @@ -2739,7 +2739,7 @@
  283.  {
  284.      if (btn == ACTION_STD_OK)
  285.      {
  286. -        char oldbars = viewportmanager_set_statusbar(0);
  287. +        int oldbars = viewportmanager_set_statusbar(VP_SB_HIDE_ALL);
  288.          menuitems[gui_synclist_get_sel_pos(lists)].function();
  289.          btn = ACTION_REDRAW;
  290.          viewportmanager_set_statusbar(oldbars);
  291. Index: apps/main.c
  292. ===================================================================
  293. --- apps/main.c (Revision 19896)
  294. +++ apps/main.c (Arbeitskopie)
  295. @@ -138,7 +138,7 @@
  296.  #ifdef HAVE_TOUCHSCREEN
  297.      touchscreen_set_mode(TOUCHSCREEN_BUTTON);
  298.  #endif
  299. -    viewportmanager_set_statusbar(VP_ALLSCREENS);
  300. +    viewportmanager_set_statusbar(VP_SB_ALLSCREENS);
  301.      add_event(GUI_EVENT_STATUSBAR_TOGGLE, false,
  302.                viewportmanager_statusbar_changed);
  303.  #ifdef HAVE_USBSTACK

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

comments powered by Disqus
worth-right
worth-right