1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-07-02 18:47:19 +03:00
Commit Graph

136 Commits

Author SHA1 Message Date
Maarten ter Huurne
9c497e7867 Remove "don't leave" feature
If the application in question daemonizes, it will continue running
no matter whether we start it with system() or execlp(). So I don't
see a reason for this feature to exist and removing it means less
code paths to worry about.
2013-08-14 11:47:28 +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
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
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
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
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
91f381fa07 Allow an OPK to use an icon provided by the theme 2013-07-18 17:49:33 -04:00
Paul Cercueil
c58b3a535e Update GMenu2X to use the latest libopk v1.0 API 2013-05-26 19:06:53 -04:00
Paul Cercueil
2cef732602 Fix crash occuring when an unknown MIME type is specified in OPK 2013-04-19 14:25:23 -03:00
Maarten ter Huurne
bcbedc8f40 Updated code calling opk_extract_file().
I changed the return type from char* to void* in libopk, now updating
the gmenu2x code to match.
2013-02-05 19:05:44 +01: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
610b489d51 Add support of text manuals (.man.txt files) inside OPK archives 2012-12-08 04:26:48 -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
efdf766102 Enable support for multiple .desktop for one platform inside OPKs 2012-11-29 23:44:58 -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
c6a83e1ed7 Open OPKs only if compatible with the current platform 2012-11-18 18:52:23 -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
8d96f3c261 Update to use the latest libopk API, and simplify loadPNG 2012-11-05 18:48:48 -03:00
Paul Cercueil
0b922e97f3 For non-OPK programs, chdir() to the app's directory as well 2012-10-23 16:34:01 +02:00
Paul Cercueil
b8112d1a73 Fix a bug where having multiple MIME types would crash GMenu2X 2012-10-23 16:19:00 +02:00
Paul Cercueil
64eb86f8e8 Default the 'browser' option to 'true'.
This permits the 'browser' option to be saved for OPK packages
as well.
2012-10-23 06:39:51 +02:00
Paul Cercueil
dec1a8956a Assign an icon for a given link only if it hasn't been done before 2012-10-23 06:20:03 +02:00
Paul Cercueil
c94968f533 Memorize the selector's directory as the default one for later use
When a app is launched with a file selected with the built-in file
selector, we memorize the directory on which the file was found,
so that a future launch of that application will directly open
that directory.
2012-10-23 05:34:21 +02:00
Paul Cercueil
a04b9e3ab3 Save changes made on the link of an OPK on the user directory. 2012-10-23 05:32:48 +02:00
Paul Cercueil
5f1cff6d0f Build file extensions filter from the MIME types present on the OPK
This feature is enabled only if libxdgmime is available.
2012-10-22 23:40:09 +02:00
Paul Cercueil
e7e21b424b Use the '%f' token to insert the selected file on the params.
Other tokens available are '%F', '%u' and '%U'.
It replaces the previous token '[selFile]'.
2012-10-22 23:34:33 +02:00
Paul Cercueil
d6cdb90c81 Before launching any app, update the standard I/O file descriptors 2012-10-20 17:32:17 +02:00
Paul Cercueil
6a9f429f32 Update "exec" to aim the binary if a change of directory if needed 2012-10-17 23:48:11 +02:00
Paul Cercueil
0ddc562bf1 Fix icon not appearing on loading menu of OPK packages based links 2012-10-17 23:43:44 +02:00
Paul Cercueil
170a7dc4c6 Add "editable" parameter: when "false", the link can't be modified.
If omitted, the default value is "true".
2012-10-17 23:43:32 +02:00
Paul Cercueil
4a60aa000d Load the OPK in the section defined by their "Categories" parameter 2012-10-09 01:41:57 +02:00
Paul Cercueil
ef18841eb1 Fix build when libopk is not present. 2012-10-08 19:46:50 +02:00
Paul Cercueil
f6c19d0aa1 Mount the OPK packages in order to execute the binary included. 2012-10-08 08:22:48 +02:00
Paul Cercueil
909fef2f3a Update to use the latest libopk API. 2012-10-08 08:19:59 +02:00
Paul Cercueil
876f2cff86 Fix a bug where only some parameters were read from the links files. 2012-10-08 06:09:37 +02:00
Paul Cercueil
61d22e26e6 LinkApp: Added support for reading OPK packages. 2012-10-07 21:50:07 +02:00
Paul Cercueil
1241523105 Removed variable/function to get the directory of the executable.
The application shouldn't care from which directory it is being
executed.
2012-06-24 23:19:45 +02:00
Paul Cercueil
a21650d6b3 Don't re-execute gmenu2x on error, just call main() again. 2012-06-24 23:01:28 +02:00
Paul Cercueil
9263c782e7 Drop GP2X platform support.
The GP2X build was unused and totally broken.
2012-06-14 23:45:57 +02:00
Paul Cercueil
1080527822 Don't log the console-based apps. 2012-06-14 17:39:59 +02:00
Paul Cercueil
d1328d791c Switch to tty1 for console apps (Dingux build only).
Console apps are always launched on tty1. However it can occur that
the console displayed on the framebuffer is another one, so we have
to explicitely activate tty1.
2012-04-18 01:35:46 +02:00
Paul Cercueil
e6ca072c46 Added a "show console" link parameter (Dingux build only). 2012-04-13 19:21:49 +02:00
Paul Cercueil
7687212b4e Removed the "wrapper" feature.
It is up to the system to restart GMenu2X when the application exits.
2012-04-13 18:12:30 +02:00
Maarten ter Huurne
57ad81e3df Merged LinkAction class into its base class.
LinkApp now calls its launch method via the delegate mechanism instead of
via an overridden virtual method. This should make it easier to move the
launch method out of LinkApp and into the GMenu2X main class.
2012-03-24 11:57:21 +01:00
Maarten ter Huurne
d90ed635be Removed per-app gamma setting.
This functionality was half-removed already: some code missing, other
essential parts commented out.

I don't see the point of this either: RGB graphics are created for a certain
gamma value; if that differs from the screen gamma it is up to the application
to do something about it: gamma correct the graphics and/or change the screen
gamma. It doesn't make sense to make this user configurable.
2011-12-23 15:39:53 +01:00
Maarten ter Huurne
0622c4227f Removed ability to configure custom working directory.
Working directory was only configurable in the ini files, not in the GUI.

Many GP2X/Dingoo applications break if the working directory is changed
because they use relative paths for locating their data files.

I don't see a reason to keep this feature, since I don't know of a realistic
scenario where it would be useful. In any case, the functionality can be
re-created by using a wrapper script to change the working directory based on
a parameter value.
2011-12-23 15:20:28 +01:00
Maarten ter Huurne
1ad6b2f25a Made GMenu2X::ts private.
Pass Touchscreen reference to constructors instead of pulling it from
the GMenu2X class.
2011-12-23 14:03:05 +01:00
Ayla
c7af4b1aea Removed per-application volume setting.
The volume should not depend of the application which is in use.
2011-11-19 14:47:55 +01:00
Maarten ter Huurne
f28e4f6d89 Minimized gmenu2x.h.
Everything that does not need to be shared was moved to gmenu2x.cpp.
2011-10-23 17:27:29 +02:00
Maarten ter Huurne
e0e7e87ebc Massive header cleanup.
The main goal is to avoid including "gmenu2x.h" from headers.
But I did various other cleanups as well while I was at it.
2011-10-23 16:13:02 +02:00
Maarten ter Huurne
14bae043c0 LinkApp: various cleanups.
Log a warning message if setsid() fails.
Also improved code layout.
2011-10-23 13:03:11 +02:00
Maarten ter Huurne
315bf0a180 InputManager: C++-style type definitions.
There is no need to typedef enums and structs in C++.
Put types defined by InputManager inside the class namespace.
Changed type names to CamelCase.
2011-10-23 09:04:12 +02:00
Maarten ter Huurne
e73a8d06ea Removed per-application brightness setting.
The desired backlight level depends on the amount of light coming in from
the environment, not on the application that is run. Setting the brightness
when launching an application discards what is probably the right value
for this location (indoor/outdoor) and time of day. So we decided that this
is not a desirable feature and therefore removed it.
2011-09-23 01:51:53 +02:00
Maarten ter Huurne
6729e30acb Fixed mistake in 8bcd03962f.
"iclock" is not a local variable: it is a field, so it should be updated.
2011-09-19 16:49:30 +02:00
Maarten ter Huurne
03ea679a1d Corrected capitalization of megahertz.
"Mhz" -> "MHz"
2011-09-19 16:33:19 +02:00
Maarten ter Huurne
8bcd03962f Do not constrain the max CPU frequency for apps on setting the string value.
It is already constrained on editing and when actually applying the frequency.
The string value constrain is problematic because it happens in a class that
has no knowledge of the actual CPU limits, so it can only contrain to
hardcoded limits.

With this change you'll actually be able to run apps at 432 MHz.
2011-09-19 16:27:53 +02:00
Ayla
759eefd676 The files "a.png" and "b.png" have been renamed to "cancel.png" and "accept.png". 2011-09-18 03:40:33 +02:00
Ayla
d0cfe7c60d Modified the key shortcuts for the text display dialog. 2011-09-18 03:05:25 +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
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
55dad4171d Merge branch 'install_locations'
Conflicts:
	configure.in
2011-07-11 11:19:18 +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
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
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
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
a35a7e2c35 Introduced enums for text alignment in the ASFont class. 2011-05-09 05:17:25 +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
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
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
563cb34a89 Rewrote the whole input system.
Gmenu2X will no longer eat 100% CPU ;)
2010-09-17 22:34:26 +02:00
Ayla
7c9364780b Replaced every message output by calls to the log macros. 2010-09-17 22:31:09 +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
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
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
0586595de5 Converted public fields of Selector to private. 2010-07-26 05:47:46 +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
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
40a26e1a9c pass strings by reference where possible 2010-05-02 14:38:16 +02: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