[kde-doc-english] [kdesvn] src/ksvnwidgets: REVIEW: 121680

Christian Ehrlicher Ch.Ehrlicher at gmx.de
Thu Jan 1 14:19:40 UTC 2015


Git commit fed663863b26187aef46378e19d2cae17785e9f8 by Christian Ehrlicher.
Committed on 25/12/2014 at 10:47.
Pushed by chehrlic into branch 'master'.

REVIEW: 121680
BUG: 332863 - Wish: Please add an "Unselect all"-buttton to commit dialog
GUI: New button added in commit dialog

M  +26   -2    src/ksvnwidgets/commitmessage.ui
M  +10   -0    src/ksvnwidgets/commitmsg_impl.cpp
M  +1    -0    src/ksvnwidgets/commitmsg_impl.h

http://commits.kde.org/kdesvn/fed663863b26187aef46378e19d2cae17785e9f8

diff --git a/src/ksvnwidgets/commitmessage.ui b/src/ksvnwidgets/commitmessage.ui
index 4a5538f..a5c2fdb 100644
--- a/src/ksvnwidgets/commitmessage.ui
+++ b/src/ksvnwidgets/commitmessage.ui
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>507</width>
-    <height>461</height>
+    <width>600</width>
+    <height>400</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -73,6 +73,13 @@
           </widget>
          </item>
          <item>
+          <widget class="QPushButton" name="m_UnselectAllButton">
+           <property name="text">
+            <string>Unselect all</string>
+           </property>
+          </widget>
+         </item>
+         <item>
           <widget class="QPushButton" name="m_HideNewItems">
            <property name="text">
             <string>Hide new items</string>
@@ -403,10 +410,27 @@
     </hint>
    </hints>
   </connection>
+  <connection>
+   <sender>m_UnselectAllButton</sender>
+   <signal>clicked()</signal>
+   <receiver>CommitMessage</receiver>
+   <slot>slotUnselectAll()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>513</x>
+     <y>50</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>299</x>
+     <y>199</y>
+    </hint>
+   </hints>
+  </connection>
  </connections>
  <slots>
   <slot>slotRevertSelected()</slot>
   <slot>slotItemDoubleClicked(QModelIndex)</slot>
   <slot>slotSelectAll()</slot>
+  <slot>slotUnselectAll()</slot>
  </slots>
 </ui>
diff --git a/src/ksvnwidgets/commitmsg_impl.cpp b/src/ksvnwidgets/commitmsg_impl.cpp
index 039af38..c0b8eff 100644
--- a/src/ksvnwidgets/commitmsg_impl.cpp
+++ b/src/ksvnwidgets/commitmsg_impl.cpp
@@ -551,6 +551,7 @@ void Commitmsg_impl::hideButtons(bool how)
         m_DiffItem->hide();
         m_HideNewItems->hide();
         m_SelectAllButton->hide();
+        m_UnselectAllButton->hide();
     }
     else
     {
@@ -559,6 +560,7 @@ void Commitmsg_impl::hideButtons(bool how)
         m_DiffItem->show();
         m_HideNewItems->show();
         m_SelectAllButton->show();
+        m_UnselectAllButton->show();
     }
 }
 
@@ -581,6 +583,14 @@ void Commitmsg_impl::slotSelectAll()
     m_CurrentModel->markItems(true,CommitActionEntry::ALL);
 }
 
+void Commitmsg_impl::slotUnselectAll()
+{
+    if (!m_CurrentModel) {
+        return;
+    }
+    m_CurrentModel->markItems(false,CommitActionEntry::ALL);
+}
+
 void Commitmsg_impl::hideNewItems(bool how)
 {
     if (!m_CurrentModel) {
diff --git a/src/ksvnwidgets/commitmsg_impl.h b/src/ksvnwidgets/commitmsg_impl.h
index 0e53b1a..8564b38 100644
--- a/src/ksvnwidgets/commitmsg_impl.h
+++ b/src/ksvnwidgets/commitmsg_impl.h
@@ -77,6 +77,7 @@ protected Q_SLOTS:
     virtual void slotItemReverted(const QStringList&);
     virtual void slotItemDoubleClicked(const QModelIndex&);
     virtual void slotSelectAll();
+    virtual void slotUnselectAll();
 
 protected:
     static QStringList sLogHistory;


More information about the kde-doc-english mailing list