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

Anonymous
Sunday, July 22nd, 2007 at 11:37:43am UTC 

  1. Index: apps/lang/english.lang
  2. ===================================================================
  3. --- apps/lang/english.lang      (révision 13956)
  4. +++ apps/lang/english.lang      (copie de travail)
  5. @@ -3199,13 +3199,13 @@
  6.    desc: Backlight behaviour setting
  7.    user:
  8.    <source>
  9. -    *: "First Keypress Enables Backlight Only"
  10. +    *: "Keypress effects when backlight is off"
  11.    </source>
  12.    <dest>
  13. -    *: "First Keypress Enables Backlight Only"
  14. +    *: "Keypress effects when backlight is off"
  15.    </dest>
  16.    <voice>
  17. -    *: "First Keypress Enables Backlight Only"
  18. +    *: "Keypress effects when backlight is off"
  19.    </voice>
  20.  </phrase>
  21.  <phrase>
  22. @@ -11048,3 +11048,65 @@
  23.      *: "Can't write to recording directory"
  24.    </voice>
  25.  </phrase>
  26. +<phrase>
  27. +  id: LANG_BACKLIGHT_FILTER_MODE0
  28. +  desc: Backlight behaviour setting
  29. +  user:
  30. +  <source>
  31. +    *: "All: BL & action"
  32. +  </source>
  33. +  <dest>
  34. +    *: "All: BL & action"
  35. +  </dest>
  36. +  <voice>
  37. +    *: "All: BL & action"
  38. +  </voice>
  39. +</phrase>
  40. +<phrase>
  41. +  id: LANG_BACKLIGHT_FILTER_MODE1
  42. +  desc: Backlight behaviour setting
  43. +  user:
  44. +  <source>
  45. +    *: "All: BL & no action"
  46. +  </source>
  47. +  <dest>
  48. +    *: "All: BL & no action"
  49. +  </dest>
  50. +  <voice>
  51. +    *: "All: BL & no action"
  52. +  </voice>
  53. +</phrase>
  54. +<phrase>
  55. +  id: LANG_BACKLIGHT_FILTER_MODE2
  56. +  desc: Backlight behaviour setting
  57. +  user:
  58. +  <source>
  59. +    *: "Select: BL, others: action & BL"
  60. +    h300: "NAVI: BL, others: action & BL"
  61. +  </source>
  62. +  <dest>
  63. +    *: "Select: BL, others: action & BL"
  64. +    h300: "NAVI: BL, others: action & BL"
  65. +  </dest>
  66. +  <voice>
  67. +    *: "Select: BL, others: action & BL"
  68. +    h300: "NAVI: BL, others: action & BL"
  69. +  </voice>
  70. +</phrase>
  71. +<phrase>
  72. +  id: LANG_BACKLIGHT_FILTER_MODE3
  73. +  desc: Backlight behaviour setting
  74. +  user:
  75. +  <source>
  76. +    *: "Select: BL, Mode: action & BL, others: action"
  77. +    h300: "NAVI: BL, A-B: action & BL, others: action"
  78. +  </source>
  79. +  <dest>
  80. +    *: "Select: BL, Mode: action & BL, others: action"
  81. +    h300: "NAVI: BL, A-B: action & BL, others: action"
  82. +  </dest>
  83. +  <voice>
  84. +    *: "Select: BL, Mode: action & BL, others: action"
  85. +    h300: "NAVI: BL, A-B: action & BL, others: action"
  86. +  </voice>
  87. +</phrase>
  88. Index: apps/settings.h
  89. ===================================================================
  90. --- apps/settings.h     (révision 13956)
  91. +++ apps/settings.h     (copie de travail)
  92. @@ -634,7 +634,7 @@
  93.      bool party_mode;    /* party mode - unstoppable music */
  94.      
  95.  #ifdef HAVE_BACKLIGHT
  96. -    bool bl_filter_first_keypress;   /* filter first keypress when dark? */
  97. +    int bl_filter_first_keypress;   /* filter first keypress when dark? */
  98.  #ifdef HAVE_REMOTE_LCD
  99.      bool remote_bl_filter_first_keypress; /* filter first remote keypress when remote dark? */
  100.  #endif
  101. Index: apps/settings_list.c
  102. ===================================================================
  103. --- apps/settings_list.c        (révision 13956)
  104. +++ apps/settings_list.c        (copie de travail)
  105. @@ -533,9 +533,9 @@
  106.  #endif
  107.  
  108.  #ifdef HAVE_BACKLIGHT
  109. -    OFFON_SETTING(0,bl_filter_first_keypress,
  110. -        LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS, false,
  111. -        "backlight filters first keypress", NULL),
  112. +    {F_T_INT,GS(bl_filter_first_keypress), LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS,
  113. +            INT(0),"backlight filters first keypress",
  114. +            "mode0,mode1,mode2,mode3",UNUSED},
  115.  #ifdef HAVE_REMOTE_LCD
  116.      OFFON_SETTING(0,remote_bl_filter_first_keypress,
  117.          LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS, false,
  118. Index: firmware/export/button.h
  119. ===================================================================
  120. --- firmware/export/button.h    (révision 13956)
  121. +++ firmware/export/button.h    (copie de travail)
  122. @@ -34,7 +34,7 @@
  123.  void button_set_flip(bool flip); /* turn 180 degrees */
  124.  #endif
  125.  #ifdef HAVE_BACKLIGHT
  126. -void set_backlight_filter_keypress(bool value);
  127. +void set_backlight_filter_keypress(int value);
  128.  #ifdef HAVE_REMOTE_LCD
  129.  void set_remote_backlight_filter_keypress(bool value);
  130.  #endif
  131. Index: firmware/drivers/button.c
  132. ===================================================================
  133. --- firmware/drivers/button.c   (révision 13956)
  134. +++ firmware/drivers/button.c   (copie de travail)
  135. @@ -53,7 +53,7 @@
  136.  static bool flipped;  /* buttons can be flipped to match the LCD flip */
  137.  #endif
  138.  #ifdef HAVE_BACKLIGHT
  139. -static bool filter_first_keypress;
  140. +static int filter_first_keypress;
  141.  #ifdef HAVE_REMOTE_LCD
  142.  static bool remote_filter_first_keypress;
  143.  #endif
  144. @@ -82,6 +82,7 @@
  145.      static bool post = false;
  146.  #ifdef HAVE_BACKLIGHT
  147.      static bool skip_release = false;
  148. +    bool turn_backlight_on = true;
  149.  #ifdef HAVE_REMOTE_LCD
  150.      static bool skip_remote_release = false;
  151.  #endif
  152. @@ -236,14 +237,42 @@
  153.                      }
  154.                      else
  155.  #endif
  156. -                        if (!filter_first_keypress || is_backlight_on()
  157. +                        if (is_backlight_on()
  158.  #if BUTTON_REMOTE
  159.                                  || (btn&BUTTON_REMOTE)
  160.  #endif
  161.                             )
  162. +                        {
  163.                              queue_post(&button_queue, btn, 0);
  164. +                        }
  165.                          else
  166. +                        {
  167. +                            switch (filter_first_keypress)
  168. +                            {
  169. +                                case 0:
  170. +                                    queue_post(&button_queue, btn, NULL);
  171. +                                    break;
  172. +                                case 1:
  173. +                                    skip_release = true;
  174. +                                    break;
  175. +                                case 2:
  176. +                                    if (btn == BUTTON_SELECT)
  177. +                                        skip_release = true;
  178. +                                    else
  179. +                                        queue_post(&button_queue, btn, NULL);
  180. +                                    break;
  181. +                                case 3:
  182. +                                    if (btn == BUTTON_SELECT)
  183.                              skip_release = true;
  184. +                                    else
  185. +                                    {
  186. +                                        if (btn != BUTTON_MODE)
  187. +                                            turn_backlight_on = false;
  188. +                                        queue_post(&button_queue, btn, NULL);
  189. +                                    }
  190. +                                    break;
  191. +                            }
  192. +                        }
  193.  #else /* no backlight, nothing to skip */
  194.                      queue_post(&button_queue, btn, 0);
  195.  #endif
  196. @@ -254,11 +283,13 @@
  197.                      remote_backlight_on();
  198.                  else
  199.  #endif
  200. +                    if (turn_backlight_on)
  201. +                    {
  202.                      backlight_on();
  203. -
  204.                  reset_poweroff_timer();
  205.              }
  206.          }
  207. +        }
  208.          else
  209.          {
  210.              repeat = false;
  211. @@ -352,7 +383,7 @@
  212.      flipped = false;
  213.  #endif
  214.  #ifdef HAVE_BACKLIGHT
  215. -    filter_first_keypress = false;
  216. +    filter_first_keypress = 0;
  217.  #ifdef HAVE_REMOTE_LCD
  218.      remote_filter_first_keypress = false;
  219.  #endif   
  220. @@ -424,7 +455,7 @@
  221.  #endif /* HAVE_LCD_BITMAP */
  222.  
  223.  #ifdef HAVE_BACKLIGHT
  224. -void set_backlight_filter_keypress(bool value)
  225. +void set_backlight_filter_keypress(int value)
  226.  {
  227.      filter_first_keypress = value;
  228.  }
  229. Index: uisimulator/sdl/button.c
  230. ===================================================================
  231. --- uisimulator/sdl/button.c    (révision 13956)
  232. +++ uisimulator/sdl/button.c    (copie de travail)
  233. @@ -52,7 +52,7 @@
  234.  #ifdef HAVE_BACKLIGHT
  235.  static bool filter_first_keypress;
  236.  
  237. -void set_backlight_filter_keypress(bool value)
  238. +void set_backlight_filter_keypress(int value)
  239.  {
  240.      filter_first_keypress = value;
  241.  }

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
worth-right