Maarten ter Huurne
e4b71138b9
ASFont: removed precalculation of half heights.
...
There is no point in precalculating something so cheap to recalculate.
Also, the majority of uses was to compensate for passing the wrong alignment argument.
2011-05-10 00:31:45 +02:00
Ayla
3998e19e49
The log.txt file will now be saved on the user-specific directory.
2011-05-09 19:21:14 +02:00
Maarten ter Huurne
492a36b9df
ASFont: simplified object initialization and cleanup.
...
Do initialization and cleanup in constructor and destructor respectively.
Removed constructors that are not used by gmenu2x.
2011-05-09 14:54:11 +02:00
Maarten ter Huurne
ec5d426d83
ASFont: moved SFontPlus code into ASFont source files.
...
This is in preparation of merging the classes.
2011-05-09 14:25:16 +02:00
Maarten ter Huurne
a35a7e2c35
Introduced enums for text alignment in the ASFont class.
2011-05-09 05:17:25 +02:00
Maarten ter Huurne
c54dec90f5
Minor cleanups in SFontPlus and ASFont.
...
Removed unused includes.
Avoid importing classes into default namespace in headers.
Don't use a type alias if it does not add value.
2011-05-09 04:29:59 +02:00
Maarten ter Huurne
e6be835038
Isolate all PNG loading in a separate source/header.
...
This is in preparation of replacing SDL_image with direct use of libpng.
2011-05-09 03:56:57 +02:00
Ayla
38a83dd385
On the skin menu, the ALTLEFT/ALTRIGHT buttons will now respectively decrease/increase the ARGB values by 10.
2011-04-14 19:35:50 +02:00
Ayla
6cb7ce1c0b
Fixed the renameSection() and deleteSection() functions to use the new directories. The sections can now be renamed and deleted.
2011-04-14 12:08:10 +02:00
Ayla
d0a24ac5ce
Merge branch 'install_locations' of projects.qi-hardware.com:gmenu2x into install_locations
2011-04-14 11:26:24 +02:00
Ayla
6c97139113
The FileLister won't list a file if a previous one has the same file name (without path).
...
This is useful when the files/directories lists are not cleared; then it is possible to define priorities between the files.
For instance, the skin "Default" will be shown only once, even if the directory "Default" exists both in the system and the user directories.
As the skin and translation loading functions does check both directories, there is no problem in doing that.
2011-04-14 11:16:16 +02:00
Maarten ter Huurne
c22cc4d663
Cleaned up link flags.
...
Use the flags found by "configure" and nothing more.
The hardcoded "-lpng12" broke linking with libpng 1.4.
2011-04-13 03:40:36 +02:00
Maarten ter Huurne
23042f3122
Cleaned up link flags.
...
Use the flags found by "configure" and nothing more.
The hardcoded "-lpng12" broke linking with libpng 1.4.
2011-04-13 03:36:47 +02:00
Maarten ter Huurne
f9db1fbd53
Merge remote branch 'origin/master'
2011-04-13 03:14:45 +02:00
Maarten ter Huurne
34a3d55d10
Added missing #include.
...
Fixes compile error when compiling with GCC 4.5.1.
2011-04-13 03:14:10 +02:00
Maarten ter Huurne
8995a3c196
Added missing #include.
...
Fixes compile error when compiling with GCC 4.5.1.
2011-04-13 01:51:23 +02:00
Ayla
f10bb60717
Merge branch 'master' into install_locations
2011-04-12 13:25:00 +02:00
Ayla
ba9fef5c42
The locale configuration will now be saved.
2011-04-12 13:24:35 +02:00
Ayla
12a7fe4e95
The user skin directories were not created when saving the skin.conf file; Thus it was never saved.
2011-04-12 10:19:00 +02:00
Ayla
f2b34f383b
The wallpapers will now be loaded from the system and the user-specific skin directories.
2011-04-12 10:18:10 +02:00
Ayla
f4b03108c1
The "configure skin" will now list all the skins present on the system and the user-specific directories.
2011-04-12 10:16:28 +02:00
Ayla
c18c230f7a
The translations can now be located on the system directory, or on the user-specific directory.
...
The language selector on gmenu2x's settings will list the languages present on both directories.
2011-04-12 09:59:32 +02:00
Ayla
301e16e8ee
Define a default wallpaper path, that will be chosen if no wallpaper is defined on the config.
2011-04-03 11:49:00 +02:00
Ayla
fe25cf341d
The skin images will now be loaded using SurfaceCollection::getSkinFilePath().
2011-04-03 11:45:35 +02:00
Ayla
114fe594d0
The sections directories shall now be found under the user-specific directory.
2011-04-03 11:44:08 +02:00
Ayla
8336c83129
If the "sections/" directory is missing, we create it as well as some default sections (settings, applications...).
2011-04-03 11:34:40 +02:00
Ayla
d8204706d7
The method FileLister::browse() now takes an optional boolean argument.
...
If set to "false", the previous list of files/directories won't be cleared when browsing another directory.
It will allow us to have file choosers that list files contained on different directories.
2011-04-03 11:30:25 +02:00
Ayla
3db5844f3c
The function SurfaceCollection::getSkinPath() will return the path of a skin directory from its name given as a parameter.
2011-03-30 16:15:09 +02:00
Ayla
02b54d38a3
Overloaded the function SurfaceCollection::getSkinFilePath(), so that it can also be called with a skin as parameter.
2011-03-30 16:15:09 +02:00
Ayla
d59b713e9b
Rewrote the function SurfaceCollection::getSkinFilePath() so that it'll search inside the right directories.
2011-03-30 16:15:09 +02:00
Ayla
ead9706ffd
The skin.conf file will now be loaded/written from/to the user-specific directory.
...
It will also be loaded from the system dir if missing on the user-specific directory
(For instance, when using a default theme of gmenu2x).
2011-03-30 16:15:09 +02:00
Ayla
cf42f7d192
The gmenu2x.conf file is now located on the user-specific directory.
...
If inexistant, it will be written as soon as the configuration is changed.
2011-03-30 16:15:09 +02:00
Ayla
83d6b954fb
The input.conf file will now be loaded from the user-specific directory or if missing, from the system directory.
2011-03-30 16:15:08 +02:00
Ayla
8693dff072
Added a static function GMenu2X::getHome() that returns GMenu2X's user-specific directory (usually ~/.gmenu2x).
2011-03-30 16:14:03 +02:00
Ayla
758b7b183c
The GMENU2X_SYSTEM_DIR macro on gmenu2x.h now contains the installation path of GMenu2X (default: /usr/share/gmenu2x).
2011-03-30 16:13:26 +02:00
Ayla
ec000e0214
Changed an error message, that was displaying "Error:" twice. Plus, it now more meaningful.
2011-03-30 15:44:32 +02:00
David Kühling
5300921fab
gmenu2x: make console the foreground console before launching applications
...
Emacs didn't like how it was launched before
2011-02-21 23:54:07 +01:00
Xiangfu Liu
91d3fea2ec
fixed section display not correct in ben nanonote
2011-01-13 17:20:17 +08:00
Xiangfu Liu
bfe772b690
using STDOUT_FILENO, remove tcsetpgrp
2011-01-05 22:11:54 +08:00
David Kühling
dd0709e1da
Fix problems with missing tty for launched applications
2010-12-26 17:58:22 +01:00
Xiangfu Liu
be9c6b9220
update the brightness file path to NanoNote
...
Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>
2010-11-17 17:26:34 +08:00
Ayla
69c702f88c
When adding a new link, the default brightness is now -1.
...
Note that the brightness values between -1 and 5 won't be accepted, and will be set back to 5.
2010-10-13 22:15:55 +02:00
Ayla
5cd92b76ae
The selector filters will now match also the files with an extension in uppercase.
...
Please note that the selector filters have to be entered in lowercase.
2010-10-13 22:09:43 +02:00
Ayla
ffdc8de2ac
User can now increase/decrease by 10 the values of clock, brightness etc.
2010-09-19 00:50:16 +02:00
Ayla
08468776f4
When a foo.dge file is loaded, the image file foo.png will be automatically assigned.
2010-09-18 21:28:54 +02:00
Ayla
563cb34a89
Rewrote the whole input system.
...
Gmenu2X will no longer eat 100% CPU ;)
2010-09-17 22:34:26 +02:00
Ayla
c6c3dfe8e0
Added some signal handlers, so that gmenu2x will exit correctly if a TERM signal occurs or after a segfault.
2010-09-17 22:32:41 +02:00
Ayla
7c9364780b
Replaced every message output by calls to the log macros.
2010-09-17 22:31:09 +02:00
Ayla
7d0c0e958c
Adding a new file, debug.h, containing useful macros to output information:
...
DEBUG, INFO, WARNING, ERROR. The log level can be set using the LOG_LEVEL define.
2010-09-17 22:28:23 +02:00
bartbes
5c05348ba9
Automatically switches CARD_ROOT to / when CARD_ROOT doesn't exist
2010-09-01 22:50:43 +02:00
bartbes
cf9628a4cc
More fixed for when CARD_ROOT doesn't exist
2010-09-01 22:11:24 +02:00
bartbes
6381674f57
Fixed segfault when CARD_ROOT didn't exist & added _CARD_ROOT
...
compile-time define to set CARD_ROOT
Note that you shouldn't set CARD_ROOT (or _CARD_ROOT) to /, because that
might mess things up.
2010-09-01 17:37:27 +02:00
bartbes
e9941dc4fd
Now only allows file browsing up to /, CARD_ROOT is /card/
2010-08-03 17:49:34 +02:00
bartbes
ba9af53c21
Changed the file browser to use / as root and added ability to see extensionless files (i.e. executables)
2010-08-03 17:32:54 +02:00
Maarten ter Huurne
b54a595e26
Improved conversion from color enum to string and vice versa.
...
The stringToColor() and colorToString() methods were changed into file-scope functions, so they can be inlined by the compiler.
The colorNames array is now used for lookups in both directions, removing duplication of the color names.
The missing "selectionBg" entry was added to the colorNames array.
2010-07-28 16:15:52 +02:00
Maarten ter Huurne
c91a190f28
Remove support for exceptions.
...
This reduces the binary size by almost 150K.
2010-07-28 03:55:00 +02:00
Maarten ter Huurne
599628fa38
Remove Google sparsehash library.
...
GMenu2X now uses tr1::unordered_map instead, which results in a much smaller binary.
The Google library might have its uses when high performance is required, but for us a smaller binary is more important since that reduces startup time.
2010-07-28 03:37:40 +02:00
Maarten ter Huurne
4ddc189847
Use tr1::unordered_map instead of google::dense_hash_map in class GMenu2X.
...
This reduces the binary size by about 260K.
2010-07-28 03:31:41 +02:00
Maarten ter Huurne
4dade329f7
Use tr1::unordered_map instead of google::dense_hash_map in SurfaceCollection.
...
This reduces the binary size by about 45K.
2010-07-28 03:16:40 +02:00
Maarten ter Huurne
c84fea65a2
Minimize namespace pollution by SurfaceCollection class.
2010-07-28 03:13:27 +02:00
Maarten ter Huurne
d082f7f280
Minimize namespace pollution in MenuSetting class hierarchy.
...
This should be done for all source files, but it is too much to do all at once.
2010-07-28 02:36:46 +02:00
Maarten ter Huurne
961e030670
Made MenuSettingMultiString a subclass of MenuSettingStringBase.
2010-07-28 02:06:49 +02:00
Maarten ter Huurne
44bed79d5c
Give adjustInput() an empty default implementation and remove empty overrides.
...
Again a slight reduction in binary size.
2010-07-28 01:52:05 +02:00
Maarten ter Huurne
d1d55a7666
Added MenuSettingStringBase, an abstract base class for MenuSettingString, MenuSettingFile and MenuSettingDir.
...
This removes a lot of duplicate source code and also decreases the binary size slightly.
2010-07-28 01:46:32 +02:00
Maarten ter Huurne
9d05af2881
Removed duplicate code between MenuSettingFile and its MenuSettingImage subclass.
...
Also performed some cosmetic fixes.
2010-07-28 00:54:00 +02:00
Maarten ter Huurne
ac30153cfc
Declared methods abstract where possible; moved destructor implementation out of header.
...
Together this reduces the binary size by about 7.5K on mipsel.
2010-07-28 00:38:47 +02:00
Maarten ter Huurne
eff06b0319
Remove code duplication between the two constructors of MenuSettingBool.
2010-07-27 23:45:53 +02:00
Maarten ter Huurne
9fcaa2b8fa
Give LinkApp a direct reference to the InputManager object instead of fetching it from the GMenu2X object.
2010-07-27 23:22:46 +02:00
Maarten ter Huurne
0ce743426a
Give SettingsDialog a direct reference to the Touchscreen and InputManager objects instead of fetching them from the GMenu2X object.
2010-07-27 23:09:16 +02:00
Maarten ter Huurne
d03dbea9bd
Give InputDialog a direct reference to the Touchscreen and InputManager objects instead of fetching them from the GMenu2X object.
2010-07-27 22:56:03 +02:00
Maarten ter Huurne
4468464505
Give Button a direct reference to the Touchscreen object instead of fetching it from the GMenu2X object.
2010-07-27 22:12:28 +02:00
Maarten ter Huurne
8032d96a17
Converted public fields of FileLister to private.
2010-07-27 21:41:35 +02:00
Maarten ter Huurne
0c6e23e869
Converted public fields of InputManager to private.
2010-07-27 21:29:06 +02:00
Maarten ter Huurne
0cd6b8264c
Converted public fields of LinkApp to private.
...
Although exposing a read/write reference to a private field is not much better than having a public field.
Well, at least we are explicit about the nasty stuff now.
2010-07-27 21:26:02 +02:00
Maarten ter Huurne
8a9aac028b
Converted public fields of Menu to private.
2010-07-27 21:12:15 +02:00
Maarten ter Huurne
b718658bf1
Converted public fields of MenuSetting to private.
2010-07-27 21:01:52 +02:00
Maarten ter Huurne
8f98a4b135
Converted public fields of MessageBox to private.
2010-07-27 20:59:28 +02:00
Maarten ter Huurne
4de52ca2a1
Converted public fields of MenuSettingInt to private.
2010-07-26 06:02:37 +02:00
Maarten ter Huurne
40ead3b642
Converted public fields of InputDialog to private.
2010-07-26 05:58:06 +02:00
Maarten ter Huurne
07bad5ade1
Removed unused field from class Button.
2010-07-26 05:51:09 +02:00
Maarten ter Huurne
0586595de5
Converted public fields of Selector to private.
2010-07-26 05:47:46 +02:00
Maarten ter Huurne
b78ffa704a
Converted public fields of Touchscreen to private.
2010-07-26 05:45:56 +02:00
Maarten ter Huurne
ea7b4ec002
Removed unused field.
2010-07-26 05:08:56 +02:00
Maarten ter Huurne
43b7c3db78
Removed unnecessary "using" statements.
...
These classes don't use any vectors.
2010-07-26 04:45:50 +02:00
Maarten ter Huurne
1237c59cfe
FileDialog must only pick regular files.
...
Thanks to Ayla for finding and fixing.
2010-07-26 04:43:03 +02:00
Maarten ter Huurne
4738f4b232
Make sure confirm() actually confirms.
...
The "result" field was never set to true.
The only way it could be true was because the uninitialized value happened to be non-zero.
Thanks to Ayla for this fix.
2010-07-26 04:31:16 +02:00
Maarten ter Huurne
727d9e95d5
Fixed missing field initialization.
...
The "close" field was read before it was written.
Thanks to Ayla for this fix.
2010-07-26 04:29:38 +02:00
Maarten ter Huurne
07fa091859
Fixed uninitialized field.
...
Thanks to Ayla for finding this bug.
2010-07-26 04:08:56 +02:00
Maarten ter Huurne
90df129f66
Initialize field using init syntax instead of assignment.
...
No functional change.
2010-07-26 03:36:55 +02:00
Maarten ter Huurne
5f45c67bb5
Remove unnecessary overridden field that was not initialized.
...
The "gmenu2x" field is protected in Dialog, so use that.
Thanks to Ayla for debugging this.
2010-07-26 03:34:42 +02:00
Maarten ter Huurne
0a1fdf2c12
Fixed typo.
2010-07-26 02:48:23 +02:00
Maarten ter Huurne
767c131b1d
Adapted backlight setting to new kernel interface.
...
Updated path to use /sys instead of /proc/jz.
Avoid leading zeroes, since sysfs interprets those as octal numbers.
2010-07-12 02:03:50 +02:00
Maarten ter Huurne
28a041ea80
Add constant for SD card root.
...
In the future, this should be part of a device abstraction, but having a single constant is an improvement over having duplicated string literals.
2010-07-04 03:19:52 +02:00
Maarten ter Huurne
7fb67ba1cc
Set CPU frequency through sysfs.
...
No more poking into registers via /dev/mem.
If there is no cpufreq support in the kernel, when trying to change the frequency a message will be printed on stderr that the required sysfs file cannot be opened.
2010-07-04 03:04:42 +02:00
Ulrich Hecht
ac2fa73962
don't waste CPU redrawing the screen when there's no input
...
Signed-off-by: Ulrich Hecht <ulrich.hecht@gmail.com>
2010-06-20 18:36:42 +02:00
Maarten ter Huurne
c52b239bc0
Fixed intendation.
2010-06-19 05:10:19 +02:00
Maarten ter Huurne
5db8ac8038
Removed SelectorDetector class, since it is not used.
2010-06-19 05:04:26 +02:00
Maarten ter Huurne
9c5799c842
Add explicit destructor to BrowseDialog.
...
There is no point adding virtual destructors to the subclasses if the superclass has a non-virtual default destructor...
2010-06-19 04:51:53 +02:00
Maarten ter Huurne
660b4f01aa
In "utilities.h", only include those headers that are needed by the definitions in "utilities.h".
2010-06-19 04:44:03 +02:00
Maarten ter Huurne
6ec61558e9
Removed SDL_ttf and FreeType from the libraries to link with, since there is no code that uses these libs.
2010-06-19 04:31:35 +02:00