Maarten ter Huurne
de30b3f98f
Define LinkApp::isOpk() also when OPK support is disabled
...
This reduces the number of required preprocessor directives, leading to
more readable code and more code being examined by the compiler (useful
to spot problems). Since the method is inlined, the compiler should be
able to eliminate the same amount of code that the preprocessor would,
only at a later stage of the compilation.
2013-08-12 00:13:18 +02:00
Maarten ter Huurne
271ef00c18
Call Menu::selLinkApp() only once in GMenu2X::editLink()
2013-08-12 00:08:28 +02:00
Maarten ter Huurne
76117663ff
Converted the context menu to a Layer
...
This fixes a bug with the captured background being wrong when using
double buffering. Also it ensures that for example the clock in the
status bar is updated when the context menu is open.
2013-08-11 23:46:04 +02:00
Maarten ter Huurne
945e29986a
Cleaned up GMenu2X::contextMenu()
2013-08-11 20:57:13 +02:00
Maarten ter Huurne
f414ce4685
Allow layers to play animations
2013-08-11 01:35:43 +02:00
Maarten ter Huurne
71f4391cda
Moved all code for opening the context menu into the Menu class
...
All of the entries in the context menu affect sections and links, so
the context menu should be considered part of the main menu, not of
the global / background context.
2013-08-09 19:09:57 +02:00
Maarten ter Huurne
3f299f62b6
Set initial key repeat delay to a more sensible value
...
Previously it was set to 1 ms, which in practice means "as fast as
you can" and leads to a lot of unintended repeats.
2013-08-09 18:18:51 +02:00
Maarten ter Huurne
346067896a
Put background painting and global keys in new Background layer
...
The battery status was put into a separate class instead of directly
into the Background class.
2013-08-09 18:01:51 +02:00
Maarten ter Huurne
a15339d425
Cleanups of Clock class
...
Don't make Clock a singleton. While there should be no reason to
instantiate this class more than once, there is no problem with doing
that either. Removing the singleton makes it easier to control access
to the instance. It also avoids the rather nasty construct that was
used to delete it.
Make sure the timer callback function is a proper C function, since
SDL is a C library. This requires some trickery to be able to call
a private method from the callback, but I found a way using an
intermediate nested class. The compiler should be able to inline this
to eliminate any overhead.
Also some minor cleanups.
2013-08-07 02:55:23 +02:00
Maarten ter Huurne
f71ea3bcee
Call Menu::skinUpdated() earlier in initMenu()
...
That method initializes linkColumns, which is divided by in
setLinkIndex().
2013-08-06 19:59:35 +02:00
Maarten ter Huurne
63029d85d7
Use shared_ptr for layers
...
This allows transient layers to be deleted automatically when they are
dismissed, while persistent layers will be kept alive by their other
owner(s).
2013-08-06 02:34:03 +02:00
Maarten ter Huurne
6d868a895a
Implemented layer system for painting and events
...
The long term goal is to be able to use a single event loop regardless
of which submenu or alternative mode is active.
2013-08-06 01:55:32 +02:00
Maarten ter Huurne
074668336e
Handle menu-related buttons inside Menu class
2013-08-05 16:43:22 +02:00
Maarten ter Huurne
903ccc2cfe
Switch from mega to giga when showing large disk/card sizes
...
Also made our use of 1024-based prefixes explicit by using MiB/GiB.
2013-08-05 02:02:04 +02:00
Maarten ter Huurne
bdf3cfdf86
Moved linkColumns and linkRows fields into Menu class
2013-08-05 00:51:36 +02:00
Maarten ter Huurne
41b0551595
Moved menu touch handling code into Menu class
2013-08-04 23:19:15 +02:00
Maarten ter Huurne
1eeba171dd
Moved menu painting code into Menu class
2013-08-04 21:14:29 +02:00
Maarten ter Huurne
cbe7735f73
Put main loop painting code in separate methods
...
Also declare the relevant variables with a reduced scope, where
possible.
2013-08-04 03:47:23 +02:00
Maarten ter Huurne
f8dc4c7bb8
Don't construct non-functional Font objects
...
Replaced Font constructor with factory method, so that if the TTF
cannot be loaded, the Font object is not constructed. The normal C++
way of handling this is with exceptions, but we're compiling with
-fno-exceptions.
2013-08-04 00:58:32 +02:00
Maarten ter Huurne
724aefe482
Renamed ASFont class to just Font
...
Originally the font implementation was based on SFont, but it was
recently replaced by an SDL_ttf based implementation, so the name
no longer made sense.
2013-08-03 22:30:12 +02:00
Paul Cercueil
de9b3cd27d
Make sure the joystick subsystem is inited before InputManager starts
2013-07-29 16:54:12 -04:00
Paul Cercueil
88f54e1ccc
Drop incredibly dirty and huge file FastDelegate.h
...
It's way too over-engineered for what we need to do, and we can
do much simpler using C++11.
2013-07-29 12:58:25 -04:00
Paul Cercueil
e0109dfe55
Initialize the timers subsystem of SDL at the beginning
...
This fixes a bug where disabling the backlight timeout would
prevent the clock from working correctly.
2013-07-22 00:20:18 -04:00
Paul Cercueil
47bbc0b673
Added a clock on the bottom bar
2013-07-21 23:54:09 -04:00
Paul Cercueil
d5280ebc7b
Use sigaction() instead of deprecated function signal()
2013-07-19 13:58:12 -04:00
Paul Cercueil
41e4cff7ac
Add a MediaMonitor, which will watch CARD_ROOT for mountpoints
...
Each time a directory will appear in CARD_ROOT, the MediaMonitor
will try to load all OPKs found in CARD_ROOT/${directory}/apps
2013-07-19 12:37:56 -04:00
Paul Cercueil
04d9d9322d
Remove trailing slash from CARD_ROOT
2013-07-19 11:54:09 -04:00
Paul Cercueil
9029deceeb
Fix translations in user directory not correctly loaded
2013-07-18 17:14:21 -04:00
Paul Cercueil
32d100ee2a
Change the "GMenu2X starting" message
...
It contained outdated instructions.
2013-07-18 17:03:01 -04:00
Paul Cercueil
13b3d8e0ca
Monitor OPK folders using inotify and automatically add/delete links
2013-07-16 13:36:18 -04:00
Paul Cercueil
1337eb5ed8
Update filter of manual selection dialog to *.man.png *.txt
2013-07-08 12:21:43 -04:00
Paul Cercueil
ca811ea43d
Match only *.png files for the application icon selector
2013-07-08 12:20:30 -04:00
Paul Cercueil
e1968c3830
Add *.elf to the filter of the explorer and the "add link" dialog
2013-07-08 02:27:53 -04:00
Paul Cercueil
aa8b21e076
Update file extension filter for manually added applications
...
Updated to *.bin *.dge *.sh *.py and extension-less files.
2013-07-08 02:24:55 -04:00
Paul Cercueil
9737810bcb
Remove the "unlock VT" feature; it has been moved to its own program
2013-07-05 17:51:59 -04:00
Paul Cercueil
3558dfbfa2
Fix extension filters of the Explorer
...
It will now list files without extension, *.bin, *.sh, *.dge, and
*.py files.
2013-07-05 14:48:13 -04:00
Paul Cercueil
46386a2054
Drop the bitmap font; use a TTF font instead
...
This allows to display UTF-8 characters, and is as such a good
step towards full internationalization.
2013-07-05 14:07:46 -04:00
Paul Cercueil
a0690ba59e
Remove useless clipper
2013-06-16 20:52:20 -04:00
Paul Cercueil
4347c340a6
Align the links the same way whether or not a scrollbar is present
...
Previously, when a scrollbar was present, the links were starting
at a different X position than without the scrollbar.
2013-06-16 20:48:37 -04:00
Maarten ter Huurne
e4d78bee60
Made GMenu2X::menu private
...
There was only one outside use; turned that into a new public method
on the GMenu2X class.
2012-12-20 22:01:30 +01:00
Paul Cercueil
f2e3efd359
Hide the 'Edit' option if there's nothing to configure
2012-12-08 01:59:11 -03:00
Paul Cercueil
a60d97fbff
Hide the selector dir/browser link options if OPK doesn't open a file
2012-12-08 01:45:21 -03:00
Paul Cercueil
c9fc163bea
Add --disable-cpufreq switch to disable clock management
2012-12-08 01:03:33 -03:00
Paul Cercueil
473949bb4f
Remove hardcoded MHz values, use the defined main/max clocks instead
2012-12-06 20:53:39 -03:00
Paul Cercueil
389253b4c6
Load the skin's wallpaper if the default one is not yet defined
2012-12-04 14:21:22 -03:00
Paul Cercueil
6629a63871
Renamed 'dingux' platform to 'a320'
...
Dingux being now replaced by OpenDingux, which covers other platforms
than the A320, the platform corresponding to the A320 is now named
accordingly.
2012-11-27 02:14:08 -03:00
Paul Cercueil
d4c086a64d
Add initial support for the GCW Zero
2012-11-18 18:41:20 -03:00
Paul Cercueil
77046f3553
Add support for reading manuals located inside OPK archives
2012-11-11 19:47:45 -03:00
Paul Cercueil
df981eb03a
Drop the 'remove link' option on the context menu of OPKs
2012-10-23 06:45:56 +02:00
Paul Cercueil
4c4f452abb
Hide parameters not suitable for OPKs on the context menu
2012-10-23 06:33:27 +02:00