mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-26 03:22:48 +02:00
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.
This commit is contained in:
parent
7a978222b8
commit
e73a8d06ea
@ -1682,7 +1682,6 @@ void GMenu2X::editLink() {
|
||||
int linkVolume = menu->selLinkApp()->volume();
|
||||
//G
|
||||
//int linkGamma = menu->selLinkApp()->gamma();
|
||||
int linkBacklight = menu->selLinkApp()->backlight();
|
||||
|
||||
string diagTitle = tr.translate("Edit link: $1",linkTitle.c_str(),NULL);
|
||||
string diagIcon = menu->selLinkApp()->getIconPath();
|
||||
@ -1696,7 +1695,6 @@ void GMenu2X::editLink() {
|
||||
sd.addSetting(new MenuSettingInt(this,tr["Clock (default: 336)"],tr["Cpu clock frequency to set when launching this link"],&linkClock,cpuFreqMin,confInt["maxClock"],cpuFreqMultiple));
|
||||
// sd.addSetting(new MenuSettingBool(this,tr["Tweak RAM Timings"],tr["This usually speeds up the application at the cost of stability"],&linkUseRamTimings));
|
||||
sd.addSetting(new MenuSettingInt(this,tr["Volume (default: -1)"],tr["Volume to set for this link"],&linkVolume,-1,100));
|
||||
sd.addSetting(new MenuSettingInt(this,tr["Backlight (default: -1)"],tr["LCD backlight value to set when launching this link"],&linkBacklight,-1,100));
|
||||
sd.addSetting(new MenuSettingString(this,tr["Parameters"],tr["Parameters to pass to the application"],&linkParams, diagTitle,diagIcon));
|
||||
sd.addSetting(new MenuSettingDir(this,tr["Selector Directory"],tr["Directory to scan for the selector"],&linkSelDir));
|
||||
sd.addSetting(new MenuSettingBool(this,tr["Selector Browser"],tr["Allow the selector to change directory"],&linkSelBrowser));
|
||||
@ -1723,10 +1721,6 @@ void GMenu2X::editLink() {
|
||||
menu->selLinkApp()->setAliasFile(linkSelAliases);
|
||||
menu->selLinkApp()->setClock(linkClock);
|
||||
menu->selLinkApp()->setVolume(linkVolume);
|
||||
//G
|
||||
if ((linkBacklight < 5) && (linkBacklight > -1))
|
||||
linkBacklight = 5;
|
||||
menu->selLinkApp()->setBacklight(linkBacklight);
|
||||
|
||||
INFO("New Section: '%s'\n", newSection.c_str());
|
||||
|
||||
|
@ -47,7 +47,6 @@ LinkApp::LinkApp(GMenu2X *gmenu2x_, InputManager &inputMgr_,
|
||||
setVolume(-1);
|
||||
//G
|
||||
//setGamma(0);
|
||||
setBacklight(-1);
|
||||
selectordir = "";
|
||||
selectorfilter = "";
|
||||
icon = iconPath = "";
|
||||
@ -87,8 +86,6 @@ LinkApp::LinkApp(GMenu2X *gmenu2x_, InputManager &inputMgr_,
|
||||
//G
|
||||
} else if (name == "gamma") {
|
||||
setGamma( atoi(value.c_str()) );
|
||||
} else if (name == "backlight") {
|
||||
setBacklight( atoi(value.c_str()) );
|
||||
} else if (name == "volume") {
|
||||
setVolume( atoi(value.c_str()) );
|
||||
} else if (name == "selectordir") {
|
||||
@ -175,26 +172,6 @@ void LinkApp::setVolume(int vol) {
|
||||
edited = true;
|
||||
}
|
||||
|
||||
int LinkApp::backlight()
|
||||
{
|
||||
return ibacklight;
|
||||
}
|
||||
|
||||
const string &LinkApp::backlightStr()
|
||||
{
|
||||
return sbacklight;
|
||||
}
|
||||
|
||||
void LinkApp::setBacklight(int val)
|
||||
{
|
||||
ibacklight = constrain(val,-1,100);
|
||||
stringstream ss;
|
||||
sbacklight = "";
|
||||
ss << ibacklight;
|
||||
ss >> sbacklight;
|
||||
|
||||
edited = true;
|
||||
}
|
||||
//G
|
||||
int LinkApp::gamma() {
|
||||
return igamma;
|
||||
@ -241,7 +218,6 @@ bool LinkApp::save() {
|
||||
if (ivolume>0 ) f << "volume=" << ivolume << endl;
|
||||
//G
|
||||
if (igamma!=0 ) f << "gamma=" << igamma << endl;
|
||||
if (ibacklight!=0 ) f << "backlight=" << ibacklight << endl;
|
||||
if (selectordir!="" ) f << "selectordir=" << selectordir << endl;
|
||||
if (selectorbrowser ) f << "selectorbrowser=true" << endl;
|
||||
if (selectorfilter!="" ) f << "selectorfilter=" << selectorfilter << endl;
|
||||
@ -497,8 +473,6 @@ void LinkApp::launch(const string &selectedFile, const string &selectedDir) {
|
||||
gmenu2x->setClock(clock());
|
||||
//if (gamma()!=0 && gamma()!=gmenu2x->confInt["gamma"])
|
||||
// gmenu2x->setGamma(gamma());
|
||||
if((backlight() != 0) && (backlight() != gmenu2x->confInt["backlight"]))
|
||||
gmenu2x->setBacklight(backlight());
|
||||
|
||||
/* Make the terminal we're connected to (via stdin/stdout) our
|
||||
contolling terminal again. Else many console programs are
|
||||
|
@ -42,10 +42,8 @@ private:
|
||||
int iclock, ivolume;
|
||||
//G
|
||||
string sgamma;
|
||||
string sbacklight;
|
||||
//G
|
||||
int igamma;
|
||||
int ibacklight;
|
||||
string exec, params, workdir, manual, selectordir, selectorfilter, selectorscreens;
|
||||
bool selectorbrowser, useRamTimings;
|
||||
void drawRun();
|
||||
@ -94,11 +92,6 @@ public:
|
||||
const string &gammaStr();
|
||||
void setGamma(int gamma);
|
||||
|
||||
int backlight();
|
||||
const string &backlightStr();
|
||||
void setBacklight(int val);
|
||||
// /G
|
||||
|
||||
bool save();
|
||||
void run();
|
||||
void showManual();
|
||||
|
Loading…
Reference in New Issue
Block a user