Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Mar 21st, 2010  |  syntax: None  |  size: 3.96 KB  |  views: 125  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Index: apps/gui/statusbar-skinned.c
  2. ===================================================================
  3. --- apps/gui/statusbar-skinned.c        (revision 25266)
  4. +++ apps/gui/statusbar-skinned.c        (working copy)
  5. @@ -85,7 +85,7 @@
  6.              success = false;
  7.          }
  8.          /* hide this viewport, forever */
  9. -        vp->hidden_flags = VP_NEVER_VISIBLE;
  10. +        vp->hidden_flags = VP_NEVER_CLEAR;
  11.      }
  12.  
  13.      if (!success && isfile)
  14. Index: apps/gui/skin_engine/skin_display.c
  15. ===================================================================
  16. --- apps/gui/skin_engine/skin_display.c (revision 25266)
  17. +++ apps/gui/skin_engine/skin_display.c (working copy)
  18. @@ -1123,11 +1123,10 @@
  19.          struct skin_viewport *skin_viewport =
  20.                          (struct skin_viewport *)viewport_list->token->value.data;
  21.          unsigned vp_refresh_mode = refresh_mode;
  22. +        unsigned hidden_flags = skin_viewport->hidden_flags;
  23.  
  24.          display->set_viewport(&skin_viewport->vp);
  25.  
  26. -        int hidden_vp = 0;
  27. -
  28.  #ifdef HAVE_LCD_BITMAP
  29.          /* Set images to not to be displayed */
  30.          struct skin_token_list *imglist = data->images;
  31. @@ -1138,19 +1137,18 @@
  32.              imglist = imglist->next;
  33.          }
  34.  #endif
  35. -        /* dont redraw the viewport if its disabled */
  36. -        if (skin_viewport->hidden_flags&VP_NEVER_VISIBLE)
  37. -        {   /* don't draw anything into this one */
  38. -            vp_refresh_mode = 0; hidden_vp = true;
  39. +        if ((hidden_flags&VP_NEVER_VISIBLE))
  40. +        {
  41. +            continue;
  42.          }
  43. -        else if ((skin_viewport->hidden_flags&VP_DRAW_HIDDEN))
  44. +        if ((hidden_flags&VP_DRAW_HIDDEN))
  45.          {
  46. -            if (!(skin_viewport->hidden_flags&VP_DRAW_WASHIDDEN))
  47. +            if (!(hidden_flags&VP_DRAW_WASHIDDEN))
  48.                  display->scroll_stop(&skin_viewport->vp);
  49.              skin_viewport->hidden_flags |= VP_DRAW_WASHIDDEN;
  50.              continue;
  51.          }
  52. -        else if (((skin_viewport->hidden_flags&
  53. +        else if (((hidden_flags&
  54.                     (VP_DRAW_WASHIDDEN|VP_DRAW_HIDEABLE))
  55.                      == (VP_DRAW_WASHIDDEN|VP_DRAW_HIDEABLE)))
  56.          {
  57. @@ -1160,7 +1158,8 @@
  58.  
  59.          if (vp_refresh_mode == WPS_REFRESH_ALL)
  60.          {
  61. -            display->clear_viewport();
  62. +            if (!(hidden_flags&VP_NEVER_CLEAR))
  63. +                display->clear_viewport();
  64.          }
  65.  
  66.          /* loop over the lines for this viewport */
  67. @@ -1179,7 +1178,7 @@
  68.              flags = line->curr_subline->line_type;
  69.  
  70.              if (vp_refresh_mode == WPS_REFRESH_ALL || (flags & vp_refresh_mode)
  71. -                || new_subline_refresh || hidden_vp)
  72. +                || new_subline_refresh)
  73.              {
  74.                  /* get_line tells us if we need to update the line */
  75.                  update_line = get_line(gwps, subline, &align,
  76. @@ -1225,7 +1224,7 @@
  77.              }
  78.  #endif
  79.  
  80. -            if (update_line && !hidden_vp &&
  81. +            if (update_line &&
  82.                  /* conditionals clear the line which means if the %Vd is put into the default
  83.                     viewport there will be a blank line.
  84.                     To get around this we dont allow any actual drawing to happen in the
  85. @@ -1254,8 +1253,7 @@
  86.              }
  87.          }
  88.          /* Now display any images in this viewport */
  89. -        if (!hidden_vp)
  90. -            wps_display_images(gwps, &skin_viewport->vp);
  91. +        wps_display_images(gwps, &skin_viewport->vp);
  92.  #endif
  93.      }
  94.  
  95. Index: apps/gui/skin_engine/wps_internals.h
  96. ===================================================================
  97. --- apps/gui/skin_engine/wps_internals.h        (revision 25266)
  98. +++ apps/gui/skin_engine/wps_internals.h        (working copy)
  99. @@ -197,6 +197,7 @@
  100.  #define VP_DRAW_WASHIDDEN   0x4
  101.  /* these are never drawn, nor cleared, i.e. just ignored */
  102.  #define VP_NEVER_VISIBLE    0x8
  103. +#define VP_NEVER_CLEAR      0x10
  104.  #define VP_DEFAULT_LABEL    '|'
  105.  #define VP_NO_LABEL         '-'
  106.  #define VP_INFO_LABEL       '_'