Package: krusader / 1:2.2.0~beta1-2+squeeze1

backport_fix_krusader_not_terminating.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
From: Jan Lepper <dehtris@yahoo.de>
Subject: better fix for Krusader not terminating: create panel popup on demand
Bug-Debian: http://bugs.debian.org/604196
Forwarded: yes
Origin: backport, svn diff svn://anonsvn.kde.org/home/kde -c 1169424
 svn diff svn://anonsvn.kde.org/home/kde -c 1169519
Last-Update: 2011-01-19
Reviewed-By: Modestas Vainius <modax@debian.org>

--- a/krusader/Panel/listpanel.cpp
+++ b/krusader/Panel/listpanel.cpp
@@ -332,13 +332,6 @@ ListPanel::ListPanel(int typeIn, QWidget
     // view
     createView();
 
-    // popup panel
-    popup = new PanelPopup(splt, left);
-    connect(popup, SIGNAL(selection(const KUrl&)), SLOTS, SLOT(refresh(const KUrl&)));
-    connect(popup, SIGNAL(hideMe()), this, SLOT(togglePanelPopup()));
-    popup->hide();
-
-
     //filter = ALL;
 
     // create the layout
@@ -497,6 +490,12 @@ bool ListPanel::eventFilter(QObject * wa
 
 void ListPanel::togglePanelPopup()
 {
+    if(!popup) {
+        popup = new PanelPopup(splt, left);
+        connect(popup, SIGNAL(selection(const KUrl&)), SLOTS, SLOT(refresh(const KUrl&)));
+        connect(popup, SIGNAL(hideMe()), this, SLOT(togglePanelPopup()));
+    }
+
     if (popup->isHidden()) {
         if (popupSizes.count() > 0) {
             dynamic_cast<QSplitter*>(popup->parent())->setSizes(popupSizes);
@@ -1234,7 +1233,8 @@ void ListPanel::slotJobStarted(KIO::Job*
     cdUpButton->setEnabled(false);
     cdOtherButton->setEnabled(false);
     popupBtn->setEnabled(false);
-    popup->setEnabled(false);
+    if(popup)
+        popup->setEnabled(false);
     bookmarksButton->setEnabled(false);
     historyButton->setEnabled(false);
     syncBrowseButton->setEnabled(false);
@@ -1287,7 +1287,8 @@ void ListPanel::inlineRefreshListResult(
     cdUpButton->setEnabled(true);
     cdOtherButton->setEnabled(true);
     popupBtn->setEnabled(true);
-    popup->setEnabled(true);
+    if(popup)
+        popup->setEnabled(true);
     bookmarksButton->setEnabled(true);
     historyButton->setEnabled(true);
     syncBrowseButton->setEnabled(true);
@@ -1358,20 +1359,22 @@ void ListPanel::editLocation()
 
 void ListPanel::saveSettings(KConfigGroup &cfg)
 {
-    popup->saveSizes();
-    cfg.writeEntry(_left ? "Left Panel Popup" : "Right Panel Popup", popup->currentPage());
+    if(popup) {
+        popup->saveSizes();
+        cfg.writeEntry(_left ? "Left Panel Popup" : "Right Panel Popup", popup->currentPage());
+    }
 }
 
 void ListPanel::updatePopupPanel(KrViewItem *item)
 {
     // which panel to display on?
     ListPanel *lp = 0;
-    if (popup->isHidden() && otherPanel->gui->popup->isHidden())
-        return;
-    if (!popup->isHidden())
+    if(popup && !popup->isHidden())
         lp = this;
-    else if (!otherPanel->gui->popup->isHidden())
-        lp = ACTIVE_PANEL->otherPanel->gui;
+    else if(otherPanel->gui->popup && !otherPanel->gui->popup->isHidden())
+        lp = otherPanel->gui;
+    else
+        return;
 
     KUrl url;
     if (item->name() != "..") // updir