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

List:       kde-devel
Subject:    [Patch] bug 198661
From:       Ravi Vagadia <ravirdv () gmail ! com>
Date:       2009-12-12 16:25:24
Message-ID: 5632b930912120813p75bf03d3qd3af165123bb0c15 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hello, this is my first patch :)

if there are any changes required i'll do it :)


https://bugs.kde.org/show_bug.cgi?id=198661




With Regards,
Ravi Vagadia


Charles de Gaulle<http://www.brainyquote.com/quotes/authors/c/charles_de_gaulle.html>
- "The better I get to know men, the more I find myself loving dogs."

[Attachment #5 (text/html)]

<div class="gmail_quote"><div>Hello, this is my first patch \
:)</div><div><br></div><div>if there are any changes required i&#39;ll do it \
:)</div><div><br></div><div><br></div><div><a \
href="https://bugs.kde.org/show_bug.cgi?id=198661">https://bugs.kde.org/show_bug.cgi?id=198661</a></div>


<br clear="all"><br><br><br>With Regards,<br>Ravi Vagadia</div><div \
class="gmail_quote"><br></div><div class="gmail_quote"><br><a \
href="http://www.brainyquote.com/quotes/authors/c/charles_de_gaulle.html" \
target="_blank">Charles de Gaulle</a>  - &quot;The better I get to know men, the more \
I find myself loving dogs.&quot; </div><br>

--0016e644c18e10c995047a8a5317--


["snapshot1.png" (image/png)]
["patch.patch" (text/x-patch)]

Index: taskgroupitem.cpp
===================================================================
--- taskgroupitem.cpp	(revision 1061397)
+++ taskgroupitem.cpp	(working copy)
@@ -1267,7 +1267,7 @@
 
 void TaskGroupItem::wheelEvent(QGraphicsSceneWheelEvent *event)
 {
-    focusSubTask((event->delta() > 0), true);
+   if(m_applet->scrollSwitch()) focusSubTask((event->delta() > 0), true);
 }
 
 int TaskGroupItem::maxRows()
Index: tasksConfig.ui
===================================================================
--- tasksConfig.ui	(revision 1061397)
+++ tasksConfig.ui	(working copy)
@@ -6,7 +6,7 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>507</width>
+    <width>431</width>
     <height>391</height>
    </rect>
   </property>
@@ -24,7 +24,7 @@
      </property>
     </widget>
    </item>
-   <item row="1" column="1">
+   <item row="2" column="1">
     <widget class="QLabel" name="label_7">
      <property name="text">
       <string>Show tooltips:</string>
@@ -37,14 +37,14 @@
      </property>
     </widget>
    </item>
-   <item row="1" column="2">
+   <item row="2" column="2">
     <widget class="QCheckBox" name="showTooltip">
      <property name="text">
       <string/>
      </property>
     </widget>
    </item>
-   <item row="2" column="1">
+   <item row="3" column="1">
     <widget class="QLabel" name="label_8">
      <property name="text">
       <string>Force row settings:</string>
@@ -54,14 +54,7 @@
      </property>
     </widget>
    </item>
-   <item row="2" column="2">
-    <widget class="QCheckBox" name="fillRows">
-     <property name="text">
-      <string/>
-     </property>
-    </widget>
-   </item>
-   <item row="3" column="1">
+   <item row="4" column="1">
     <spacer name="verticalSpacer_6">
      <property name="orientation">
       <enum>Qt::Vertical</enum>
@@ -77,7 +70,7 @@
      </property>
     </spacer>
    </item>
-   <item row="4" column="1">
+   <item row="5" column="1">
     <widget class="QLabel" name="label_3">
      <property name="text">
       <string>Maximum rows:</string>
@@ -90,7 +83,7 @@
      </property>
     </widget>
    </item>
-   <item row="4" column="2">
+   <item row="5" column="2">
     <layout class="QHBoxLayout" name="horizontalLayout">
      <item>
       <widget class="KIntSpinBox" name="maxRows">
@@ -117,7 +110,7 @@
      </item>
     </layout>
    </item>
-   <item row="5" column="1">
+   <item row="6" column="1">
     <spacer name="verticalSpacer_2">
      <property name="orientation">
       <enum>Qt::Vertical</enum>
@@ -133,7 +126,7 @@
      </property>
     </spacer>
    </item>
-   <item row="6" column="0" colspan="3">
+   <item row="7" column="0" colspan="3">
     <widget class="QLabel" name="label_6">
      <property name="font">
       <font>
@@ -146,7 +139,7 @@
      </property>
     </widget>
    </item>
-   <item row="7" column="1">
+   <item row="8" column="1">
     <widget class="QLabel" name="label">
      <property name="text">
       <string>Grouping:</string>
@@ -159,7 +152,7 @@
      </property>
     </widget>
    </item>
-   <item row="7" column="2">
+   <item row="8" column="2">
     <layout class="QHBoxLayout" name="horizontalLayout_2">
      <item>
       <widget class="QComboBox" name="groupingStrategy">
@@ -186,7 +179,7 @@
      </item>
     </layout>
    </item>
-   <item row="8" column="2">
+   <item row="9" column="2">
     <layout class="QHBoxLayout" name="horizontalLayout_4">
      <item>
       <spacer name="horizontalSpacer">
@@ -219,7 +212,7 @@
      </item>
     </layout>
    </item>
-   <item row="9" column="1">
+   <item row="10" column="1">
     <widget class="QLabel" name="label_2">
      <property name="text">
       <string>Sorting:</string>
@@ -232,7 +225,7 @@
      </property>
     </widget>
    </item>
-   <item row="9" column="2">
+   <item row="10" column="2">
     <layout class="QHBoxLayout" name="horizontalLayout_3">
      <item>
       <widget class="QComboBox" name="sortingStrategy">
@@ -259,7 +252,7 @@
      </item>
     </layout>
    </item>
-   <item row="10" column="0">
+   <item row="11" column="0">
     <widget class="QLabel" name="label_4">
      <property name="font">
       <font>
@@ -272,7 +265,7 @@
      </property>
     </widget>
    </item>
-   <item row="10" column="1">
+   <item row="11" column="1">
     <spacer name="verticalSpacer_4">
      <property name="orientation">
       <enum>Qt::Vertical</enum>
@@ -288,28 +281,28 @@
      </property>
     </spacer>
    </item>
-   <item row="11" column="1" colspan="2">
+   <item row="12" column="1" colspan="2">
     <widget class="QCheckBox" name="showOnlyCurrentDesktop">
      <property name="text">
       <string>Only show tasks from the current desktop</string>
      </property>
     </widget>
    </item>
-   <item row="12" column="1" colspan="2">
+   <item row="13" column="1" colspan="2">
     <widget class="QCheckBox" name="showOnlyCurrentScreen">
      <property name="text">
       <string>Only show tasks from the current screen</string>
      </property>
     </widget>
    </item>
-   <item row="13" column="1" colspan="2">
+   <item row="15" column="1" colspan="2">
     <widget class="QCheckBox" name="showOnlyMinimized">
      <property name="text">
       <string>Only show tasks that are minimized</string>
      </property>
     </widget>
    </item>
-   <item row="14" column="1">
+   <item row="17" column="1">
     <spacer name="verticalSpacer">
      <property name="orientation">
       <enum>Qt::Vertical</enum>
@@ -322,6 +315,20 @@
      </property>
     </spacer>
    </item>
+   <item row="3" column="2">
+    <widget class="QCheckBox" name="fillRows">
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+   </item>
+   <item row="16" column="1" colspan="2">
+    <widget class="QCheckBox" name="scrollSwitch">
+     <property name="text">
+      <string>Switch tasks using wheel</string>
+     </property>
+    </widget>
+   </item>
   </layout>
  </widget>
  <customwidgets>
Index: tasks.cpp
===================================================================
--- tasks.cpp	(revision 1061397)
+++ tasks.cpp	(working copy)
@@ -78,6 +78,8 @@
 
     KConfigGroup cg = config();
     m_showTooltip = cg.readEntry("showTooltip", true);
+    m_scrollSwitch = cg.readEntry("scrollSwitch",true);
+    
 
     m_groupManager = new TaskManager::GroupManager(this);
     Plasma::Containment* appletContainment = containment();
@@ -249,6 +251,7 @@
      parent->addPage(widget, i18n("General"), icon());
 
     m_ui.showTooltip->setChecked(m_showTooltip);
+    m_ui.scrollSwitch->setChecked(m_scrollSwitch);
     m_ui.showOnlyCurrentDesktop->setChecked(m_groupManager->showOnlyCurrentDesktop());
                
     m_ui.showOnlyCurrentScreen->setChecked(m_groupManager->showOnlyCurrentScreen());
     m_ui.showOnlyMinimized->setChecked(m_groupManager->showOnlyMinimized());
@@ -333,6 +336,7 @@
         changed = true;
     }
 
+
     if (m_groupManager->groupingStrategy() != \
(m_ui.groupingStrategy->currentIndex())) {  \
m_groupManager->setGroupingStrategy(static_cast<TaskManager::GroupManager::TaskGroupin \
gStrategy>(m_ui.groupingStrategy->itemData(m_ui.groupingStrategy->currentIndex()).toInt()));
  KConfigGroup cg = config();
@@ -375,7 +379,13 @@
         cg.writeEntry("showTooltip", m_showTooltip);
         changed = true;
     }
-
+    if (m_scrollSwitch != (m_ui.scrollSwitch->checkState() == Qt::Checked)) {
+        m_scrollSwitch = !m_scrollSwitch;
+        KConfigGroup cg = config();
+        cg.writeEntry("scrollSwitch", m_scrollSwitch);
+        changed = true;
+    }
+    
     if (changed) {
         emit settingsChanged();
         emit configNeedsSaving();
@@ -388,6 +398,10 @@
     return m_showTooltip;
 }
 
+bool Tasks::scrollSwitch() const
+{
+    return m_scrollSwitch;
+}
 void Tasks::needsVisualFocus()
 {
     emit activate();
Index: tasks.h
===================================================================
--- tasks.h	(revision 1061397)
+++ tasks.h	(working copy)
@@ -100,6 +100,7 @@
         Qt::KeyboardModifiers groupModifierKey() const;
 
         bool showToolTip() const;
+	bool scrollSwitch() const;
 
         void needsVisualFocus();
         QWidget *popupDialog() const;
@@ -129,6 +130,7 @@
 
 private:
         bool m_showTooltip;
+	bool m_scrollSwitch;
         Plasma::LayoutAnimator *m_animator;
         QGraphicsLinearLayout *layout;
 
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt	(revision 1061397)
+++ CMakeLists.txt	(working copy)
@@ -2,7 +2,7 @@
 
 set(tasks_SRCS
     windowtaskitem.cpp tasks.cpp taskitemlayout.cpp abstracttaskitem.cpp \
                taskgroupitem.cpp)
-
+find_package(KDE4 REQUIRED)
 kde4_add_ui_files(tasks_SRCS tasksConfig.ui )
 kde4_add_plugin(plasma_applet_tasks ${tasks_SRCS})
 target_link_libraries(plasma_applet_tasks ${KDE4_KDEUI_LIBS} ${KDE4_PLASMA_LIBS} \
taskmanager)



>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


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

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