~packagekit/packagekit/kpackagekit-jaunty

« back to all changes in this revision

Viewing changes to debian/patches/kubuntu_01_editsources.patch

  • Committer: Anthony Mercatante
  • Date: 2009-02-24 10:20:00 UTC
  • Revision ID: tonio@tonio-laptop-20090224102000-nyrz8b0svovn3vgl
New upstream release, patch fixed to apply correctly

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
This patch was written to add support to Kpackagekit for editing software sources.
2
 
 
3
 
It is based on similar work in the previous package manager Adept, and relies on
4
 
kdesu and software-properties-kde. Once software-properties is added to policykit,
5
 
this patch can be changed to use either software-properties-kde or -gtk and remove
6
 
the kdesu requirement (as authorization would be given by policykit).
7
 
 
8
 
Roderick B. Greening <roderick.greening@gmail.com>
9
 
 
10
 
diff -ruN kpackagekit-0.3.1+20081211/Settings/KpkSettings.cpp kpackagekit-0.3.1+20081211.editsrcs/Settings/KpkSettings.cpp
11
 
--- kpackagekit-0.3.1+20081211/Settings/KpkSettings.cpp 2009-02-11 22:16:53.635938313 -0330
12
 
+++ kpackagekit-0.3.1+20081211.editsrcs/Settings/KpkSettings.cpp        2009-02-12 15:15:20.486400474 -0330
13
 
@@ -23,6 +23,7 @@
 
1
diff -Nur kpackagekit-0.4/Settings/KpkSettings.cpp kpackagekit-0.4.new/Settings/KpkSettings.cpp
 
2
--- kpackagekit-0.4/Settings/KpkSettings.cpp    2009-02-16 19:41:58.000000000 +0100
 
3
+++ kpackagekit-0.4.new/Settings/KpkSettings.cpp        2009-02-24 11:06:00.000000000 +0100
 
4
@@ -25,6 +25,7 @@
14
5
 #include <KConfig>
15
6
 #include <KLocale>
16
7
 #include <KMessageBox>
17
8
+#include <KProcess>
 
9
 #include <KpkTransactionBar.h>
18
10
 
19
 
 #define HOURLY 3600
20
 
 #define DAILY 86400
21
 
@@ -62,6 +63,12 @@
22
 
        originGB->setEnabled(false);
 
11
 using namespace PackageKit;
 
12
@@ -57,7 +58,12 @@
 
13
         originGB->setEnabled(false);
23
14
     }
24
15
 
 
16
-    intervalCB->addItem(i18n("Hourly"),  KpkEnum::Hourly);
25
17
+    // Temporarily set origin bits to hidden as the implementation is incomplete. we will
26
18
+    // use software-properties-kde temporarily for editing sources until such time as
27
19
+    // the missing functionalisy is implemented. we still let the code execute, just
28
20
+    // hide the list widget so as to not confuse the user.
29
21
+    originGB-> setHidden(true);
30
22
+
31
 
     intervalCB->addItem( i18n("Hourly"), HOURLY );
32
 
     intervalCB->addItem( i18n("Daily"), DAILY );
33
 
     intervalCB->addItem( i18n("Weekly"), WEEKLY );
34
 
@@ -76,6 +83,7 @@
35
 
     connect( notifyLongTasksCB, SIGNAL( stateChanged(int) ), this, SLOT( checkChanges() ) );
36
 
     connect( intervalCB, SIGNAL( currentIndexChanged(int) ), this, SLOT( checkChanges() ) );
37
 
     connect( autoCB, SIGNAL( currentIndexChanged(int) ), this, SLOT( checkChanges() ) );
 
23
     intervalCB->addItem(i18n("Daily"),   KpkEnum::Daily);
 
24
     intervalCB->addItem(i18n("Weekly"),  KpkEnum::Weekly);
 
25
     intervalCB->addItem(i18n("Monthly"), KpkEnum::Monthly);
 
26
@@ -71,6 +77,7 @@
 
27
     connect(notifyLongTasksCB, SIGNAL(stateChanged(int)), this, SLOT(checkChanges()));
 
28
     connect(intervalCB, SIGNAL(currentIndexChanged(int)), this, SLOT(checkChanges()));
 
29
     connect(autoCB, SIGNAL(currentIndexChanged(int)), this, SLOT(checkChanges()));
38
30
+    connect( editSourcesPB, SIGNAL( clicked() ), this, SLOT( runSourcesEditor() ) );
39
31
 }
40
32
 
41
33
 void KpkSettings::on_showOriginsCB_stateChanged(int state)
42
 
@@ -112,6 +120,27 @@
 
34
@@ -108,6 +115,27 @@
43
35
         emit(changed(false));
44
36
 }
45
37
 
67
59
 void KpkSettings::load()
68
60
 {
69
61
     KConfig config("KPackageKit");
70
 
diff -ruN kpackagekit-0.3.1+20081211/Settings/KpkSettings.h kpackagekit-0.3.1+20081211.editsrcs/Settings/KpkSettings.h
71
 
--- kpackagekit-0.3.1+20081211/Settings/KpkSettings.h   2009-02-11 22:16:52.531694509 -0330
72
 
+++ kpackagekit-0.3.1+20081211.editsrcs/Settings/KpkSettings.h  2009-02-12 12:40:31.218661194 -0330
 
62
diff -Nur kpackagekit-0.4/Settings/KpkSettings.h kpackagekit-0.4.new/Settings/KpkSettings.h
 
63
--- kpackagekit-0.4/Settings/KpkSettings.h      2009-02-16 19:41:58.000000000 +0100
 
64
+++ kpackagekit-0.4.new/Settings/KpkSettings.h  2009-02-24 11:06:26.000000000 +0100
73
65
@@ -40,6 +40,8 @@
74
66
     void save();
75
67
     void defaults();
79
71
 
80
72
 signals:
81
73
     void changed(bool state);
82
 
diff -ruN kpackagekit-0.3.1+20081211/Settings/KpkSettings.ui kpackagekit-0.3.1+20081211.editsrcs/Settings/KpkSettings.ui
83
 
--- kpackagekit-0.3.1+20081211/Settings/KpkSettings.ui  2009-02-11 22:16:52.551734068 -0330
84
 
+++ kpackagekit-0.3.1+20081211.editsrcs/Settings/KpkSettings.ui 2009-02-12 15:39:07.410318534 -0330
85
 
@@ -56,6 +56,26 @@
 
74
diff -Nur kpackagekit-0.4/Settings/KpkSettings.ui kpackagekit-0.4.new/Settings/KpkSettings.ui
 
75
--- kpackagekit-0.4/Settings/KpkSettings.ui     2009-02-16 19:41:58.000000000 +0100
 
76
+++ kpackagekit-0.4.new/Settings/KpkSettings.ui 2009-02-24 11:09:28.000000000 +0100
 
77
@@ -59,6 +59,26 @@
86
78
         </property>
87
79
        </widget>
88
80
       </item>