From 6629a63871b9438bcf9062ae18955fa4340d9534 Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Tue, 27 Nov 2012 02:14:08 -0300 Subject: [PATCH] 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. --- configure.in | 6 +++--- data/platform/{dingux => a320}/about.txt | 0 data/platform/{dingux => a320}/gmenu2x.conf | 0 data/platform/{dingux => a320}/input.conf | 0 .../sections/applications/.empty | 0 .../sections/applications/30_terminal | 0 .../{dingux => a320}/sections/settings/.empty | 0 .../sections/settings/10_poweroff | 0 .../sections/settings/20_reboot | 0 .../sections/settings/30_suspend | 0 .../sections/settings/40_alsamixer | 0 .../sections/settings/50_system_info | 0 .../sections/settings/60_tv_out | 0 .../skins/Default/imgs/buttons/accept.png | Bin .../skins/Default/imgs/buttons/cancel.png | Bin src/gmenu2x.cpp | 18 +++++++++--------- src/linkapp.cpp | 14 +++++++------- src/linkapp.h | 2 +- 18 files changed, 20 insertions(+), 20 deletions(-) rename data/platform/{dingux => a320}/about.txt (100%) rename data/platform/{dingux => a320}/gmenu2x.conf (100%) rename data/platform/{dingux => a320}/input.conf (100%) rename data/platform/{dingux => a320}/sections/applications/.empty (100%) rename data/platform/{dingux => a320}/sections/applications/30_terminal (100%) rename data/platform/{dingux => a320}/sections/settings/.empty (100%) rename data/platform/{dingux => a320}/sections/settings/10_poweroff (100%) rename data/platform/{dingux => a320}/sections/settings/20_reboot (100%) rename data/platform/{dingux => a320}/sections/settings/30_suspend (100%) rename data/platform/{dingux => a320}/sections/settings/40_alsamixer (100%) rename data/platform/{dingux => a320}/sections/settings/50_system_info (100%) rename data/platform/{dingux => a320}/sections/settings/60_tv_out (100%) rename data/platform/{dingux => a320}/skins/Default/imgs/buttons/accept.png (100%) rename data/platform/{dingux => a320}/skins/Default/imgs/buttons/cancel.png (100%) diff --git a/configure.in b/configure.in index de097ba..61a3b46 100644 --- a/configure.in +++ b/configure.in @@ -35,9 +35,9 @@ AC_ARG_ENABLE(platform, [GMENU2X_PLATFORM="$enableval"], [GMENU2X_PLATFORM="default"]) case "$GMENU2X_PLATFORM" in - dingux) - AC_DEFINE(PLATFORM_DINGUX) - PLATFORM="dingux" + a320) + AC_DEFINE(PLATFORM_A320) + PLATFORM="a320" SCREEN_RES="320x240" ;; gcw0) diff --git a/data/platform/dingux/about.txt b/data/platform/a320/about.txt similarity index 100% rename from data/platform/dingux/about.txt rename to data/platform/a320/about.txt diff --git a/data/platform/dingux/gmenu2x.conf b/data/platform/a320/gmenu2x.conf similarity index 100% rename from data/platform/dingux/gmenu2x.conf rename to data/platform/a320/gmenu2x.conf diff --git a/data/platform/dingux/input.conf b/data/platform/a320/input.conf similarity index 100% rename from data/platform/dingux/input.conf rename to data/platform/a320/input.conf diff --git a/data/platform/dingux/sections/applications/.empty b/data/platform/a320/sections/applications/.empty similarity index 100% rename from data/platform/dingux/sections/applications/.empty rename to data/platform/a320/sections/applications/.empty diff --git a/data/platform/dingux/sections/applications/30_terminal b/data/platform/a320/sections/applications/30_terminal similarity index 100% rename from data/platform/dingux/sections/applications/30_terminal rename to data/platform/a320/sections/applications/30_terminal diff --git a/data/platform/dingux/sections/settings/.empty b/data/platform/a320/sections/settings/.empty similarity index 100% rename from data/platform/dingux/sections/settings/.empty rename to data/platform/a320/sections/settings/.empty diff --git a/data/platform/dingux/sections/settings/10_poweroff b/data/platform/a320/sections/settings/10_poweroff similarity index 100% rename from data/platform/dingux/sections/settings/10_poweroff rename to data/platform/a320/sections/settings/10_poweroff diff --git a/data/platform/dingux/sections/settings/20_reboot b/data/platform/a320/sections/settings/20_reboot similarity index 100% rename from data/platform/dingux/sections/settings/20_reboot rename to data/platform/a320/sections/settings/20_reboot diff --git a/data/platform/dingux/sections/settings/30_suspend b/data/platform/a320/sections/settings/30_suspend similarity index 100% rename from data/platform/dingux/sections/settings/30_suspend rename to data/platform/a320/sections/settings/30_suspend diff --git a/data/platform/dingux/sections/settings/40_alsamixer b/data/platform/a320/sections/settings/40_alsamixer similarity index 100% rename from data/platform/dingux/sections/settings/40_alsamixer rename to data/platform/a320/sections/settings/40_alsamixer diff --git a/data/platform/dingux/sections/settings/50_system_info b/data/platform/a320/sections/settings/50_system_info similarity index 100% rename from data/platform/dingux/sections/settings/50_system_info rename to data/platform/a320/sections/settings/50_system_info diff --git a/data/platform/dingux/sections/settings/60_tv_out b/data/platform/a320/sections/settings/60_tv_out similarity index 100% rename from data/platform/dingux/sections/settings/60_tv_out rename to data/platform/a320/sections/settings/60_tv_out diff --git a/data/platform/dingux/skins/Default/imgs/buttons/accept.png b/data/platform/a320/skins/Default/imgs/buttons/accept.png similarity index 100% rename from data/platform/dingux/skins/Default/imgs/buttons/accept.png rename to data/platform/a320/skins/Default/imgs/buttons/accept.png diff --git a/data/platform/dingux/skins/Default/imgs/buttons/cancel.png b/data/platform/a320/skins/Default/imgs/buttons/cancel.png similarity index 100% rename from data/platform/dingux/skins/Default/imgs/buttons/cancel.png rename to data/platform/a320/skins/Default/imgs/buttons/cancel.png diff --git a/src/gmenu2x.cpp b/src/gmenu2x.cpp index 2907920..0f1f719 100644 --- a/src/gmenu2x.cpp +++ b/src/gmenu2x.cpp @@ -61,7 +61,7 @@ #include //for battery -#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0) +#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0) # define UNLOCK_VT # include # include @@ -101,7 +101,7 @@ using namespace fastdelegate; #ifdef _CARD_ROOT const char *CARD_ROOT = _CARD_ROOT; -#elif defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0) +#elif defined(PLATFORM_A320) || defined(PLATFORM_GCW0) const char *CARD_ROOT = "/media/"; #else const char *CARD_ROOT = "/card/"; //Note: Add a trailing /! @@ -348,7 +348,7 @@ void GMenu2X::initBG() { Surface *sd = Surface::loadImage("imgs/sd.png", confStr["skin"]); if (sd) sd->blit(bgmain, 3, bottomBarIconY); -#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0) +#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0) string df = getDiskFree("/boot"); #else string df = getDiskFree(CARD_ROOT); @@ -735,7 +735,7 @@ void GMenu2X::main() { s->rectangle( 12,52,296,helpBoxHeight, skinConfColors[COLOR_MESSAGE_BOX_BORDER] ); s->write( font, tr["CONTROLS"], 20, 60 ); -#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0) +#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0) s->write( font, tr["A: Launch link / Confirm action"], 20, 80 ); s->write( font, tr["B: Show this help menu"], 20, 95 ); s->write( font, tr["L, R: Change section"], 20, 110 ); @@ -1215,7 +1215,7 @@ void GMenu2X::editLink() { sd.addSetting(new MenuSettingDir(this, ts, tr["Selector Screenshots"], tr["Directory of the screenshots for the selector"], &linkSelScreens)); sd.addSetting(new MenuSettingFile(this, ts, tr["Selector Aliases"], tr["File containing a list of aliases for the selector"], &linkSelAliases)); sd.addSetting(new MenuSettingBool(this, ts, tr["Don't Leave"], tr["Don't quit GMenu2X when launching this link"], &menu->selLinkApp()->runsInBackgroundRef())); -#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0) +#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0) sd.addSetting(new MenuSettingBool(this, ts, tr["Display Console"], tr["Must be enabled for console-based applications"], &menu->selLinkApp()->consoleApp)); #endif #ifdef HAVE_LIBOPK @@ -1431,7 +1431,7 @@ void GMenu2X::scanPath(string path, vector *files) { scanPath(filepath, files); if (statRet != -1) { ext = filepath.substr(filepath.length()-4,4); -#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0) || defined(PLATFORM_NANONOTE) +#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0) || defined(PLATFORM_NANONOTE) if (ext==".dge") #else if (ext==".pxml") @@ -1452,7 +1452,7 @@ unsigned short GMenu2X::getBatteryLevel() { FILE *batteryHandle = NULL, *usbHandle = NULL; -#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0) || defined(PLATFORM_NANONOTE) +#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0) || defined(PLATFORM_NANONOTE) usbHandle = fopen("/sys/class/power_supply/usb/online", "r"); #endif if (usbHandle) { @@ -1463,7 +1463,7 @@ unsigned short GMenu2X::getBatteryLevel() { return 6; } -#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0) || defined(PLATFORM_NANONOTE) +#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0) || defined(PLATFORM_NANONOTE) batteryHandle = fopen("/sys/class/power_supply/battery/capacity", "r"); #endif if (batteryHandle) { @@ -1487,7 +1487,7 @@ void GMenu2X::setInputSpeed() { void GMenu2X::setClock(unsigned mhz) { mhz = constrain(mhz, cpuFreqMin, confInt["maxClock"]); -#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0) || defined(PLATFORM_NANONOTE) +#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0) || defined(PLATFORM_NANONOTE) jz_cpuspeed(mhz); #endif } diff --git a/src/linkapp.cpp b/src/linkapp.cpp index f17ca45..2f674e6 100644 --- a/src/linkapp.cpp +++ b/src/linkapp.cpp @@ -38,7 +38,7 @@ #include #include -#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0) +#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0) #include #endif @@ -75,7 +75,7 @@ LinkApp::LinkApp(GMenu2X *gmenu2x_, Touchscreen &ts, InputManager &inputMgr_, selectorbrowser = true; editable = true; edited = false; -#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0) +#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0) consoleApp = false; #endif @@ -184,7 +184,7 @@ LinkApp::LinkApp(GMenu2X *gmenu2x_, Touchscreen &ts, InputManager &inputMgr_, } } -#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0) +#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0) param = opk_read_param(pdata, "Terminal"); if (param) consoleApp = !strcmp(param, "true"); @@ -268,7 +268,7 @@ LinkApp::LinkApp(GMenu2X *gmenu2x_, Touchscreen &ts, InputManager &inputMgr_, manual = value; } else if (name == "dontleave") { if (value=="true") dontleave = true; -#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0) +#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0) } else if (name == "consoleapp") { if (value == "true") consoleApp = true; #endif @@ -353,7 +353,7 @@ bool LinkApp::save() { if (params!="" ) f << "params=" << params << endl; if (manual!="" ) f << "manual=" << manual << endl; if (dontleave ) f << "dontleave=true" << endl; -#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0) +#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0) if (consoleApp ) f << "consoleapp=true" << endl; #endif if (selectorfilter!="" ) f << "selectorfilter=" << selectorfilter << endl; @@ -646,7 +646,7 @@ void LinkApp::launch(const string &selectedFile, const string &selectedDir) { } // else, well.. we are no worse off :) if (params!="") command += " " + params; -#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0) +#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0) if (gmenu2x->confInt["outputLogs"] && !consoleApp) command += " &> " + cmdclean(gmenu2x->getHome()) + "/log.txt"; #else @@ -694,7 +694,7 @@ void LinkApp::launch(const string &selectedFile, const string &selectedDir) { signal(SIGTTOU, SIG_IGN); tcsetpgrp(STDOUT_FILENO, pgid); -#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0) +#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0) if (consoleApp) { /* Enable the framebuffer console */ char c = '1'; diff --git a/src/linkapp.h b/src/linkapp.h index 34a5fa3..d2e98e9 100644 --- a/src/linkapp.h +++ b/src/linkapp.h @@ -71,7 +71,7 @@ public: virtual const std::string &searchIcon(); -#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0) +#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0) bool consoleApp; #endif