[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-i18n-doc
Subject:    branches/KDE/3.5/kdemultimedia/kioslave/audiocd/kcmaudiocd
From:       Adriaan de Groot <groot () kde ! org>
Date:       2006-01-05 22:39:29
Message-ID: 1136500769.041559.12913.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 494647 by adridg:

Somewhere along the way, exactly half of the text describing the autosearch \
functionality was changed to the logically opposite meaning. Nowadays, the configure \
option is 'Specify device' as opposed to 'Autosearch'. This makes the code for \
enabling the textbox simpler, sure.

Since the logical sense has changed, we need extra NOTs in the load and save methods.

Since the meaning of the option has changed, the whatsthis should describe what the \
option does, and not what it used to do. This would be a real problem if anyone \
actually read whatsthis text.

CCMAIL: kde@freebsd.org
CCMAIL: kde-multimedia@kde.org
CCMAIL: kde-i18n-doc@kde.org

PS. Docs people get an extra *grovel* in order to fix this totally wrong string. If \
it's out of the question to do now, drop me a note and I'll revert the whatsthis \
change ASAP.


 M  +3 -3      audiocdconfig.ui  
 M  +9 -4      kcmaudiocd.cpp  


--- branches/KDE/3.5/kdemultimedia/kioslave/audiocd/kcmaudiocd/audiocdconfig.ui \
#494646:494647 @@ -149,13 +149,13 @@
                     </widget>
                     <widget class="QCheckBox" row="0" column="0" rowspan="1" \
colspan="2">  <property name="name">
-                            <cstring>cd_autosearch_check</cstring>
+                            <cstring>cd_specify_device</cstring>
                         </property>
                         <property name="text">
                             <string>&amp;Specify CD device:</string>
                         </property>
                         <property name="whatsThis" stdset="0">
-                            <string>Uncheck this if you want to specify a CD device \
different from the one autoprobed</string> +                            <string>Check \
this to specify a CD device different from the one which is detected \
automatically</string>  </property>
                     </widget>
                     <widget class="QCheckBox" row="1" column="0" rowspan="1" \
colspan="3"> @@ -597,7 +597,7 @@
         <slot>setEnabled(bool)</slot>
     </connection>
     <connection>
-        <sender>cd_autosearch_check</sender>
+        <sender>cd_specify_device</sender>
         <signal>toggled(bool)</signal>
         <receiver>cd_device_string</receiver>
         <slot>setEnabled(bool)</slot>
--- branches/KDE/3.5/kdemultimedia/kioslave/audiocd/kcmaudiocd/kcmaudiocd.cpp \
#494646:494647 @@ -64,7 +64,7 @@
     }
    
     //CDDA Options
-    connect(cd_autosearch_check,SIGNAL(clicked()),this,SLOT(slotConfigChanged()));
+    connect(cd_specify_device,SIGNAL(clicked()),this,SLOT(slotConfigChanged()));
     connect(ec_enable_check,SIGNAL(clicked()),this,SLOT(slotEcEnable()));
     connect(ec_skip_check,SIGNAL(clicked()),SLOT(slotConfigChanged()));
     connect(cd_device_string,SIGNAL(textChanged(const QString \
&)),SLOT(slotConfigChanged())); @@ -99,7 +99,7 @@
 }
 
 void KAudiocdModule::defaults() {
-	cd_autosearch_check->setChecked(true);
+	cd_specify_device->setChecked(false);
 	cd_device_string->setText("/dev/cdrom");
 
 	ec_enable_check->setChecked(true);
@@ -124,7 +124,11 @@
   {
     KConfigGroupSaver saver(config, "CDDA");
 
-    config->writeEntry("autosearch",cd_autosearch_check->isChecked());
+    // autosearch is the name of the config option, which has the
+    // reverse sense of the current text of the configuration option,
+    // which is specify the device. Therefore, invert the value on write.
+    //
+    config->writeEntry("autosearch", !(cd_specify_device->isChecked()) );
     config->writeEntry("device",cd_device_string->text());
     config->writeEntry("disable_paranoia",!(ec_enable_check->isChecked()));
     config->writeEntry("never_skip",!(ec_skip_check->isChecked()));
@@ -156,7 +160,8 @@
   {
     KConfigGroupSaver saver(config, "CDDA");
 
-    cd_autosearch_check->setChecked(config->readBoolEntry("autosearch",true));
+    // Specify <=> not autosearch, as explained above in ::save()
+    cd_specify_device->setChecked( !(config->readBoolEntry("autosearch",true)) );
     cd_device_string->setText(config->readEntry("device","/dev/cdrom"));
     ec_enable_check->setChecked(!(config->readBoolEntry("disable_paranoia",false)));
     ec_skip_check->setChecked(!(config->readBoolEntry("never_skip",true)));


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic