1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-20 20:05:20 +02:00
Commit Graph

547 Commits

Author SHA1 Message Date
Xiangfu Liu
46d680990a gmenu2x wallpaper only support .png 2011-08-22 15:13:44 +08:00
Ayla
8c1f4abb5b The input manager should check whether a powersaver instance is running, to not create one when it's not needed. 2011-08-17 00:46:43 +02:00
Ayla
fca8c8e8a1 Create the powersaver instance on demand and destroy it when not needed. 2011-08-17 00:46:11 +02:00
Ayla
f31828667f Added a boolean function to know if the powersaver is running. 2011-08-17 00:44:45 +02:00
Ayla
bffef7cfea GMenu2X does not need to init the audio subsystem of SDL. 2011-08-16 02:18:09 +02:00
Ayla
e282f8a55d Enable the SDL timer subsystem only if the backlight timeout is enabled. 2011-08-16 02:17:21 +02:00
Ayla
4fd4b234dc Set card root to /media by default for the Dingux port. 2011-08-11 03:42:18 +02:00
Ayla
3d3e0fa566 Read config file(s) present on both system and user-specific directories. 2011-08-11 03:40:36 +02:00
Ayla
7f08e854ea Shorted a too long caption on the contextual menu. (2) 2011-08-08 23:34:43 +02:00
Ayla
5b49bf0afb Shorted a too long caption on the contextual menu. 2011-08-08 17:40:27 +02:00
Ayla
5f77e3baf7 Cleaned GP2X-specific code that was built on all platforms.
There was a lot of gp2x-specific code which was built for
all platform. For instance, the code was compiled for all
the platforms with the constant "TARGET_GP2X" defined.
This obviously had to be fixed.
2011-07-29 01:13:35 +02:00
Ayla
f6c456f35b GMenu2X now won't clear the framebuffer on exit.
Instead, the loading screen image will remain even when GMenu2X is not running anymore.

This require a patched SDL; the patch can be found at
https://github.com/mthuurne/opendingux-buildroot/blob/opendingux-2010.11/package/sdl/sdl-fbcon-clear-onexit.patch
2011-07-28 01:48:12 +02:00
Ayla
4636a84eef Create the "sections" user directory if required, when creating a new link.
It previously assumed that this directory was present, which isn't
the case all the time.
2011-07-25 12:05:24 +02:00
Ayla
81a607c36e Fixed a good number of memory leaks.
The objects created with "new" were destroyed with "free()",
instead of "delete"; as a result, the destructors were never called.
2011-07-20 13:43:25 +02:00
Ayla
3a85cabf37 The SurfaceCollection won't load the files selection.png, bottombar.png or topbar.png from the Default skin if they are missing in the current skin. 2011-07-11 18:16:38 +02:00
Ayla
11e58c8ca5 Revert "GMenu2X now won't load skin files from the Default skin when using another skin."
This reverts commit 439d25c292.
Refusing to load files of the Default skin for a different one is a bad idea; it requires
that skin to provide every single PNG file needed by gmenu2x.
2011-07-11 18:14:27 +02:00
Ayla
00d8a04e00 Removed a bug where the Default skin was chosen even if another (working) skin was defined on the config file. 2011-07-11 12:39:31 +02:00
Ayla
0993a48eca Add a function which unlocks the virtual terminal before and after each execution of a binary.
It ensures that GMenu2X can restart after a SDL program segfaulted or crashed.
It also allow GMenu2X to exit without clearing the screen, so that the "loading" screen appears
until the launched binary starts using the framebuffer.
2011-07-11 11:27:38 +02:00
Ayla
55dad4171d Merge branch 'install_locations'
Conflicts:
	configure.in
2011-07-11 11:19:18 +02:00
Ayla
f7817b19ab The links will now be loaded from both the system and the user-specific directories. 2011-07-11 02:49:44 +02:00
Ayla
439d25c292 GMenu2X now won't load skin files from the Default skin when using another skin.
This was causing trouble when the current skin does not provide graphical files on purpose (ie. skin with no top/bottom bar).
2011-07-09 01:49:09 +02:00
Sergey Kukunin
28fe39ce54 Fix segmentation fault when try show Manual on Explorer or other service apps 2011-06-11 02:41:52 +03:00
kyak
6646525731 Zero-pad hex values when saving config
writeSkinConfig() had a very naughty bug when RGBA values were written
to config file unpadded. This lead to a problem that, for example,
0x00000080 was written as 0x00080 in config file (Somehow gmenu2x
reads and re-saves config on selection). This, in turn, led
to problem when reading skin config file in strtorgba function,
because it parses the color string in token of two symbols
(substr(0,2) and etc).
2011-06-06 11:38:26 +04:00
Maarten ter Huurne
7aeb7a4f0a PNG: Use libpng directly instead of via SDL_image.
This eliminates the build-time dependency on SDL_image and the run-time
dependencies on all libraries used by SDL_image except SDL and libpng.

In addition we now let libpng convert to ARGB format while decoding the
image, rather than letting SDL convert the surface afterwards.
2011-06-05 05:58:47 +02:00
Maarten ter Huurne
2394a075d7 Surface: Work around bug in SDL that loses per-surface alpha.
A bug in SDL_ConvertSurface() leaves the per-surface alpha undefined when
converting from RGBA to RGBA. This can cause problems if the surface is
later converted to a format without an alpha channel, such as the display
format.
2011-06-05 05:27:28 +02:00
Maarten ter Huurne
36260e999d PNG: Only add alpha channel on surface if loaded image has an alpha channel.
This fixes a bug where a loaded image could have an alpha of 0.
Also it avoids expensive alpha blending where it is unnecessary.
2011-06-03 12:47:49 +02:00
Maarten ter Huurne
8a81837c04 Surface: Make pixel format conversion explicit.
Instead of having the copy constructor convert to display format, the new
copy constructor preserves the pixel format and a separate method was
introduced to convert surfaces to display format.

The code was made more robust as well: it should no longer crash if the
wallpaper cannot be loaded.
2011-06-03 11:46:36 +02:00
Maarten ter Huurne
7861e07eb0 Surface: Made "raw" field private.
I cheated a bit by declaring ASFont as friend, but all other outside
access now happens via methods.

I removed the "saveScreenshot" method since the code calling it is
commented out and I never heard anyone complain about missing this
feature.
2011-06-02 22:44:04 +02:00
Maarten ter Huurne
25e8e62622 Surface: Minor cleanups.
Removed unused "locked" field.
Inlined format() private method: since "raw" can no longer be NULL, the method became trivial.
2011-06-02 22:32:08 +02:00
Maarten ter Huurne
52f4686e4a Surface: Load image with factory method instead of constructor.
If loading fails, the factory method returns NULL, while previously the
constructor would create a Surface object with a NULL "raw" field.
However, since most of the methods dereference "raw" without checking,
such a Surface would likely crash the application when used.
2011-06-02 22:09:03 +02:00
Maarten ter Huurne
0a9229ff3f Surface: Use the destructor as intended.
There is no reason to have an explicit free() method instead of just
destructing the Surface object and doing cleanup in the destructor.
2011-06-02 18:15:15 +02:00
Maarten ter Huurne
0c867aabbf Surface: Fixed memory leak in previous commit.
I forgot to initialize freeWhenDone in two of the three constructors.
2011-06-02 18:07:17 +02:00
Maarten ter Huurne
7dac306c16 Surface: Removed fake double buffering.
Use real double buffering instead.

I checked the SDL code and if the hardware cannot provide double buffering
it will use a shadow surface to ensure that a frame is not displayed until
it has been fully painted.

Also disable mouse cursor before opening the output surface. The reason it
was disabled after the surface was opened is that SDL on GP2X has a bug.
However, this means the cursor is visible for a short time during startup
which looks ugly.
2011-06-02 17:59:26 +02:00
Ayla
ef4b012026 Merge branch 'master' of projects.qi-hardware.com:gmenu2x into install_locations
Conflicts:
	data/platform/nanonote/sections/terminals/ash
	src/gmenu2x.cpp
	src/surface.cpp
2011-06-02 12:16:26 +02:00
Maarten ter Huurne
5b6d922f11 Fixed bug: wallpaper does not use alpha channel.
The unnecessary alpha channel might harm performance but is not a big deal.
However, the fact that the alpha flag (bool) is somehow automatically
converted by C++ into a skin name (string) causes the entire screen to
stay black.

The black screen was fixed by removing the alpha flag.
For optimum blitting performance, the wallpaper surface is then converted
to the pixel format of the frame buffer.

Bug was introduced in 52c89d6005.
2011-06-02 07:13:59 +02:00
Maarten ter Huurne
8b17e2ef62 PNG: Make loadPNG() responsible for creating an RGBA surface.
Before this commit loadPNG() could return any surface format and the caller
was responsible for converting it to the desired format. However, in practice
all callers want a surface with an alpha channel and SDL only supports that
with 32bpp surfaces, so RGBA or a permutation thereof. So I changed the
contract for loadPNG() so it is required to return an RGBA surface, and
removed the conversion code in the callers.

The next step is to replace IMG_Load() by a function that calls libpng
directly and loads a fixed 32bpp pixel format. That way, we can drop the
SDL_image dependency and avoid unnecessary pixel format conversions.
2011-06-02 06:19:21 +02:00
Maarten ter Huurne
7877fee3fa Surface: Remove alpha flag.
As for SurfaceCollection, the alpha flag passed to the Surface constructor
was also always true. Therefore there is no need to have the flag.
2011-06-02 06:02:45 +02:00
Maarten ter Huurne
44ca4e3460 SurfaceCollection: Removed alpha flag.
In the existing code the alpha flag is always true, so there is no point
in passing it around.
2011-06-02 05:52:47 +02:00
Maarten ter Huurne
af3ed78496 Merge branch 'master' of projects.qi-hardware.com:gmenu2x 2011-06-02 05:46:25 +02:00
Sergey Kukunin
240286df11 Add powersaver class 2011-06-02 06:32:39 +03:00
Maarten ter Huurne
52c89d6005 Surface: Removed duplicate constructor.
There were two constructors that took an image path, skin name and alpha flag
as their arguments, but in different orders. We need only one of them.
2011-06-02 04:57:21 +02:00
Maarten ter Huurne
b2896d6bac ASFont: Refactored string drawing methods.
Renamed methods that draw a single line from write() to writeLine().
There is now only one write() method left: the public method.

Pass surface to draw on as wrapped Surface instead of SDL_Surface.
At the end of the call chain we still use SDL directly though.
2011-06-02 04:29:19 +02:00
Maarten ter Huurne
b6a5d89bc8 Surface: Removed unused code and restricted access.
Removed all methods that are never called.
Made methods that are only called by Surface itself private.

One ugly thing remaining is outside access to the "raw" field.
2011-06-02 03:39:34 +02:00
Maarten ter Huurne
a382a425a9 ASFont: access font pixels efficiently.
Previous commit ensures that the font surface is always 32 bpp.
Therefore we can read font pixels directly through a pointer.
2011-05-12 02:10:40 +02:00
Maarten ter Huurne
41e6e4693e ASFont: only convert font surface if it is not already in a 32bpp format. 2011-05-12 01:20:26 +02:00
Maarten ter Huurne
db5ebff16f Fixed debug print.
GCC 4.5.1 has stricter checking of format strings and refused to compile this.
2011-05-11 02:31:41 +02:00
Maarten ter Huurne
8592038f95 Merge branch 'master' of projects.qi-hardware.com:gmenu2x 2011-05-11 01:37:57 +02:00
Maarten ter Huurne
bff04d2418 ASFont: removed duplication of horizontal alignment code. 2011-05-10 02:43:15 +02:00
Maarten ter Huurne
b4f3cde526 ASFont: merged SFontPlus class into ASFont class. 2011-05-10 02:37:10 +02:00
Maarten ter Huurne
1bc55392cd ASFont: cleanups in text write methods. 2011-05-10 02:23:13 +02:00
Maarten ter Huurne
ff546cdcb0 ASFont: have a single routine for computing text width that also handles newlines.
This way the text has to be scanned only once and no copying is needed.
2011-05-10 02:08:14 +02:00
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
Maarten ter Huurne
ad22a909a3 Cleaned up BrowseDialog class: removed unused methods and fields, restricted access where possible. 2010-06-19 04:08:55 +02:00
Maarten ter Huurne
3efa602af0 Do not run the main loop inside the GMenu2X constructor, but in a method. 2010-06-19 03:50:23 +02:00
Maarten ter Huurne
7a5d099ff8 Fixed order of includes in "cpu.cpp".
Using the wrong order caused the default value to be used for JZ_EXTAL.
This is the wrong value for the Dingoo A320 and for the Ben NanoNote,
but since none of the functions that use this value are called the actual
result is nothing but a warning.
2010-06-19 03:32:24 +02:00
Maarten ter Huurne
1d6ad03bff Removed ListView and ListViewItem class, since they were not used anywhere. 2010-06-19 03:21:25 +02:00
Maarten ter Huurne
9f05aaf6b9 Fixed most warnings. 2010-06-19 03:15:20 +02:00
Maarten ter Huurne
d8dd0904b8 Remove manually created Makefile, since the autotools build is now usable. 2010-06-19 02:39:38 +02:00
Maarten ter Huurne
29b827735b Enabled code specific for embedded devices and enable more warnings.
It's confusing that the macro for enabling the embedded features is named TARGET_GP2X, but that's something to fix later.
2010-06-19 02:38:14 +02:00
Maarten ter Huurne
988439605d Fixed display of card size and free space for numbers over 4 GB.
The result was stored in a 64-bit integer, but the computation was done in 32 bits...
2010-06-18 03:16:44 +02:00
Maarten ter Huurne
d3b094e1b5 Removed spaces at end of lines in source files.
No actual content was changed in this commit.
2010-06-18 03:12:58 +02:00
Maarten ter Huurne
39f01f763e Convert source files to UNIX newlines.
Most of the files were already using LF (UNIX) newlines but some were using CRLF (Windows) newlines.
2010-06-18 03:09:00 +02:00
Maarten ter Huurne
40f795391d Use the Google Sparsehash package that is included in our source tree.
Since Sparsehash consists of headers only, it is just a matter of using the right include path.
2010-06-18 02:13:05 +02:00
Maarten ter Huurne
9f21df7fed Replaced "hash_map" by "unordered_map" to get rid of deprecation warnings. 2010-06-18 00:45:16 +02:00
Maarten ter Huurne
dae5627091 Removed PXML support.
PXML is the metadata format for Pandora packages. It is not used on the
NanoNote or under Dingux.
Ideally it would be a compilation option, but without an active upstream it
would not receive any testing and therefore likely be broken. So in my
opinion it is more time efficient to remove it now and re-add if it is ever
wanted again.
2010-06-17 19:37:21 +02:00
Maarten ter Huurne
1bead23082 Let git ignore files we expect to be generated during the build. 2010-06-17 18:45:52 +02:00
Lars-Peter Clausen
6da573f303 Move methods only used by dialogs from the GMenu2x class to a common base class
for all dialog classes.
2010-05-05 14:35:52 +02:00
Lars-Peter Clausen
cb654dd520 Speed up isActive() 2010-05-05 14:35:18 +02:00
Lars-Peter Clausen
09999edc27 Initalize buffer. 2010-05-03 23:56:15 +02:00
Lars-Peter Clausen
c9c915c892 Fix out of bounds read 2010-05-03 23:53:06 +02:00
Lars-Peter Clausen
dc65381ea4 Initalise event 2010-05-03 23:44:44 +02:00
Lars-Peter Clausen
3b2538cfaf Add ButtonBox widget to simplify managing buttons in the bottombar. Also fixes some memleaks where buttons were left unfreed. 2010-05-03 22:21:36 +02:00
Lars-Peter Clausen
2a6a1f0041 filelister.cpp: Small cleanup 2010-05-03 21:14:11 +02:00
Lars-Peter Clausen
a37ed02f8f browserdialog: Better path handling. 2010-05-03 20:28:34 +02:00
Lars-Peter Clausen
7b66eb36d6 handle mouse events for browser dialog buttons 2010-05-03 20:25:08 +02:00
Lars-Peter Clausen
8b862b8398 Unify filedialog and browsedialog code 2010-05-03 19:58:28 +02:00
Lars-Peter Clausen
6361dde213 Fix menusetting widgets. 2010-05-03 19:41:45 +02:00
Lars-Peter Clausen
431e88e021 Use "/card" instead of "/card/gmenu2x" for disk stats 2010-05-03 14:21:00 +02:00
Lars-Peter Clausen
dd0c4eb72a Fix rootdir check. 2010-05-03 14:20:56 +02:00
Lars-Peter Clausen
8c31ceeb26 Fix going a dir up in the filebrowser 2010-05-03 13:45:15 +02:00
Lars-Peter Clausen
475fdb74b9 Fix topbar icon rects 2010-05-02 20:17:27 +02:00
Lars-Peter Clausen
d4490ba85c remove redundant assignments 2010-05-02 20:02:21 +02:00
Lars-Peter Clausen
7fd1ab032a Use a simple array instead of a hashmap for the colors. 2010-05-02 19:53:06 +02:00
Lars-Peter Clausen
28d3fc9ece iconbutton: Cache icon surface instead of doing serveral hashtable lookups per
frame
2010-05-02 14:52:46 +02:00
Lars-Peter Clausen
40a26e1a9c pass strings by reference where possible 2010-05-02 14:38:16 +02:00
Lars-Peter Clausen
a794a1c01a Cache current icon surface. By doing so we safe a huge number of hash map
lookups.
2010-05-01 18:55:11 +02:00
Lars-Peter Clausen
667fb05a35 Kill float and double 2010-05-01 13:20:47 +02:00
Lars-Peter Clausen
8a87e8e1ab Don't do this. It's pure evil. 2010-05-01 12:58:24 +02:00
Lars-Peter Clausen
a107dd8e46 Fix pxml.cpp compile 2010-05-01 12:48:03 +02:00
Mirko Lindner
745321edf9 remove debug output
Signed-off-by: Mirko Lindner <mirko@sharism.cc>
2010-02-22 10:22:36 +01:00
Mirko Lindner
db603afc4c rematch files to orig source
Signed-off-by: Mirko Lindner <mirko@sharism.cc>
2010-02-22 10:16:09 +01:00
Mirko Lindner
e2f5df5a43 panic changes ;)
Signed-off-by: Mirko Lindner <mirko@sharism.cc>
2010-02-22 09:16:22 +01:00
Mirko Lindner
0deb1bb177 add zear's Makefile for comparison
Signed-off-by: Mirko Lindner <mirko@sharism.cc>
2010-02-17 21:44:41 +01:00
Mirko Lindner
630fdd5de9 move sdl surface unlock behing getpixel fct
Signed-off-by: Mirko Lindner <mirko@sharism.cc>
2010-02-15 21:55:20 +01:00
Mirko Lindner
d460849575 debug output for launch error
Signed-off-by: Mirko Lindner <mirko@sharism.cc>
2010-02-15 12:05:04 +01:00
Mirko Lindner
454e080477 add prefix case
Signed-off-by: Mirko Lindner <mirko@sharism.cc>
2010-02-15 00:16:39 +01:00
Mirko Lindner
a1eb23eec1 set correct directory for disk check
Signed-off-by: Mirko Lindner <mirko@sharism.cc>
2010-02-15 00:03:31 +01:00
Mirko Lindner
cddcd72e33 initial commit - needs clean-up
Signed-off-by: Mirko Lindner <mirko@sharism.cc>
2010-02-04 12:33:47 +01:00