patch restart polkit-kde on crash patch to remove unimplimented 'remember authorization' checkboxepel9
parent
3dd4f3c622
commit
39266139cd
@ -0,0 +1,34 @@
|
||||
From 0701f84a57156f8f584bb4fe928811a26ceefcf0 Mon Sep 17 00:00:00 2001
|
||||
From: Jonathan Thomas <echidnaman@kubuntu.org>
|
||||
Date: Wed, 19 Jan 2011 10:21:53 -0500
|
||||
Subject: [PATCH 05/20] Bring the auth dialog to the front when it is shown.
|
||||
Otherwise it pops up behind the app requesting it and
|
||||
the user never sees it.
|
||||
|
||||
---
|
||||
policykitlistener.cpp | 2 ++
|
||||
1 files changed, 2 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/policykitlistener.cpp b/policykitlistener.cpp
|
||||
index 68185bc..bb95f1d 100644
|
||||
--- a/policykitlistener.cpp
|
||||
+++ b/policykitlistener.cpp
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "AuthDialog.h"
|
||||
|
||||
#include <KDebug>
|
||||
+#include <KWindowSystem>
|
||||
|
||||
#include <PolkitQt1/Agent/Listener>
|
||||
#include <PolkitQt1/Agent/Session>
|
||||
@@ -100,6 +101,7 @@ void PolicyKitListener::initiateAuthentication(const QString &actionId,
|
||||
kDebug() << "WinId of the dialog is " << m_dialog.data()->winId() << m_dialog.data()->effectiveWinId();
|
||||
m_dialog.data()->setOptions();
|
||||
m_dialog.data()->show();
|
||||
+ KWindowSystem::forceActiveWindow(m_dialog.data()->winId());
|
||||
kDebug() << "WinId of the shown dialog is " << m_dialog.data()->winId() << m_dialog.data()->effectiveWinId();
|
||||
|
||||
m_numTries = 0;
|
||||
--
|
||||
1.7.7.4
|
||||
|
@ -0,0 +1,35 @@
|
||||
From 34b6e24316e83bb13bb1b420616bc986783bb249 Mon Sep 17 00:00:00 2001
|
||||
From: Jonathan Thomas <echidnaman@kubuntu.org>
|
||||
Date: Sat, 22 Oct 2011 19:31:55 -0400
|
||||
Subject: [PATCH 16/20] Autorestart when we crash. This way a polkit-kde-1
|
||||
crash won't prevent polkit auth from working until
|
||||
the next login.
|
||||
|
||||
---
|
||||
main.cpp | 3 +++
|
||||
1 files changed, 3 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/main.cpp b/main.cpp
|
||||
index e197cee..2fa928f 100644
|
||||
--- a/main.cpp
|
||||
+++ b/main.cpp
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <KCmdLineArgs>
|
||||
#include <KAboutData>
|
||||
#include <KLocale>
|
||||
+#include <KCrash>
|
||||
|
||||
#include "policykitkde.h"
|
||||
|
||||
@@ -32,6 +33,8 @@ int main(int argc, char *argv[])
|
||||
aboutData.addAuthor(ki18n("Jaroslav Reznik"), ki18n("Maintainer"), "jreznik@redhat.com");
|
||||
aboutData.setProductName("policykit-kde/polkit-kde-authentication-agent-1");
|
||||
|
||||
+ KCrash::setFlags(KCrash::AutoRestart);
|
||||
+
|
||||
KCmdLineArgs::init(argc, argv, &aboutData);
|
||||
|
||||
if (!PolicyKitKDE::start()) {
|
||||
--
|
||||
1.7.7.4
|
||||
|
@ -0,0 +1,30 @@
|
||||
From 599b36eddd2ae4d8d2967255c503a680002dabf7 Mon Sep 17 00:00:00 2001
|
||||
From: Jonathan Thomas <echidnaman@kubuntu.org>
|
||||
Date: Tue, 25 Oct 2011 17:28:38 -0400
|
||||
Subject: [PATCH 17/20] Of course, we can only set KCrash flags after
|
||||
KCmdLineArgs::init() has been called
|
||||
|
||||
---
|
||||
main.cpp | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/main.cpp b/main.cpp
|
||||
index 2fa928f..ab359b7 100644
|
||||
--- a/main.cpp
|
||||
+++ b/main.cpp
|
||||
@@ -33,10 +33,10 @@ int main(int argc, char *argv[])
|
||||
aboutData.addAuthor(ki18n("Jaroslav Reznik"), ki18n("Maintainer"), "jreznik@redhat.com");
|
||||
aboutData.setProductName("policykit-kde/polkit-kde-authentication-agent-1");
|
||||
|
||||
- KCrash::setFlags(KCrash::AutoRestart);
|
||||
-
|
||||
KCmdLineArgs::init(argc, argv, &aboutData);
|
||||
|
||||
+ KCrash::setFlags(KCrash::AutoRestart);
|
||||
+
|
||||
if (!PolicyKitKDE::start()) {
|
||||
qWarning("PolicyKitKDE is already running!\n");
|
||||
return 0;
|
||||
--
|
||||
1.7.7.4
|
||||
|
@ -0,0 +1,58 @@
|
||||
From 27cfdc75084e57f22ba93c54f2387a7c47378d90 Mon Sep 17 00:00:00 2001
|
||||
From: Felix Geyer <debfx-kde@fobos.de>
|
||||
Date: Tue, 8 Nov 2011 20:44:05 +0100
|
||||
Subject: [PATCH 19/20] Remove unused "Remember authorization" checkboxes.
|
||||
|
||||
The checkboxes were visible in the UI but the feature
|
||||
isn't actually implemented.
|
||||
---
|
||||
AuthDialog.ui | 33 ---------------------------------
|
||||
1 files changed, 0 insertions(+), 33 deletions(-)
|
||||
|
||||
diff --git a/AuthDialog.ui b/AuthDialog.ui
|
||||
index 27480ff..3b9bbc6 100644
|
||||
--- a/AuthDialog.ui
|
||||
+++ b/AuthDialog.ui
|
||||
@@ -114,39 +114,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
- <item row="4" column="1" colspan="3" >
|
||||
- <widget class="QCheckBox" name="cbRemember" >
|
||||
- <property name="text" >
|
||||
- <string>Remember authorization</string>
|
||||
- </property>
|
||||
- <property name="checked" >
|
||||
- <bool>true</bool>
|
||||
- </property>
|
||||
- </widget>
|
||||
- </item>
|
||||
- <item row="5" column="2" colspan="2" >
|
||||
- <widget class="QCheckBox" name="cbSessionOnly" >
|
||||
- <property name="text" >
|
||||
- <string>For this session only</string>
|
||||
- </property>
|
||||
- </widget>
|
||||
- </item>
|
||||
- <item row="5" column="1" >
|
||||
- <spacer name="horizontalSpacer" >
|
||||
- <property name="orientation" >
|
||||
- <enum>Qt::Horizontal</enum>
|
||||
- </property>
|
||||
- <property name="sizeType" >
|
||||
- <enum>QSizePolicy::Fixed</enum>
|
||||
- </property>
|
||||
- <property name="sizeHint" stdset="0" >
|
||||
- <size>
|
||||
- <width>15</width>
|
||||
- <height>10</height>
|
||||
- </size>
|
||||
- </property>
|
||||
- </spacer>
|
||||
- </item>
|
||||
<item row="1" column="1" colspan="3" >
|
||||
<widget class="KComboBox" name="userCB" />
|
||||
</item>
|
||||
--
|
||||
1.7.7.4
|
||||
|
@ -0,0 +1,37 @@
|
||||
From 3a9906d2b5d1c504670442277906ed53cd9686e8 Mon Sep 17 00:00:00 2001
|
||||
From: Dario Freddi <drf@kde.org>
|
||||
Date: Fri, 25 Nov 2011 23:08:07 +0100
|
||||
Subject: [PATCH 20/20] CCMAIL: echidnaman@kubuntu.org
|
||||
|
||||
KCrash must be initialized after KUniqueApplication is started, to avoid KCmdLine to parse its arguments before that.
|
||||
|
||||
P.S.: While I do appreciate the contribution and I think the patch was really useful,
|
||||
it would be awesome if those changes went through review first. If they went through and I forgot
|
||||
about it and didn't spot the problem earlier, feel free to hit me with a stick instead.
|
||||
---
|
||||
main.cpp | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/main.cpp b/main.cpp
|
||||
index ab359b7..33ef236 100644
|
||||
--- a/main.cpp
|
||||
+++ b/main.cpp
|
||||
@@ -35,13 +35,13 @@ int main(int argc, char *argv[])
|
||||
|
||||
KCmdLineArgs::init(argc, argv, &aboutData);
|
||||
|
||||
- KCrash::setFlags(KCrash::AutoRestart);
|
||||
-
|
||||
if (!PolicyKitKDE::start()) {
|
||||
qWarning("PolicyKitKDE is already running!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
+ KCrash::setFlags(KCrash::AutoRestart);
|
||||
+
|
||||
PolicyKitKDE agent;
|
||||
agent.disableSessionManagement();
|
||||
agent.exec();
|
||||
--
|
||||
1.7.7.4
|
||||
|
Loading…
Reference in new issue