Commit graph

40 commits

Author SHA1 Message Date
Marcin Bukat
59ba8fea22 MPIO HD200: rename button defines to adhere how they are labeled on the device.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28443 a1c6a512-1295-4272-9138-f99709370657
2010-11-02 10:44:34 +00:00
Teruaki Kawashima
53a936ab83 text viewer:
-remove 1px gap at the top and bottom of the screen to maximize the draw erea, especially for small screens.
-fix trashes on the vertical scrollbar when scrolled the column left/right.
-fix bug that vertical scrllbar sometimes goes up while scrolling down.
-don't chage displayed line after closing menu.
-use simplelist to select bookmark to make it work better.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28213 a1c6a512-1295-4272-9138-f99709370657
2010-10-06 12:35:37 +00:00
Thomas Martitz
cae4ae2c71 Second try: Introduce plugin_crt0.c that every plugin links.
It handles exit() properly, calling the handler also when the plugin returns
normally (also make exit() more standard compliant while at it).
It also holds PLUGIN_HEADER, so that it doesn't need to be in each plugin anymore.

To work better together with callbacks passed to rb->default_event_handler_ex() introduce exit_on_usb() which will call the exit handler before showing the usb screen and exit() after it.
In most cases rb->default_event_handler_ex() was passed a callback which was manually called at all other return points. This can now be done via atexit().

In future plugin_crt0.c could also handle clearing bss, initializing iram and more.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27873 a1c6a512-1295-4272-9138-f99709370657
2010-08-24 14:30:46 +00:00
Thomas Martitz
93cb949372 Revert "Introduce plugin_crt0.c that every plugin links."
Too much errors and no time to fix them now.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27863 a1c6a512-1295-4272-9138-f99709370657
2010-08-23 17:12:26 +00:00
Thomas Martitz
abdc5935be Introduce plugin_crt0.c that every plugin links.
It handles exit() properly, calling the handler also when the plugin returns
normally (also it makes exit() more standard compliant while at it).
It also holds PLUGIN_HEADER, so that it doesn't need to be in each plugin anymore.

To work better together with callbacks passed to rb->default_event_handler_ex introduce exit_on_usb() which will call the exit handler before showing the usb screen and exit() after it.
In most cases it was passed a callback which was manually called at all other return points. This can now be done via atexit().

In future plugin_crt0.c could also handle clearing bss, initializing iram and more.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27862 a1c6a512-1295-4272-9138-f99709370657
2010-08-23 16:56:49 +00:00
Teruaki Kawashima
a874f77e18 text_viewer: remove unneeded code.
viewportmanager_theme_enable() sets values to passed viewport by viewport_set_defaults(), so no need to call sb_skin_get_info_vp() or viewport_set_defaults().

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27399 a1c6a512-1295-4272-9138-f99709370657
2010-07-12 13:38:40 +00:00
Yoshihisa Uchida
771dc22aa1 text viewer: fix the statusbar is displayed when the global statusbar settings is STATUSBAR_OFF.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27349 a1c6a512-1295-4272-9138-f99709370657
2010-07-08 14:17:04 +00:00
Yoshihisa Uchida
bc46541bcd plugin api: delete sb_skin_update().
text viewer: use send_event() instead of sb_skin_update(). thanks to teru.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27348 a1c6a512-1295-4272-9138-f99709370657
2010-07-08 13:54:28 +00:00
Yoshihisa Uchida
276dfa23b6 text viewer: fixed the following bugs.
- the statusbar of the preferences is not correct when the settings file loads.
- overlaps the statusbar of the skin and default one. (FS#11455)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27334 a1c6a512-1295-4272-9138-f99709370657
2010-07-07 12:07:23 +00:00
Yoshihisa Uchida
d265bcf965 text viewer: fixed StatusBar randomly appears (FS#11455).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27293 a1c6a512-1295-4272-9138-f99709370657
2010-07-05 12:14:26 +00:00
Yoshihisa Uchida
2cdf332f01 text viewer: for tv_action and tv_bookmark, the prototype of the initializer is the same arguments as other modules.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27243 a1c6a512-1295-4272-9138-f99709370657
2010-07-02 12:16:47 +00:00
Yoshihisa Uchida
426f4c1e87 text viewer: fixed garbage data are not stored in the setting file.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27240 a1c6a512-1295-4272-9138-f99709370657
2010-07-02 11:35:28 +00:00
Yoshihisa Uchida
ea09608012 text viewer:
- if the file fits on one screen, there is no horizontal scrollbar.
- the callback function in tv_reader doesn't do useless processing when the preferences changes.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27212 a1c6a512-1295-4272-9138-f99709370657
2010-07-01 11:31:28 +00:00
Yoshihisa Uchida
6fa312b221 text viewer: the display of the statusbar is synchronized actual battery, time, etc. and deletes unnecessary lcd_set_backdrop().
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27194 a1c6a512-1295-4272-9138-f99709370657
2010-06-30 11:49:36 +00:00
Yoshihisa Uchida
470226dbbf text viewer: some members of preferences change to bool. And simplify menu setting functions.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27174 a1c6a512-1295-4272-9138-f99709370657
2010-06-29 12:23:41 +00:00
Yoshihisa Uchida
25f44c2e1f text viewer: move and delete #include.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27173 a1c6a512-1295-4272-9138-f99709370657
2010-06-29 11:37:58 +00:00
Yoshihisa Uchida
07d03729ff text_viewer: callback functions are changed to the function that returns int value.
And the text viewer quits when the problem occurs by callback functions.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27172 a1c6a512-1295-4272-9138-f99709370657
2010-06-29 11:05:36 +00:00
Yoshihisa Uchida
cf6554d891 text viewer: tv_window doesn't depend on the layout of the text viewer.
And display functions change the following.
- some functions change to static functions.
- fix the problem that font_changing flag is invalid value.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27165 a1c6a512-1295-4272-9138-f99709370657
2010-06-28 11:17:47 +00:00
Yoshihisa Uchida
668914b597 fix yellow.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27155 a1c6a512-1295-4272-9138-f99709370657
2010-06-27 11:45:12 +00:00
Yoshihisa Uchida
b5a26851e0 text viewer: display functions more changes.
- font functions move to tv_display.
- modify tv_init_display() and add tv_finalize_display().
- viewport functions are changed from global to static.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27154 a1c6a512-1295-4272-9138-f99709370657
2010-06-27 11:36:37 +00:00
Yoshihisa Uchida
1ed3aba4f2 text viewer: simplify display functions.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27152 a1c6a512-1295-4272-9138-f99709370657
2010-06-27 08:08:33 +00:00
Yoshihisa Uchida
c72d1a656b fix red.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27143 a1c6a512-1295-4272-9138-f99709370657
2010-06-26 12:27:43 +00:00
Yoshihisa Uchida
17383c2691 text viewer: some modify text viewer's layout and preferences.
- layout: hader, footer and horizontal_scrollbar add padding.
- add member 'statusbar' in tv_preferences.
- delete HD_SBAR/HD_BOTH/FT_SBAR/FT_BOTH.
- deletes the function to check header_mode/footer_mode.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27142 a1c6a512-1295-4272-9138-f99709370657
2010-06-26 12:17:01 +00:00
Yoshihisa Uchida
ac622c6d67 text viewer: reworks screen access logics and some bugs fix.
- screen access logics separte from tv_window. (new tv_display.[ch])
- using multi screen api.
- (bug fix) the head of the each line is not normally displayed when the alignment is RIGHT.
- (bug fix) unnecessary blank line is not displayed. (a part of FS#11400).
- (bug fix) the order by which callback functions were called was not correct. (FIFO->FILO)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27138 a1c6a512-1295-4272-9138-f99709370657
2010-06-26 09:14:53 +00:00
Yoshihisa Uchida
7e37fa926d text_viewer: rename preference values.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27106 a1c6a512-1295-4272-9138-f99709370657
2010-06-24 12:58:46 +00:00
Rafaël Carré
59fd2b24bd FS#11399 by me: fix r26998 for text_viewer
Restore the old behaviour:

- preferences must be read-write for tv_preferences.c , read-only for
  all other modules -> use pointer to const struct
- init functions must get the plugin buffer + its size as arguments for
  easily adding new functions -> use pointer to buffer pointer and size
  to make allocation easier
- preferences meaning is private to each file and must not be known by
  tv_preferences.c -> move tv_check_header_and_footer() back in
  tv_window.c; also avoid chaining 3 times the callbacks by calling
  tv_set_preferences() only once if more than one preference needs
  changing

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27089 a1c6a512-1295-4272-9138-f99709370657
2010-06-23 13:56:08 +00:00
Rafaël Carré
298316d192 text_viewer: cleanup & bugfix
cleanup:
    - don't use enum in struct / return values
    - don't use a getter for preferences but a global pointer
    - explicitely make enums start at 0
    - use static tables for header/footer settings
    - remove unneeded memset before strlcpy
    - use static buffer allocation, not dynamic
    - check header/footer preferences before using the callbacks
    - don't include font filename in archos player preferences (break
      file format)

bugfix:
    - statically allocate old preferences in tv_set_preferences()

Sometimes I can read a file on Clipv2, but it still aborts quite often
refs: FS#11399

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26998 a1c6a512-1295-4272-9138-f99709370657
2010-06-20 21:53:47 +00:00
Yoshihisa Uchida
a784938b78 text viewer: can select the indent spaces when the line mode is reflow.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26763 a1c6a512-1295-4272-9138-f99709370657
2010-06-11 11:13:02 +00:00
Yoshihisa Uchida
b086067f3f text viewer: fix that the return value's type is wrong.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26739 a1c6a512-1295-4272-9138-f99709370657
2010-06-10 11:24:14 +00:00
Yoshihisa Uchida
ac25812e55 fix the problem that does not jump to selected the bookmark. (FS#11386)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26738 a1c6a512-1295-4272-9138-f99709370657
2010-06-10 10:57:05 +00:00
Teruaki Kawashima
96598c61f1 text viewer: don't load font if it is the same font currently used.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26725 a1c6a512-1295-4272-9138-f99709370657
2010-06-09 14:41:24 +00:00
Yoshihisa Uchida
8bdb1c04d3 text viewer: can select "move to prev/next page" or "move to top page/bottom page" when LEFT/RIGHT key is pressed (narrow mode).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26719 a1c6a512-1295-4272-9138-f99709370657
2010-06-09 11:28:43 +00:00
Yoshihisa Uchida
88bd00903a text viewer: 1) fix uisim abends when fonts list is displayed.
2) simplify the logic to change font.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26685 a1c6a512-1295-4272-9138-f99709370657
2010-06-08 10:34:13 +00:00
Teruaki Kawashima
5a3f3a1b39 fix red.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26660 a1c6a512-1295-4272-9138-f99709370657
2010-06-07 13:10:38 +00:00
Teruaki Kawashima
d669d4ab6e text viewer: gigabeat f: add buttons to do one line up/down, and one column left/right.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26659 a1c6a512-1295-4272-9138-f99709370657
2010-06-07 13:01:15 +00:00
Teruaki Kawashima
642beb0ad4 text viewer: some fixes related to font.
* don't load font if it's not needed.
 - loading 16-GNU-Unifont seems to take some time.
* restore font to settings on exit plugin.
* don't allocate buffer on stack for name of fonts in select font menu.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26657 a1c6a512-1295-4272-9138-f99709370657
2010-06-07 12:03:30 +00:00
Yoshihisa Uchida
1ce70a679c text viewer: can selected scroll by column/scroll by screen for the horizontal screen.
Viewer Options: "Scrollbar", "Overlap Pages", "Auto-Scroll Speed" move to Scroll Settings > Vertical.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26654 a1c6a512-1295-4272-9138-f99709370657
2010-06-07 11:04:09 +00:00
Yoshihisa Uchida
240b198d65 text viewer: can display the horizontal scroll bar.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26620 a1c6a512-1295-4272-9138-f99709370657
2010-06-06 10:52:19 +00:00
Yoshihisa Uchida
1445c3b8c5 text viewer: can be selected the number of screens per page.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26613 a1c6a512-1295-4272-9138-f99709370657
2010-06-06 08:44:27 +00:00
Yoshihisa Uchida
fdba840450 reworks text viewer plugin. (FS#11209)
new text viewer plugin: text_viewer.rock.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26571 a1c6a512-1295-4272-9138-f99709370657
2010-06-05 10:30:08 +00:00