1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-16 18:58:26 +02:00
Commit Graph

781 Commits

Author SHA1 Message Date
Maarten ter Huurne
e6300ab07a Changed section headers to be displayed in a circular fashion
Instead of having a list and wrapping between beginning and end, always
put the current section in the middle and show the previous and next
sections using wrap-around.
2013-08-05 14:54:42 +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
d46d8275ae Made L/R button images of the Default skin match the topBarHeight 2013-08-05 01:15:48 +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
8d7ac6e0ba Center links horizontally 2013-08-05 00:42:59 +02:00
Maarten ter Huurne
f65a59a02f Fixed scrollbar size for links area
Made sure it fills the space between the top and bottom bar. Use a one
pixel margin; I tried without margins but it didn't look nice.

Also cleaned up the paint code a bit.
2013-08-05 00:02:56 +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
Maarten ter Huurne
0046fa9e19 Made ASFont::utf8Code() a function in inputdialog.cpp instead
The implementation doesn't make sense to me, but that's something for
another day; at least it is together with the code that calls it now.
2013-08-03 22:02:50 +02:00
Maarten ter Huurne
a9b5d8bd19 Moved most Menu::loadIcons() code into Link/LinkApp classes
The code still has a lot of overlap with the other methods of Link and
LinkApp, but at least it is in the same place now.

Since this was the last outside use, setIconPath() could be declared
as 'protected'.
2013-08-02 21:24:20 +02:00
Maarten ter Huurne
40372d14ef Cleaned up Menu::loadIcons()
Most changes involve not calling the same method with the same
arguments again and again. Also use C++11 range-based loops.
2013-08-02 20:53:38 +02:00
Maarten ter Huurne
a7b31669bb Restrict access to Link::recalcCoordinates()
This method was only called from within the Link class itself.
2013-08-02 20:53:02 +02:00
Maarten ter Huurne
dd55b7290b Do not draw NULL icon
If for whatever reason no icon at all could be loaded, then skip
drawing the icon rather than crashing on the NULL pointer.
2013-08-01 14:37:56 +02:00
Maarten ter Huurne
fb8f4e6e72 The "tr1" namespace is no longer needed now that we're on C++11 2013-08-01 14:37:56 +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
fcb2618286 Open all available joysticks 2013-07-29 13:21:36 -04:00
Paul Cercueil
50b3bb2b7f Revert the log level to INFO
It was modified by error to DEBUG by commit 88f54e1ccc
2013-07-29 13:02:06 -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
9951ab2ab5 Switched to C++11 2013-07-29 12:55:58 -04:00
Paul Cercueil
152ed5cb29 Drop enum constants of unsupported button actions 2013-07-29 12:51:42 -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
b0fa6db97d Use an enum instead of hardcoded values for the user-injected codes 2013-07-21 23:52:35 -04:00
Paul Cercueil
a0515ad356 Make the file selector accept all files by default 2013-07-21 15:43:41 -04:00
Paul Cercueil
a682d10657 Load the localized title and description of an OPK if available 2013-07-20 21:21:36 -04:00
Paul Cercueil
9f29618f2e Add an ISO 639-1 code at the top of each translation file 2013-07-20 21:20:24 -04:00
Paul Cercueil
35c487a871 Clean translation files (set to Unix, remove trailing spaces...) 2013-07-20 21:15:45 -04:00
Paul Cercueil
bec8d8756f Don't prepend the mounpoint to the binary path if not inside the OPK 2013-07-19 15:25:54 -04:00
Paul Cercueil
5255bf6de3 Destroy all registered Monitor objects when the Menu is destroyed 2013-07-19 14:50:46 -04:00
Paul Cercueil
9dae4b76df Accept meta-data named *.all.desktop in OPK files
This could be used to create platform-independent packages. It can
be useful for instance in the case where the executable is a script,
or when the package points to an executable that is present on all
systems on which OPKs are supposed to run.
2013-07-19 14:41:17 -04:00
Paul Cercueil
b6dfdc6ef5 Stop watching a directory when it has been reported as removed 2013-07-19 14:35:45 -04:00
Paul Cercueil
ebce540dfc Exit the thread properly in the destructor of Monitor objects 2013-07-19 14:29:51 -04:00
Paul Cercueil
d5280ebc7b Use sigaction() instead of deprecated function signal() 2013-07-19 13:58:12 -04:00
Paul Cercueil
84a987e9d5 When loading multiple OPKs, don't order links each time one is added 2013-07-19 12:50:20 -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
69b9657af4 Add function openPackagesFromDir() to simplify constructor of Menu 2013-07-19 12:01:25 -04:00
Paul Cercueil
36c4205e0e Don't try to read OPKs in /media/./apps and /media/../apps 2013-07-19 11:57:35 -04:00
Paul Cercueil
04d9d9322d Remove trailing slash from CARD_ROOT 2013-07-19 11:54:09 -04:00
Paul Cercueil
0264b724d6 Start inotify with working mask (fixes previous commit) 2013-07-19 11:47:27 -04:00
Paul Cercueil
5e7bcf3a1f Remove all links of an "apps" dir when it is removed or renamed 2013-07-18 21:34:03 -04:00
Paul Cercueil
f308ed983b Prepare the Monitor class for proper inheritance 2013-07-18 21:32:23 -04:00
Paul Cercueil
cc869c07a8 Fix link insertion/deletion when OPKs are overwritten from SSH/FTP 2013-07-18 21:27:27 -04:00
Paul Cercueil
91f381fa07 Allow an OPK to use an icon provided by the theme 2013-07-18 17:49:33 -04:00
Paul Cercueil
bcb3e98ddc Order the links in alphabetical order 2013-07-18 17:38: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
504641a6cf Fix the function that sets the icon of a Link 2013-07-18 17:00:18 -04:00