Merge lp:~chrisccoulson/fast-user-switch-applet/bug298811 into lp:~ted/fast-user-switch-applet/ubuntu-packaging-jaunty

Proposed by Chris Coulson
Status: Merged
Merge reported by: Ted Gould
Merged at revision: not available
Proposed branch: lp:~chrisccoulson/fast-user-switch-applet/bug298811
Merge into: lp:~ted/fast-user-switch-applet/ubuntu-packaging-jaunty
Diff against target: None lines
To merge this branch: bzr merge lp:~chrisccoulson/fast-user-switch-applet/bug298811
Reviewer Review Type Date Requested Status
Ted Gould Pending
Review via email: mp+4114@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2009-02-27 02:02:46 +0000
3+++ debian/changelog 2009-03-03 21:22:17 +0000
4@@ -1,3 +1,12 @@
5+fast-user-switch-applet (2.24.0-0ubuntu9) jaunty; urgency=low
6+
7+ [ Chris Coulson ]
8+ * 84_session_management.patch:
9+ - Really don't hide shutdown and restart options when
10+ gnome-power-manager is not available (LP: #298811).
11+
12+ --
13+
14 fast-user-switch-applet (2.24.0-0ubuntu8) jaunty; urgency=low
15
16 * 84_session_management.patch:
17
18=== modified file 'debian/patches/84_session_management.patch'
19--- debian/patches/84_session_management.patch 2009-02-27 15:16:31 +0000
20+++ debian/patches/84_session_management.patch 2009-03-03 21:22:17 +0000
21@@ -1,6 +1,7 @@
22 === modified file 'configure.ac'
23---- configure.ac 2008-07-17 23:20:39 +0000
24-+++ configure.ac 2009-02-27 01:48:37 +0000
25+diff -Nur -x '*.orig' -x '*~' fast-user-switch-applet-2.24.0/configure.ac fast-user-switch-applet-2.24.0.new/configure.ac
26+--- fast-user-switch-applet-2.24.0/configure.ac 2008-09-22 14:56:37.000000000 +0100
27++++ fast-user-switch-applet-2.24.0.new/configure.ac 2009-03-03 20:59:06.000000000 +0000
28 @@ -51,7 +51,9 @@
29 PKG_CHECK_MODULES(APPLET, gtk+-2.0 >= $GTK_REQUIRED_VERSION
30 libpanelapplet-2.0 >= $PANEL_REQUIRED_VERSION
31@@ -12,10 +13,9 @@
32 AC_SUBST(APPLET_CFLAGS)
33 AC_SUBST(APPLET_LIBS)
34
35-
36-=== modified file 'data/fast-user-switch-applet.schemas.in'
37---- data/fast-user-switch-applet.schemas.in 2008-08-27 17:47:43 +0000
38-+++ data/fast-user-switch-applet.schemas.in 2009-02-27 01:56:54 +0000
39+diff -Nur -x '*.orig' -x '*~' fast-user-switch-applet-2.24.0/data/fast-user-switch-applet.schemas.in fast-user-switch-applet-2.24.0.new/data/fast-user-switch-applet.schemas.in
40+--- fast-user-switch-applet-2.24.0/data/fast-user-switch-applet.schemas.in 2009-03-03 20:59:04.000000000 +0000
41++++ fast-user-switch-applet-2.24.0.new/data/fast-user-switch-applet.schemas.in 2009-03-03 20:59:06.000000000 +0000
42 @@ -75,6 +75,19 @@
43 </locale>
44 </schema>
45@@ -36,10 +36,9 @@
46 <key>/schemas/apps/fast-user-switch-applet/show_guest_login</key>
47 <applyto>/apps/fast-user-switch-applet/show_guest_login</applyto>
48 <owner>fast-user-switch-applet</owner>
49-
50-=== modified file 'src/applet.c'
51---- src/applet.c 2008-10-21 15:19:03 +0000
52-+++ src/applet.c 2009-02-27 01:56:54 +0000
53+diff -Nur -x '*.orig' -x '*~' fast-user-switch-applet-2.24.0/src/applet.c fast-user-switch-applet-2.24.0.new/src/applet.c
54+--- fast-user-switch-applet-2.24.0/src/applet.c 2009-03-03 20:59:04.000000000 +0000
55++++ fast-user-switch-applet-2.24.0.new/src/applet.c 2009-03-03 21:01:27.000000000 +0000
56 @@ -52,14 +52,18 @@
57 #include <bonobo/bonobo-ui-util.h>
58
59@@ -149,7 +148,7 @@
60 /* Utility Functions */
61 static void show_hide_guest (FusaAppletData *adata);
62 static void reset_login_screen_item (GtkWidget *widget,
63-@@ -259,6 +314,13 @@
64+@@ -261,6 +316,13 @@
65 static void make_label_larger (GtkLabel *label);
66 static void make_label_small_italic (GtkLabel *label);
67 static void fusa_applet_data_free (FusaAppletData *adata);
68@@ -163,7 +162,7 @@
69
70
71 /* ****************** *
72-@@ -268,7 +330,6 @@
73+@@ -270,7 +332,6 @@
74 static GtkTooltips *tooltips = NULL;
75 static GnomeProgram *program = NULL;
76
77@@ -171,7 +170,7 @@
78 /* *************************** *
79 * Applet main() Declaration *
80 * *************************** */
81-@@ -318,10 +379,12 @@
82+@@ -320,10 +381,12 @@
83 first_time = TRUE;
84
85 program = gnome_program_init ("fast-user-switch-applet", VERSION,
86@@ -185,7 +184,7 @@
87 /* Do this here so it's only done once. */
88 gtk_rc_parse_string ("style \"fast-user-switch-menubar-style\"\n"
89 "{\n"
90-@@ -345,6 +408,28 @@
91+@@ -347,6 +410,28 @@
92 adata->client = gconf_client_get_default ();
93 adata->manager = fusa_manager_ref_default ();
94
95@@ -214,7 +213,7 @@
96 tmp = g_strdup_printf ("applet-user-menu-item-%p", adata);
97 adata->user_menu_item_quark = g_quark_from_string (tmp);
98 g_free (tmp);
99-@@ -358,7 +443,7 @@
100+@@ -360,7 +445,7 @@
101 else
102 g_object_ref (tooltips);
103
104@@ -223,7 +222,7 @@
105 gtk_container_set_border_width (GTK_CONTAINER (applet), 0);
106 gtk_widget_set_name (GTK_WIDGET (applet), "fast-user-switch-applet");
107 panel_applet_set_flags (applet, PANEL_APPLET_EXPAND_MINOR);
108-@@ -557,10 +642,12 @@
109+@@ -559,10 +644,12 @@
110 g_signal_connect (adata->manager, "user-added",
111 G_CALLBACK (manager_user_added_cb), adata);
112
113@@ -236,7 +235,7 @@
114 adata->login_screen_item = gtk_image_menu_item_new_with_label (_("Other"));
115 gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (adata->login_screen_item),
116 gtk_image_new ());
117-@@ -574,6 +661,7 @@
118+@@ -576,6 +663,7 @@
119 G_CALLBACK (login_screen_activate_cb), adata);
120 adata->items = g_slist_prepend (adata->items, adata->login_screen_item);
121
122@@ -244,7 +243,7 @@
123 adata->login_window_item = gtk_image_menu_item_new_with_label (_("Login Window"));
124 gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (adata->login_window_item),
125 gtk_image_new ());
126-@@ -587,6 +675,79 @@
127+@@ -589,6 +677,79 @@
128 G_CALLBACK (login_window_activate_cb), adata);
129 adata->items = g_slist_prepend (adata->items, adata->login_window_item);
130
131@@ -323,8 +322,8 @@
132 +
133 use_xnest = panel_applet_gconf_get_bool (applet, USE_XNEST_KEY, NULL);
134 value = gconf_client_get_string (adata->client, SHOW_SCREEN_KEY, NULL);
135- reset_login_screen_item (adata->login_screen_item, use_xnest, value);
136-@@ -635,7 +796,7 @@
137+ reset_login_screen_item (adata->login_screen_item, use_xnest, value, adata->manager);
138+@@ -637,7 +798,7 @@
139 client_notify_global_func, adata, NULL, NULL);
140
141 adata->client_notify_lockdown_id =
142@@ -333,7 +332,7 @@
143 client_notify_lockdown_func, adata, NULL, NULL);
144
145 adata->items = g_slist_sort_with_data (adata->items,
146-@@ -1197,6 +1358,7 @@
147+@@ -1199,6 +1360,7 @@
148 }
149
150
151@@ -341,7 +340,7 @@
152 /* *********************** *
153 * FusaManager Callbacks *
154 * *********************** */
155-@@ -1312,6 +1474,11 @@
156+@@ -1320,6 +1482,11 @@
157 gtk_widget_show ( GTK_WIDGET (adata->applet));
158 }
159 }
160@@ -353,7 +352,7 @@
161 }
162
163 static void
164-@@ -1355,7 +1522,6 @@
165+@@ -1363,7 +1530,6 @@
166 sort_menu (adata);
167 }
168
169@@ -361,7 +360,7 @@
170 /* *********************** *
171 * GConfClient Callbacks *
172 * *********************** */
173-@@ -1564,6 +1730,10 @@
174+@@ -1572,6 +1738,10 @@
175 {
176 show_hide_guest (adata);
177 }
178@@ -372,7 +371,7 @@
179
180 if (g_getenv ("LTSP_CLIENT") && (
181 GTK_WIDGET_VISIBLE (adata->login_screen_item) ||
182-@@ -1987,6 +2157,323 @@
183+@@ -1995,6 +2165,323 @@
184 gtk_label_set_text (data, fusa_user_get_display_name (FUSA_USER (object)));
185 }
186
187@@ -696,7 +695,7 @@
188
189 /* ******************* *
190 * Utility Functions *
191-@@ -2557,10 +3044,142 @@
192+@@ -2568,10 +3055,137 @@
193
194 gconf_client_notify_remove (adata->client, adata->client_notify_applet_id);
195 gconf_client_notify_remove (adata->client, adata->client_notify_global_id);
196@@ -780,10 +779,14 @@
197 + adata->hibernate_available = FALSE;
198 + adata->suspend_available = FALSE;
199 + adata->lock_screen_allowed = FALSE;
200-+ adata->restart_available = FALSE;
201-+ adata->shutdown_available = FALSE;
202 +
203 + adata->lock_screen_allowed = !gconf_client_get_bool (adata->client, LOCK_SCREEN_KEY, NULL);
204++
205++ adata->restart_available = pk_can_do_action("org.freedesktop.consolekit.system.restart") ||
206++ pk_can_do_action("org.freedesktop.consolekit.system.restart-multiple-users");
207++
208++ adata->shutdown_available = pk_can_do_action("org.freedesktop.consolekit.system.stop") ||
209++ pk_can_do_action("org.freedesktop.consolekit.system.stop-multiple-users");
210 +
211 + DBusGConnection * sbus;
212 + sbus = dbus_g_bus_get(DBUS_BUS_SESSION, NULL);
213@@ -828,15 +831,5 @@
214 +
215 + dbus_g_connection_unref(sbus);
216 +
217-+ if (pk_can_do_action("org.freedesktop.consolekit.system.restart") ||
218-+ pk_can_do_action("org.freedesktop.consolekit.system.restart-multiple-users")) {
219-+ adata->restart_available = TRUE;
220-+ }
221-+ if (pk_can_do_action("org.freedesktop.consolekit.system.stop") ||
222-+ pk_can_do_action("org.freedesktop.consolekit.system.stop-multiple-users")) {
223-+ adata->shutdown_available = TRUE;
224-+ }
225-+
226 + return;
227 +}
228-

Subscribers

People subscribed via source and target branches

to all changes: