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

List:       kde-commits
Subject:    KDE/kdebase/workspace/klipper
From:       Esben Mose Hansen <kde () mosehansen ! dk>
Date:       2010-01-11 9:20:37
Message-ID: 1263201637.404132.28057.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1072865 by esben:

Avoid changing the old sync setting when converting old setting files.
BUG: 219877

 M  +3 -3      generalconfig.ui  
 M  +17 -3     klipper.cpp  
 M  +6 -2      klipper.kcfg  


--- trunk/KDE/kdebase/workspace/klipper/generalconfig.ui #1072864:1072865
@@ -74,7 +74,7 @@
        </widget>
       </item>
       <item>
-       <widget class="QCheckBox" name="kcfg_Synchronize">
+       <widget class="QCheckBox" name="kcfg_SyncClipboards">
         <property name="text">
          <string>Synchronize contents of the clipboard and the selection</string>
         </property>
@@ -154,7 +154,7 @@
   <connection>
    <sender>kcfg_IgnoreSelection</sender>
    <signal>clicked(bool)</signal>
-   <receiver>kcfg_Synchronize</receiver>
+   <receiver>kcfg_SyncClipboards</receiver>
    <slot>setDisabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
@@ -168,7 +168,7 @@
    </hints>
   </connection>
   <connection>
-   <sender>kcfg_Synchronize</sender>
+   <sender>kcfg_SyncClipboards</sender>
    <signal>clicked(bool)</signal>
    <receiver>kcfg_IgnoreSelection</receiver>
    <slot>setDisabled(bool)</slot>
--- trunk/KDE/kdebase/workspace/klipper/klipper.cpp #1072864:1072865
@@ -306,8 +306,7 @@
     // 0 is the id of "Ignore selection" radiobutton
     m_bIgnoreSelection = KlipperSettings::ignoreSelection();
     m_bIgnoreImages = KlipperSettings::ignoreImages();
-    // 0 is the id of "Synchronize contents" radiobutton
-    m_bSynchronize = KlipperSettings::synchronize();
+    m_bSynchronize = KlipperSettings::syncClipboards();
     // NOTE: not used atm - kregexpeditor is not ported to kde4
     m_bUseGUIRegExpEditor = KlipperSettings::useGUIRegExpEditor();
     m_bSelectionTextOnly = KlipperSettings::selectionTextOnly();
@@ -315,8 +314,23 @@
     m_bURLGrabber = KlipperSettings::uRLGrabberEnabled();
     // this will cause it to loadSettings too
     setURLGrabberEnabled(m_bURLGrabber);
+    history()->setMaxSize( KlipperSettings::maxClipItems() );
+    // Convert 4.3 settings
+    if (KlipperSettings::synchronize() != 3) {
+      // 2 was the id of "Ignore selection" radiobutton
+      m_bIgnoreSelection = KlipperSettings::synchronize() == 2;
+      // 0 was the id of "Synchronize contents" radiobutton
+      m_bSynchronize = KlipperSettings::synchronize() == 0;
+      KConfigSkeletonItem* item = \
KlipperSettings::self()->findItem("SyncClipboards"); +      \
item->setProperty(m_bSynchronize); +      item = \
KlipperSettings::self()->findItem("IgnoreSelection"); +      \
item->setProperty(m_bIgnoreSelection); +      item =  \
KlipperSettings::self()->findItem("Synchronize"); // Mark property as converted. +    \
item->setProperty(3); +      KlipperSettings::self()->writeConfig();
+      KlipperSettings::self()->readConfig();
 
-    history()->setMaxSize( KlipperSettings::maxClipItems() );
+    }
 }
 
 void Klipper::saveSettings() const
--- trunk/KDE/kdebase/workspace/klipper/klipper.kcfg #1072864:1072865
@@ -30,9 +30,13 @@
       <default>false</default>
       <whatsthis><qt>When an area of the screen is selected with mouse or keyboard, \
this is called "the selection". If this option is set, the selection is not entered \
into the clipboard history, though it is still available for pasting using the middle \
mouse button.</qt></whatsthis>  </entry>
-    <entry name="Synchronize" type="Bool">
+    <entry name="Synchronize" type="Int">
+      <label>Backwards compability, don't touch.</label>
+      <default>1</default>
+    </entry>
+    <entry name="SyncClipboards" type="Bool">
       <label>Synchronize clipboard and selection</label>
-      <default>1</default>
+      <default>false</default>
       <whatsthis><qt>When an area of the screen is selected with mouse or keyboard, \
this is called "the selection". If this option is selected, the selection and the \
clipboard is kept the same, so that anything in the selection is immediately \
available for pasting elsewhere using any method, including the traditional middle \
mouse button. Otherwise, the selection is recorded in the clipboard history, but the \
selection can only be pasted using the middle mouse button. Also see the 'Ignore \
Selection' option.</qt></whatsthis>  </entry>
     <entry name="SelectionTextOnly" type="Bool">


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

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