Removed redundant "enable"s on checkboxes and variable names. flibqtfrontend
authorMitchell Kember <mk12360@gmail.com>
Tue, 04 Dec 2012 16:37:02 -0500
branchflibqtfrontend
changeset 8246 6859b1afcbd4
parent 8244 0f8893faeb00
child 8248 34d1aceb31aa
Removed redundant "enable"s on checkboxes and variable names.
QTfrontend/gameuiconfig.cpp
QTfrontend/hwform.cpp
QTfrontend/ui/page/pageoptions.cpp
QTfrontend/ui/page/pageoptions.h
--- a/QTfrontend/gameuiconfig.cpp	Thu Dec 06 00:38:12 2012 +0400
+++ b/QTfrontend/gameuiconfig.cpp	Tue Dec 04 16:37:02 2012 -0500
@@ -50,7 +50,7 @@
 
     setIniCodec("UTF-8");
 
-    connect(Form->ui.pageOptions->CBEnableFrontendMusic, SIGNAL(toggled(bool)), Form, SLOT(Music(bool)));
+    connect(Form->ui.pageOptions->CBFrontendMusic, SIGNAL(toggled(bool)), Form, SLOT(Music(bool)));
 
     //Form->resize(value("frontend/width", 640).toUInt(), value("frontend/height", 450).toUInt());
     resizeToConfigValues();
@@ -80,10 +80,10 @@
     Form->ui.pageOptions->SLQuality->setValue(value("video/quality", 5).toUInt());
     Form->ui.pageOptions->CBStereoMode->setCurrentIndex(value("video/stereo", 0).toUInt());
     Form->ui.pageOptions->CBFrontendEffects->setChecked(value("frontend/effects", true).toBool());
-    Form->ui.pageOptions->CBEnableSound->setChecked(value("audio/sound", true).toBool());
-    Form->ui.pageOptions->CBEnableFrontendSound->setChecked(value("frontend/sound", true).toBool());
-    Form->ui.pageOptions->CBEnableMusic->setChecked(value("audio/music", true).toBool());
-    Form->ui.pageOptions->CBEnableFrontendMusic->setChecked(value("frontend/music", true).toBool());
+    Form->ui.pageOptions->CBSound->setChecked(value("audio/sound", true).toBool());
+    Form->ui.pageOptions->CBFrontendSound->setChecked(value("frontend/sound", true).toBool());
+    Form->ui.pageOptions->CBMusic->setChecked(value("audio/music", true).toBool());
+    Form->ui.pageOptions->CBFrontendMusic->setChecked(value("frontend/music", true).toBool());
     Form->ui.pageOptions->volumeBox->setValue(value("audio/volume", 100).toUInt());
 
     QString netNick = value("net/nick", "").toString();
@@ -397,20 +397,20 @@
 
 bool GameUIConfig::isSoundEnabled()
 {
-    return Form->ui.pageOptions->CBEnableSound->isChecked();
+    return Form->ui.pageOptions->CBSound->isChecked();
 }
 bool GameUIConfig::isFrontendSoundEnabled()
 {
-    return Form->ui.pageOptions->CBEnableFrontendSound->isChecked();
+    return Form->ui.pageOptions->CBFrontendSound->isChecked();
 }
 
 bool GameUIConfig::isMusicEnabled()
 {
-    return Form->ui.pageOptions->CBEnableMusic->isChecked();
+    return Form->ui.pageOptions->CBMusic->isChecked();
 }
 bool GameUIConfig::isFrontendMusicEnabled()
 {
-    return Form->ui.pageOptions->CBEnableFrontendMusic->isChecked();
+    return Form->ui.pageOptions->CBFrontendMusic->isChecked();
 }
 
 bool GameUIConfig::isShowFPSEnabled()
--- a/QTfrontend/hwform.cpp	Thu Dec 06 00:38:12 2012 +0400
+++ b/QTfrontend/hwform.cpp	Tue Dec 04 16:37:02 2012 -0500
@@ -1463,7 +1463,7 @@
             //setVisible(true);
             setFocusPolicy(Qt::StrongFocus);
             if (id == ID_PAGE_INGAME) GoBack();
-            Music(ui.pageOptions->CBEnableFrontendMusic->isChecked());
+            Music(ui.pageOptions->CBFrontendMusic->isChecked());
             if (wBackground) wBackground->startAnimation();
             GoToPage(ID_PAGE_GAMESTATS);
             if (hwnet && (!game || !game->netSuspend)) hwnet->gameFinished(true);
@@ -1481,7 +1481,7 @@
                      (gameState == gsInterrupted || gameState == gsStopped || gameState == gsDestroyed || gameState == gsHalted)))
             {
                 if (id == ID_PAGE_INGAME) GoBack();
-                Music(ui.pageOptions->CBEnableFrontendMusic->isChecked());
+                Music(ui.pageOptions->CBFrontendMusic->isChecked());
                 if (wBackground) wBackground->startAnimation();
                 if (hwnet) hwnet->gameFinished(false);
             }
--- a/QTfrontend/ui/page/pageoptions.cpp	Thu Dec 06 00:38:12 2012 +0400
+++ b/QTfrontend/ui/page/pageoptions.cpp	Tue Dec 04 16:37:02 2012 -0500
@@ -257,13 +257,13 @@
             CBFrontendEffects->setText(QCheckBox::tr("Frontend effects"));
             GBAlayout->addWidget(CBFrontendEffects);
 
-            CBEnableFrontendSound = new QCheckBox(AGGroupBox);
-            CBEnableFrontendSound->setText(QCheckBox::tr("Enable frontend sounds"));
-            GBAlayout->addWidget(CBEnableFrontendSound);
+            CBFrontendSound = new QCheckBox(AGGroupBox);
+            CBFrontendSound->setText(QCheckBox::tr("Frontend sounds"));
+            GBAlayout->addWidget(CBFrontendSound);
 
-            CBEnableFrontendMusic = new QCheckBox(AGGroupBox);
-            CBEnableFrontendMusic->setText(QCheckBox::tr("Enable frontend music"));
-            GBAlayout->addWidget(CBEnableFrontendMusic);
+            CBFrontendMusic = new QCheckBox(AGGroupBox);
+            CBFrontendMusic->setText(QCheckBox::tr("Frontend music"));
+            GBAlayout->addWidget(CBFrontendMusic);
 
             QFrame * hr = new QFrame(AGGroupBox);
             hr->setFrameStyle(QFrame::HLine);
@@ -337,13 +337,13 @@
             volumeBox->setSingleStep(5);
             GBAvollayout->addWidget(volumeBox, 0, 2);
 
-            CBEnableSound = new QCheckBox(AGGroupBox);
-            CBEnableSound->setText(QCheckBox::tr("Enable sound"));
-            GBAvollayout->addWidget(CBEnableSound, 1, 0, 1, 1);
+            CBSound = new QCheckBox(AGGroupBox);
+            CBSound->setText(QCheckBox::tr("Sound"));
+            GBAvollayout->addWidget(CBSound, 1, 0);
 
-            CBEnableMusic = new QCheckBox(AGGroupBox);
-            CBEnableMusic->setText(QCheckBox::tr("Enable music"));
-            GBAvollayout->addWidget(CBEnableMusic, 1, 1, 1, 2);
+            CBMusic = new QCheckBox(AGGroupBox);
+            CBMusic->setText(QCheckBox::tr("Music"));
+            GBAvollayout->addWidget(CBMusic, 1, 1, 1, 2);
 
             GBAvollayout->setSizeConstraint(QLayout::SetMinimumSize);
 
--- a/QTfrontend/ui/page/pageoptions.h	Thu Dec 06 00:38:12 2012 +0400
+++ b/QTfrontend/ui/page/pageoptions.h	Tue Dec 04 16:37:02 2012 -0500
@@ -58,10 +58,10 @@
         IconedGroupBox *AGGroupBox;
         QComboBox *CBResolution;
         QComboBox *CBStereoMode;
-        QCheckBox *CBEnableSound;
-        QCheckBox *CBEnableFrontendSound;
-        QCheckBox *CBEnableMusic;
-        QCheckBox *CBEnableFrontendMusic;
+        QCheckBox *CBFrontendSound;
+        QCheckBox *CBFrontendMusic;
+        QCheckBox *CBSound;
+        QCheckBox *CBMusic;
         QCheckBox *CBFullscreen;
         QCheckBox *CBFrontendFullscreen;
         QCheckBox *CBShowFPS;