1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-07-07 15:05:28 +03:00
Commit Graph

248 Commits

Author SHA1 Message Date
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