~ubuntu-branches/ubuntu/saucy/policykit-1-gnome/saucy

« back to all changes in this revision

Viewing changes to debian/patches/04-autorestart.patch

  • Committer: Bazaar Package Importer
  • Author(s): Mathieu Trudel-Lapierre, Mathieu Trudel-Lapierre, Martin Pitt
  • Date: 2011-05-16 15:15:29 UTC
  • mfrom: (7.2.3 sid)
  • Revision ID: james.westby@ubuntu.com-20110516151529-92j9jm2xi7ewresg
Tags: 0.101-2ubuntu1
[ Mathieu Trudel-Lapierre ]
* Merge with Debian unstable; remaining changes (LP: #777366):
  - 04-autorestart.patch: Add gnome session restart support to ensure we
    always have an authentication agent running. To be forwarded upstream.
  - 06-authentication-failure-string.patch: Improve error message displayed
    when authentication fails.
  - Tell the .desktop file for the authentication agent to auto-restart the
    agent in case of failure.
  - Use dh-autoreconf to reconfigure after applying patches, especially for
    04-autorestart.patch.
* debian/patches/05-appindicator.patch: dropped, partly due to upstream
  dropping status icon support. This also fixes usability bug (LP: #550502).
* debian/patches/04-autorestart.patch: refreshed to apply cleanly.

[ Martin Pitt ]
* debian/rules, debian/control: Build against GTK 3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
## Author: Michael Vogt <mvo@ubuntu.com>
4
4
## Origin: inspired by the at-spi dbus support code
5
5
## Bug: http://launchpad.net/bugs/623819
6
 
Index: policykit-1-gnome-0.99/src/polkit-gnome-authentication-agent-1.desktop.in.in
7
 
===================================================================
8
 
--- policykit-1-gnome-0.99.orig/src/polkit-gnome-authentication-agent-1.desktop.in.in   2011-02-21 16:10:25.000000000 +0000
9
 
+++ policykit-1-gnome-0.99/src/polkit-gnome-authentication-agent-1.desktop.in.in        2011-02-21 16:10:26.000000000 +0000
10
 
@@ -7,3 +7,4 @@
11
 
 Categories=
12
 
 NoDisplay=true
13
 
 OnlyShowIn=GNOME;XFCE;
14
 
+X-GNOME-AutoRestart=true
15
 
Index: policykit-1-gnome-0.99/src/main.c
16
 
===================================================================
17
 
--- policykit-1-gnome-0.99.orig/src/main.c      2011-02-21 16:10:10.000000000 +0000
18
 
+++ policykit-1-gnome-0.99/src/main.c   2011-02-21 16:10:28.000000000 +0000
 
6
Index: policykit-1-gnome-0.101/src/main.c
 
7
===================================================================
 
8
--- policykit-1-gnome-0.101.orig/src/main.c     2011-03-03 13:44:49.000000000 -0500
 
9
+++ policykit-1-gnome-0.101/src/main.c  2011-05-05 12:16:40.144734966 -0400
19
10
@@ -27,6 +27,7 @@
20
11
 #include <gtk/gtk.h>
21
12
 #include <glib/gi18n.h>
24
15
 
25
16
 #include "polkitgnomelistener.h"
26
17
 
27
 
@@ -198,11 +199,131 @@
28
 
   update_temporary_authorization_icon (authority);
29
 
 }
30
 
 
31
 
+// session management support for auto-restart 
 
18
@@ -38,11 +39,131 @@
 
19
 
 
20
 static GDBusConnection *session_bus_connection = NULL;
 
21
 
 
22
+// session management support for auto-restart
32
23
+#define SM_DBUS_NAME      "org.gnome.SessionManager"
33
24
+#define SM_DBUS_PATH      "/org/gnome/SessionManager"
34
25
+#define SM_DBUS_INTERFACE "org.gnome.SessionManager"
157
148
   PolkitAgentListener *listener;
158
149
   GError *error;
159
150
 
160
 
@@ -260,6 +381,8 @@
161
 
 
162
 
   update_temporary_authorization_icon (authority);
 
151
@@ -101,6 +222,8 @@
 
152
    */
 
153
   session_bus_connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
163
154
 
164
155
+  register_client_to_gnome_session();
165
156
+
166
157
   g_main_loop_run (loop);
167
158
 
168
159
   ret = 0;
169
 
Index: policykit-1-gnome-0.99/src/Makefile.am
 
160
Index: policykit-1-gnome-0.101/src/Makefile.am
170
161
===================================================================
171
 
--- policykit-1-gnome-0.99.orig/src/Makefile.am 2011-02-21 16:10:10.000000000 +0000
172
 
+++ policykit-1-gnome-0.99/src/Makefile.am      2011-02-21 16:10:28.000000000 +0000
173
 
@@ -28,6 +28,7 @@
 
162
--- policykit-1-gnome-0.101.orig/src/Makefile.am        2011-03-03 04:51:11.000000000 -0500
 
163
+++ policykit-1-gnome-0.101/src/Makefile.am     2011-05-05 12:14:56.894735008 -0400
 
164
@@ -30,6 +30,7 @@
174
165
        $(AM_CPPFLAGS)
175
166
 
176
167
 polkit_gnome_authentication_agent_1_CFLAGS =           \
178
169
        $(GTK_CFLAGS)                                   \
179
170
        $(GCONF_CFLAGS)                                 \
180
171
        $(POLKIT_AGENT_CFLAGS)                          \
181
 
@@ -39,6 +40,7 @@
 
172
@@ -41,6 +42,7 @@
182
173
        $(AM_LDFLAGS)
183
174
 
184
175
 polkit_gnome_authentication_agent_1_LDADD =            \
186
177
        $(GTK_LIBS)                                     \
187
178
        $(GCONF_LIBS)                                   \
188
179
        $(POLKIT_AGENT_LIBS)                            \
189
 
Index: policykit-1-gnome-0.99/configure.ac
 
180
Index: policykit-1-gnome-0.101/configure.ac
190
181
===================================================================
191
 
--- policykit-1-gnome-0.99.orig/configure.ac    2011-02-21 16:10:10.000000000 +0000
192
 
+++ policykit-1-gnome-0.99/configure.ac 2011-02-21 16:10:28.000000000 +0000
193
 
@@ -136,6 +136,10 @@
 
182
--- policykit-1-gnome-0.101.orig/configure.ac   2011-03-03 04:51:11.000000000 -0500
 
183
+++ policykit-1-gnome-0.101/configure.ac        2011-05-05 12:14:56.894735008 -0400
 
184
@@ -155,6 +155,10 @@
194
185
 AC_SUBST(POLKIT_GOBJECT_CFLAGS)
195
186
 AC_SUBST(POLKIT_GOBJECT_LIBS)
196
187