~ubuntu-branches/ubuntu/maverick/kdebase/maverick

« back to all changes in this revision

Viewing changes to debian/patches/kubuntu_05_folderview_triggered_by_click_or_hover.diff

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2010-09-10 21:47:50 UTC
  • Revision ID: james.westby@ubuntu.com-20100910214750-sm19jd3npf1z6e7d
Tags: 4:4.5.1-0ubuntu2
* Add kubuntu_01_fix_preview_in_tooltip.diff
  (http://bugs.kde.org/show_bug.cgi?id=250000)
* Add kubuntu_02_fix_konqueror_malformed_error.diff to fix
  malformed url error when when reloading the initial about:konqueror page
* Add kubuntu_03_fix_konsole_tab_width.diff
  (http://bugs.kde.org/show_bug.cgi?id=166573
   http://bugs.kde.org/show_bug.cgi?id=189847
   http://bugs.kde.org/show_bug.cgi?id=157201)
* Add kubuntu_05_folderview_triggered_by_click_or_hover.diff
  (http://websvn.kde.org/?view=revision&revision=1171793)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--- kdebase-4.5.1/apps/plasma/applets/folderview/actionoverlay.cpp      2010/09/05 07:14:26     1171792
 
2
+++ kdebase-4.5.1/apps/plasma/applets/folderview/actionoverlay.cpp      2010/09/05 07:17:53     1171793
 
3
@@ -191,7 +191,7 @@
 
4
         view->openPopup(m_hoverIndex);
 
5
     }
 
6
 }
 
7
-    
 
8
+
 
9
 QPersistentModelIndex ActionOverlay::hoverIndex()
 
10
 {
 
11
     return m_hoverIndex;
 
12
@@ -213,7 +213,12 @@
 
13
             fadeIn->start();
 
14
         }
 
15
         m_hoverIndex = index;
 
16
-        AsyncFileTester::checkIfFolder(index, this, "checkIfFolderResult");
 
17
+        IconView *iview = qobject_cast<IconView*>(view);
 
18
+        if (iview && iview->clickToViewFolders()) {
 
19
+            AsyncFileTester::checkIfFolder(index, this, "checkIfFolderResult");
 
20
+        } else {
 
21
+            m_openButton->hide();
 
22
+        }
 
23
     }
 
24
 }
 
25
 
 
26
--- kdebase-4.5.1/apps/plasma/applets/folderview/iconview.cpp   2010/09/05 07:14:26     1171792
 
27
+++ kdebase-4.5.1/apps/plasma/applets/folderview/iconview.cpp   2010/09/05 07:17:53     1171793
 
28
@@ -84,6 +84,7 @@
 
29
       m_wordWrap(false),
 
30
       m_popupShowPreview(true),
 
31
       m_folderIsEmpty(false),
 
32
+      m_clickToViewFolders(true),
 
33
       m_flow(layoutDirection() == Qt::LeftToRight ? LeftToRight : RightToLeft),
 
34
       m_popupCausedWidget(0),
 
35
       m_dropOperation(0),
 
36
@@ -1593,6 +1594,9 @@
 
37
         emit entered(index);
 
38
         m_hoveredIndex = index;
 
39
         markAreaDirty(visualRect(index));
 
40
+        if (!m_clickToViewFolders) {
 
41
+            AsyncFileTester::checkIfFolder(m_hoveredIndex, this, "checkIfFolderResult");
 
42
+        }
 
43
     }
 
44
     updateToolTip();
 
45
 }
 
46
@@ -1625,6 +1629,10 @@
 
47
         markAreaDirty(visualRect(m_hoveredIndex));
 
48
         m_hoveredIndex = index;
 
49
         updateToolTip();
 
50
+
 
51
+        if (!m_clickToViewFolders) {
 
52
+            AsyncFileTester::checkIfFolder(m_hoveredIndex, this, "checkIfFolderResult");
 
53
+        }
 
54
     }
 
55
 }
 
56
 
 
57
@@ -2568,6 +2576,16 @@
 
58
     }
 
59
 }
 
60
 
 
61
+void IconView::setClickToViewFolders(bool click)
 
62
+{
 
63
+    m_clickToViewFolders = click;
 
64
+}
 
65
+
 
66
+bool IconView::clickToViewFolders() const
 
67
+{
 
68
+    return m_clickToViewFolders;
 
69
+}
 
70
+
 
71
 void IconView::openPopup(const QModelIndex &index)
 
72
 {
 
73
     if (m_popupView && m_popupIndex == index) {
 
74
--- kdebase-4.5.1/apps/plasma/applets/folderview/iconview.h     2010/09/05 07:14:26     1171792
 
75
+++ kdebase-4.5.1/apps/plasma/applets/folderview/iconview.h     2010/09/05 07:17:53     1171793
 
76
@@ -127,6 +127,8 @@
 
77
 
 
78
     void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
 
79
 
 
80
+    void setClickToViewFolders(bool click);
 
81
+    bool clickToViewFolders() const;
 
82
     void openPopup(const QModelIndex &index);
 
83
 
 
84
 signals:
 
85
@@ -237,6 +239,7 @@
 
86
     bool m_wordWrap;
 
87
     bool m_popupShowPreview;
 
88
     bool m_folderIsEmpty;
 
89
+    bool m_clickToViewFolders;
 
90
     QPersistentModelIndex m_hoveredIndex;
 
91
     QPersistentModelIndex m_pressedIndex;
 
92
     QPersistentModelIndex m_editorIndex;
 
93
--- kdebase-4.5.1/apps/plasma/applets/folderview/popupview.cpp  2010/09/05 07:14:26     1171792
 
94
+++ kdebase-4.5.1/apps/plasma/applets/folderview/popupview.cpp  2010/09/05 07:17:53     1171793
 
95
@@ -209,6 +209,7 @@
 
96
     m_iconView->setGridSize(m_parentView->gridSize());
 
97
     m_iconView->setWordWrap(m_parentView->wordWrap());
 
98
     m_iconView->setIconsMoveable(false);
 
99
+    m_iconView->setClickToViewFolders(false);
 
100
 
 
101
     connect(m_iconView, SIGNAL(activated(QModelIndex)), SLOT(activated(QModelIndex)));
 
102
     connect(m_iconView, SIGNAL(contextMenuRequest(QWidget*,QPoint)), SLOT(contextMenuRequest(QWidget*,QPoint)));