Merge lp:~mterry/update-notifier/gtk3-and-gdbus into lp:update-notifier/ubuntu

Proposed by Michael Terry
Status: Merged
Merged at revision: 631
Proposed branch: lp:~mterry/update-notifier/gtk3-and-gdbus
Merge into: lp:update-notifier/ubuntu
Diff against target: 1023 lines (+245/-335)
7 files modified
configure.in (+1/-1)
src/crash.c (+1/-1)
src/hooks.c (+1/-1)
src/reboot.c (+92/-124)
src/update.c (+41/-28)
ui/hooks-dialog.ui (+58/-81)
ui/reboot-dialog.ui (+51/-99)
To merge this branch: bzr merge lp:~mterry/update-notifier/gtk3-and-gdbus
Reviewer Review Type Date Requested Status
Ubuntu Core Development Team Pending
Review via email: mp+67831@code.launchpad.net

Description of the change

Ports to gdbus and gtk3.

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 'configure.in'
2--- configure.in 2010-10-05 16:33:46 +0000
3+++ configure.in 2011-07-13 14:29:33 +0000
4@@ -12,7 +12,7 @@
5
6 GNOME_COMMON_INIT
7
8-pkg_modules="gtk+-2.0 >= 2.18.0 gconf-2.0 dbus-glib-1 libnotify gio-2.0 x11"
9+pkg_modules="gtk+-3.0 gconf-2.0 libnotify gio-2.0 >= 2.26 x11"
10
11 PKG_CHECK_EXISTS(gdu, [ HAVE_GDU=1 ])
12 if test "x$HAVE_GDU" != "x"; then
13
14=== modified file 'src/crash.c'
15--- src/crash.c 2011-06-08 07:28:28 +0000
16+++ src/crash.c 2011-07-13 14:29:33 +0000
17@@ -176,7 +176,7 @@
18
19 // crashreport found
20 if(crashreports_found > 0 && !visible) {
21- gtk_status_icon_set_tooltip(ta->tray_icon,
22+ gtk_status_icon_set_tooltip_text(ta->tray_icon,
23 _("Crash report detected"));
24 gtk_status_icon_set_visible(ta->tray_icon, TRUE);
25 /* Show the notification, after a delay so it doesn't look ugly
26
27=== modified file 'src/hooks.c'
28--- src/hooks.c 2011-06-08 07:28:28 +0000
29+++ src/hooks.c 2011-07-13 14:29:33 +0000
30@@ -48,7 +48,7 @@
31
32 updates = _("Information available");
33
34- gtk_status_icon_set_tooltip(un->tray_icon, updates);
35+ gtk_status_icon_set_tooltip_text(un->tray_icon, updates);
36 }
37
38
39
40=== modified file 'src/reboot.c'
41--- src/reboot.c 2011-06-08 07:28:28 +0000
42+++ src/reboot.c 2011-07-13 14:29:33 +0000
43@@ -7,8 +7,7 @@
44 #include <unistd.h>
45
46 #include <libnotify/notify.h>
47-#include <dbus/dbus-glib.h>
48-#include <dbus/dbus.h>
49+#include <gio/gio.h>
50
51 #include "update-notifier.h"
52 #include "update.h"
53@@ -41,60 +40,56 @@
54 static gboolean
55 gdm_action_reboot()
56 {
57- DBusGConnection *connection;
58- GError *error;
59- DBusGProxy *proxy;
60-
61- error = NULL;
62- connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
63- if (connection == NULL) {
64- g_error_free (error);
65- return FALSE;
66- }
67-
68- proxy = dbus_g_proxy_new_for_name (connection,
69- "org.gnome.SessionManager",
70- "/org/gnome/SessionManager",
71- "org.gnome.SessionManager");
72+ GVariant *answer;
73+ GDBusProxy *proxy;
74+
75+ proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
76+ G_DBUS_PROXY_FLAGS_NONE,
77+ NULL, /* GDBusInterfaceInfo */
78+ "org.gnome.SessionManager",
79+ "/org/gnome/SessionManager",
80+ "org.gnome.SessionManager",
81+ NULL, /* GCancellable */
82+ NULL /* GError */);
83 if (proxy == NULL)
84 return FALSE;
85
86- error = NULL;
87- if (!dbus_g_proxy_call (proxy, "RequestReboot", &error,
88- G_TYPE_INVALID, G_TYPE_INVALID)) {
89- g_error_free (error);
90- return FALSE;
91- }
92+ answer = g_dbus_proxy_call_sync (proxy, "RequestReboot", NULL,
93+ G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
94+ g_object_unref (proxy);
95+
96+ if (answer == NULL)
97+ return FALSE;
98+
99+ g_variant_unref (answer);
100 return TRUE;
101 }
102
103 static gboolean
104 ck_action_reboot()
105 {
106- DBusGConnection *connection;
107- GError *error;
108- DBusGProxy *proxy;
109-
110- error = NULL;
111- connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
112- if (connection == NULL) {
113- g_error_free (error);
114- return FALSE;
115- }
116-
117- proxy = dbus_g_proxy_new_for_name (connection,
118- "org.freedesktop.ConsoleKit",
119- "/org/freedesktop/ConsoleKit/Manager",
120- "org.freedesktop.ConsoleKit.Manager");
121+ GVariant *answer;
122+ GDBusProxy *proxy;
123+
124+ proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
125+ G_DBUS_PROXY_FLAGS_NONE,
126+ NULL, /* GDBusInterfaceInfo */
127+ "org.freedesktop.ConsoleKit",
128+ "/org/freedesktop/ConsoleKit/Manager",
129+ "org.freedesktop.ConsoleKit.Manager",
130+ NULL, /* GCancellable */
131+ NULL /* GError */);
132 if (proxy == NULL)
133 return FALSE;
134
135- error = NULL;
136- if (!dbus_g_proxy_call (proxy, "Restart", &error,
137- G_TYPE_INVALID, G_TYPE_INVALID)) {
138- g_error_free (error);
139- return FALSE;
140- }
141+ answer = g_dbus_proxy_call_sync (proxy, "Restart", NULL,
142+ G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
143+ g_object_unref (proxy);
144+
145+ if (answer == NULL)
146+ return FALSE;
147+
148+ g_variant_unref (answer);
149 return TRUE;
150
151 }
152@@ -130,92 +125,65 @@
153 }
154
155 static gboolean
156-is_aptdaemon_on_the_system_bus ()
157-{
158- DBusConnection *connection;
159- DBusError *dbus_error = NULL;
160- DBusMessage *message, *reply;
161- const char *aptdaemon_bus_name = "org.debian.apt";
162- gboolean res;
163-
164- connection = dbus_bus_get(DBUS_BUS_SYSTEM, dbus_error);
165- if (dbus_error != NULL) {
166- g_warning("failed to connect to the system bus");
167- return FALSE;
168- }
169- message = dbus_message_new_method_call(DBUS_SERVICE_DBUS,
170- DBUS_PATH_DBUS,
171- DBUS_INTERFACE_DBUS,
172- "GetNameOwner");
173- if (message == NULL) {
174- g_warning ("failed to create dbus message");
175- return FALSE;
176- }
177-
178- dbus_message_append_args(message,
179- DBUS_TYPE_STRING, &aptdaemon_bus_name,
180- DBUS_TYPE_INVALID);
181-
182- reply = dbus_connection_send_with_reply_and_block(connection,
183- message,
184- -1,
185- dbus_error);
186- dbus_message_unref(message);
187-
188- if (reply) {
189- dbus_message_unref(reply);
190- res = TRUE;
191- } else {
192- res = FALSE;
193- }
194-
195- g_debug("aptdaemon on bus: %i", res);
196- return res;
197-}
198-
199-static gboolean
200 aptdaemon_pending_transactions ()
201 {
202- DBusGConnection *connection;
203- GError *error;
204- DBusGProxy *proxy;
205- char *current = NULL;
206- char **pending = NULL;
207-
208- if (!is_aptdaemon_on_the_system_bus())
209- return FALSE;
210-
211- error = NULL;
212- connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
213- if (connection == NULL) {
214- g_debug ("Failed to open connection to bus: %s\n", error->message);
215- g_error_free (error);
216- return FALSE;
217- }
218-
219- proxy = dbus_g_proxy_new_for_name (connection,
220- "org.debian.apt",
221- "/org/debian/apt",
222- "org.debian.apt");
223- error = NULL;
224- if (!dbus_g_proxy_call (proxy, "GetActiveTransactions", &error,
225- G_TYPE_INVALID,
226- G_TYPE_STRING, &current,
227- G_TYPE_STRV, &pending,
228- G_TYPE_INVALID)) {
229- g_debug ("error during dbus call: %s\n", error->message);
230- g_error_free (error);
231- g_object_unref (proxy);
232- return FALSE;
233- }
234+ GError *error;
235+ GVariant *answer;
236+ GDBusProxy *proxy;
237+ char *owner = NULL;
238+ const char *current = NULL;
239+ char **pending = NULL;
240+
241+ error = NULL;
242+ proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
243+ G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
244+ NULL, /* GDBusInterfaceInfo */
245+ "org.debian.apt",
246+ "/org/debian/apt",
247+ "org.debian.apt",
248+ NULL, /* GCancellable */
249+ &error);
250+ if (proxy == NULL) {
251+ g_debug ("Failed to open connection to bus: %s\n", error->message);
252+ g_error_free (error);
253+ return FALSE;
254+ }
255+
256+ owner = g_dbus_proxy_get_name_owner (proxy);
257+ g_debug("aptdaemon on bus: %i", (owner != NULL));
258+ if (owner == NULL) {
259+ g_object_unref (proxy);
260+ g_free (owner);
261+ return FALSE;
262+ }
263+ g_free (owner);
264+
265+ error = NULL;
266+ answer = g_dbus_proxy_call_sync (proxy, "GetActiveTransactions", NULL,
267+ G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
268+ g_object_unref (proxy);
269+
270+ if (answer == NULL) {
271+ g_debug ("error during dbus call: %s\n", error->message);
272+ g_error_free (error);
273+ return FALSE;
274+ }
275+
276+ if (g_strcmp0 (g_variant_get_type_string (answer), "(sas)") != 0) {
277+ g_debug ("aptd answer in unexpected format: %s\n",
278+ g_variant_get_type_string (answer));
279+ g_variant_unref (answer);
280+ return FALSE;
281+ }
282+
283+ g_variant_get (answer, "(&s^a&s)", &current, &pending);
284
285 gboolean has_pending = FALSE;
286 if ((current && strcmp(current,"") != 0) || g_strv_length(pending) > 0)
287 has_pending = TRUE;
288
289- g_object_unref (proxy);
290- g_free (current);
291- g_strfreev (pending);
292+ g_free (pending);
293+ g_variant_unref (answer);
294
295 return has_pending;
296 }
297@@ -254,7 +222,7 @@
298 /* Skip the rest if the icon is already visible */
299 if (gtk_status_icon_get_visible (ta->tray_icon))
300 return;
301- gtk_status_icon_set_tooltip (ta->tray_icon,
302+ gtk_status_icon_set_tooltip_text (ta->tray_icon,
303 _("System restart required"));
304 gtk_status_icon_set_visible (ta->tray_icon, TRUE);
305
306
307=== modified file 'src/update.c'
308--- src/update.c 2011-06-08 07:28:28 +0000
309+++ src/update.c 2011-07-13 14:29:33 +0000
310@@ -8,12 +8,12 @@
311
312 #include <glib.h>
313 #include <glib/gstdio.h>
314+#include <gio/gio.h>
315
316 #include <sys/types.h>
317 #include <sys/stat.h>
318 #include <unistd.h>
319 #include <stdlib.h>
320-#include <dbus/dbus-glib.h>
321
322 #include "update-notifier.h"
323 #include "update.h"
324@@ -94,7 +94,7 @@
325 "There are %i updates available",
326 num_upgrades),
327 num_upgrades);
328- gtk_status_icon_set_tooltip(ta->tray_icon, updates);
329+ gtk_status_icon_set_tooltip_text(ta->tray_icon, updates);
330 g_free(updates);
331 }
332
333@@ -216,7 +216,7 @@
334 }
335
336 // and update the tooltip
337- gtk_status_icon_set_tooltip(ta->tray_icon, _("A package manager is working"));
338+ gtk_status_icon_set_tooltip_text(ta->tray_icon, _("A package manager is working"));
339 // and show it
340 gtk_status_icon_set_visible(ta->tray_icon, TRUE);
341
342@@ -279,7 +279,7 @@
343 void
344 show_error(TrayApplet *ta, gchar *error_str)
345 {
346- gtk_status_icon_set_tooltip(ta->tray_icon, error_str);
347+ gtk_status_icon_set_tooltip_text(ta->tray_icon, error_str);
348 gtk_status_icon_set_from_icon_name(ta->tray_icon, "dialog-error");
349 gtk_status_icon_set_visible(ta->tray_icon, TRUE);
350 }
351@@ -298,7 +298,7 @@
352 NULL);
353 gtk_status_icon_set_from_pixbuf(ta->tray_icon, src);
354 g_object_unref(src);
355- gtk_status_icon_set_tooltip(ta->tray_icon,
356+ gtk_status_icon_set_tooltip_text(ta->tray_icon,
357 _("The update information is outdated. "
358 "This may be caused by network "
359 "problems or by a repository that "
360@@ -320,34 +320,47 @@
361 static gboolean
362 dpkg_lock_is_taken ()
363 {
364- DBusGConnection *connection;
365- GError *error;
366- DBusGProxy *proxy;
367- gboolean locked = FALSE;
368+ GError *error;
369+ GVariant *answer;
370+ GDBusProxy *proxy;
371+ gboolean locked = FALSE;
372
373- error = NULL;
374- connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
375- if (connection == NULL) {
376- g_debug_update ("Failed to open connection to bus: %s\n", error->message);
377- g_error_free (error);
378- return FALSE;
379- }
380+ error = NULL;
381+ proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
382+ G_DBUS_PROXY_FLAGS_NONE,
383+ NULL, /* GDBusInterfaceInfo */
384+ "com.ubuntu.SystemService",
385+ "/",
386+ "com.ubuntu.SystemService",
387+ NULL, /* GCancellable */
388+ &error);
389+ if (proxy == NULL) {
390+ g_debug_update ("Failed to open connection to bus: %s\n", error->message);
391+ g_error_free (error);
392+ return FALSE;
393+ }
394
395- proxy = dbus_g_proxy_new_for_name (connection,
396- "com.ubuntu.SystemService",
397- "/",
398- "com.ubuntu.SystemService");
399 error = NULL;
400- if (!dbus_g_proxy_call (proxy, "is_package_system_locked", &error,
401- G_TYPE_INVALID,
402- G_TYPE_BOOLEAN, &locked, G_TYPE_INVALID)) {
403- g_debug_update ("error during dbus call: %s\n", error->message);
404- g_error_free (error);
405- g_object_unref (proxy);
406- return FALSE;
407- }
408+ answer = g_dbus_proxy_call_sync (proxy, "is_package_system_locked", NULL,
409+ G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
410 g_object_unref (proxy);
411
412+ if (answer == NULL) {
413+ g_debug_update ("error during dbus call: %s\n", error->message);
414+ g_error_free (error);
415+ return FALSE;
416+ }
417+
418+ if (g_strcmp0 (g_variant_get_type_string (answer), "(b)") != 0) {
419+ g_debug_update ("SystemService answer in unexpected format: %s\n",
420+ g_variant_get_type_string (answer));
421+ g_variant_unref (answer);
422+ return FALSE;
423+ }
424+
425+ g_variant_get (answer, "(b)", &locked);
426+ g_variant_unref (answer);
427+
428 g_debug_update ("is_package_system_locked: %i", locked);
429 return locked;
430 }
431
432=== modified file 'ui/hooks-dialog.ui'
433--- ui/hooks-dialog.ui 2009-06-26 15:59:09 +0000
434+++ ui/hooks-dialog.ui 2011-07-13 14:29:33 +0000
435@@ -1,219 +1,196 @@
436-<?xml version="1.0"?>
437-<!--*- mode: xml -*-->
438+<?xml version="1.0" encoding="UTF-8"?>
439 <interface>
440+ <!-- interface-requires gtk+ 3.0 -->
441 <object class="GtkDialog" id="dialog_hooks">
442+ <property name="can_focus">False</property>
443 <property name="border_width">6</property>
444- <property name="title" translatable="yes"/>
445- <property name="type">GTK_WINDOW_TOPLEVEL</property>
446- <property name="window_position">GTK_WIN_POS_NONE</property>
447 <property name="modal">True</property>
448 <property name="default_width">550</property>
449 <property name="default_height">400</property>
450- <property name="resizable">True</property>
451- <property name="destroy_with_parent">False</property>
452- <property name="decorated">True</property>
453- <property name="skip_taskbar_hint">False</property>
454- <property name="skip_pager_hint">False</property>
455- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
456- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
457- <property name="focus_on_map">True</property>
458- <property name="urgency_hint">False</property>
459- <property name="has_separator">False</property>
460+ <property name="type_hint">dialog</property>
461 <child internal-child="vbox">
462- <object class="GtkVBox" id="dialog-vbox1">
463+ <object class="GtkBox" id="dialog-vbox1">
464 <property name="visible">True</property>
465- <property name="homogeneous">False</property>
466+ <property name="can_focus">False</property>
467 <property name="spacing">12</property>
468 <child internal-child="action_area">
469- <object class="GtkHButtonBox" id="dialog-action_area1">
470+ <object class="GtkButtonBox" id="dialog-action_area1">
471 <property name="visible">True</property>
472- <property name="layout_style">GTK_BUTTONBOX_END</property>
473+ <property name="can_focus">False</property>
474+ <property name="layout_style">end</property>
475 <child>
476 <object class="GtkButton" id="button_cancel">
477+ <property name="label">gtk-close</property>
478 <property name="visible">True</property>
479+ <property name="can_focus">True</property>
480 <property name="can_default">True</property>
481- <property name="can_focus">True</property>
482- <property name="label">gtk-close</property>
483+ <property name="receives_default">False</property>
484+ <property name="use_action_appearance">False</property>
485 <property name="use_stock">True</property>
486- <property name="relief">GTK_RELIEF_NORMAL</property>
487- <property name="focus_on_click">True</property>
488 </object>
489+ <packing>
490+ <property name="expand">False</property>
491+ <property name="fill">True</property>
492+ <property name="position">0</property>
493+ </packing>
494 </child>
495 </object>
496 <packing>
497- <property name="padding">0</property>
498 <property name="expand">False</property>
499 <property name="fill">True</property>
500- <property name="pack_type">GTK_PACK_END</property>
501+ <property name="pack_type">end</property>
502+ <property name="position">0</property>
503 </packing>
504 </child>
505 <child>
506 <object class="GtkVBox" id="vbox1">
507+ <property name="visible">True</property>
508+ <property name="can_focus">False</property>
509 <property name="border_width">6</property>
510- <property name="visible">True</property>
511- <property name="homogeneous">False</property>
512 <property name="spacing">12</property>
513 <child>
514 <object class="GtkHBox" id="hbox1">
515 <property name="visible">True</property>
516- <property name="homogeneous">False</property>
517+ <property name="can_focus">False</property>
518 <property name="spacing">12</property>
519 <child>
520 <object class="GtkImage" id="image">
521 <property name="visible">True</property>
522- <property name="stock">gtk-dialog-info</property>
523- <property name="icon_size">6</property>
524+ <property name="can_focus">False</property>
525 <property name="xalign">0</property>
526 <property name="yalign">0</property>
527- <property name="xpad">0</property>
528- <property name="ypad">0</property>
529+ <property name="stock">gtk-dialog-info</property>
530+ <property name="icon-size">6</property>
531 </object>
532 <packing>
533- <property name="padding">0</property>
534 <property name="expand">False</property>
535 <property name="fill">False</property>
536+ <property name="position">0</property>
537 </packing>
538 </child>
539 <child>
540 <object class="GtkVBox" id="vbox_messages">
541 <property name="visible">True</property>
542- <property name="homogeneous">False</property>
543+ <property name="can_focus">False</property>
544 <property name="spacing">12</property>
545 <child>
546 <object class="GtkLabel" id="label_title">
547 <property name="visible">True</property>
548+ <property name="can_focus">False</property>
549+ <property name="xalign">0</property>
550 <property name="label" translatable="yes">&lt;span weight="bold" size="larger"&gt;Update information&lt;/span&gt;</property>
551- <property name="use_underline">False</property>
552 <property name="use_markup">True</property>
553- <property name="justify">GTK_JUSTIFY_LEFT</property>
554 <property name="wrap">True</property>
555- <property name="selectable">False</property>
556- <property name="xalign">0</property>
557- <property name="yalign">0.5</property>
558- <property name="xpad">0</property>
559- <property name="ypad">0</property>
560- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
561- <property name="width_chars">-1</property>
562- <property name="single_line_mode">False</property>
563- <property name="angle">0</property>
564 </object>
565 <packing>
566- <property name="padding">0</property>
567 <property name="expand">False</property>
568 <property name="fill">False</property>
569+ <property name="position">0</property>
570 </packing>
571 </child>
572 </object>
573 <packing>
574- <property name="padding">0</property>
575 <property name="expand">True</property>
576 <property name="fill">True</property>
577+ <property name="position">1</property>
578 </packing>
579 </child>
580 </object>
581 <packing>
582- <property name="padding">0</property>
583 <property name="expand">False</property>
584 <property name="fill">True</property>
585+ <property name="position">0</property>
586 </packing>
587 </child>
588 <child>
589 <object class="GtkVBox" id="vbox2">
590 <property name="visible">True</property>
591- <property name="homogeneous">False</property>
592+ <property name="can_focus">False</property>
593 <property name="spacing">6</property>
594 <child>
595 <object class="GtkScrolledWindow" id="scrolledwindow1">
596 <property name="visible">True</property>
597 <property name="can_focus">True</property>
598- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
599- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
600- <property name="shadow_type">GTK_SHADOW_IN</property>
601- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
602+ <property name="shadow_type">in</property>
603 <child>
604 <object class="GtkTextView" id="textview_hook">
605 <property name="visible">True</property>
606 <property name="can_focus">True</property>
607- <property name="editable">False</property>
608- <property name="overwrite">False</property>
609- <property name="accepts_tab">True</property>
610- <property name="justification">GTK_JUSTIFY_LEFT</property>
611- <property name="wrap_mode">GTK_WRAP_WORD</property>
612- <property name="cursor_visible">False</property>
613 <property name="pixels_above_lines">2</property>
614 <property name="pixels_below_lines">2</property>
615- <property name="pixels_inside_wrap">0</property>
616+ <property name="editable">False</property>
617+ <property name="wrap_mode">word</property>
618 <property name="left_margin">2</property>
619 <property name="right_margin">2</property>
620- <property name="indent">0</property>
621+ <property name="cursor_visible">False</property>
622 </object>
623 </child>
624 </object>
625 <packing>
626- <property name="padding">0</property>
627 <property name="expand">True</property>
628 <property name="fill">True</property>
629+ <property name="position">0</property>
630 </packing>
631 </child>
632 <child>
633 <object class="GtkHBox" id="hbox2">
634 <property name="visible">True</property>
635- <property name="homogeneous">False</property>
636+ <property name="can_focus">False</property>
637 <property name="spacing">6</property>
638 <child>
639 <object class="GtkButton" id="button_run">
640- <property name="visible">True</property>
641- <property name="can_default">True</property>
642- <property name="can_focus">True</property>
643 <property name="label" translatable="yes">_Run this action now</property>
644+ <property name="visible">True</property>
645+ <property name="can_focus">True</property>
646+ <property name="can_default">True</property>
647+ <property name="receives_default">False</property>
648+ <property name="use_action_appearance">False</property>
649 <property name="use_underline">True</property>
650- <property name="relief">GTK_RELIEF_NORMAL</property>
651- <property name="focus_on_click">True</property>
652- <signal handler="on_button_run_clicked" last_modification_time="Thu, 13 Jan 2005 10:13:21 GMT" name="clicked"/>
653+ <signal name="clicked" handler="on_button_run_clicked" swapped="no"/>
654 </object>
655 <packing>
656- <property name="padding">0</property>
657 <property name="expand">False</property>
658 <property name="fill">False</property>
659+ <property name="position">0</property>
660 </packing>
661 </child>
662 <child>
663 <object class="GtkButton" id="button_next">
664- <property name="visible">True</property>
665- <property name="can_default">True</property>
666- <property name="can_focus">True</property>
667 <property name="label">gtk-media-next</property>
668+ <property name="visible">True</property>
669+ <property name="can_focus">True</property>
670+ <property name="can_default">True</property>
671+ <property name="receives_default">False</property>
672+ <property name="use_action_appearance">False</property>
673 <property name="use_stock">True</property>
674- <property name="relief">GTK_RELIEF_NORMAL</property>
675- <property name="focus_on_click">True</property>
676- <signal handler="on_button_next_clicked" last_modification_time="Thu, 13 Jan 2005 10:17:50 GMT" name="clicked"/>
677+ <signal name="clicked" handler="on_button_next_clicked" swapped="no"/>
678 </object>
679 <packing>
680- <property name="padding">0</property>
681 <property name="expand">False</property>
682 <property name="fill">False</property>
683- <property name="pack_type">GTK_PACK_END</property>
684+ <property name="pack_type">end</property>
685+ <property name="position">1</property>
686 </packing>
687 </child>
688 </object>
689 <packing>
690- <property name="padding">0</property>
691 <property name="expand">False</property>
692 <property name="fill">True</property>
693+ <property name="position">1</property>
694 </packing>
695 </child>
696 </object>
697 <packing>
698- <property name="padding">0</property>
699 <property name="expand">True</property>
700 <property name="fill">True</property>
701+ <property name="position">1</property>
702 </packing>
703 </child>
704 </object>
705 <packing>
706- <property name="padding">0</property>
707 <property name="expand">True</property>
708 <property name="fill">True</property>
709+ <property name="position">1</property>
710 </packing>
711 </child>
712 </object>
713
714=== modified file 'ui/reboot-dialog.ui'
715--- ui/reboot-dialog.ui 2009-09-10 10:20:07 +0000
716+++ ui/reboot-dialog.ui 2011-07-13 14:29:33 +0000
717@@ -1,93 +1,65 @@
718-<?xml version="1.0"?>
719-<!--*- mode: xml -*-->
720+<?xml version="1.0" encoding="UTF-8"?>
721 <interface>
722+ <!-- interface-requires gtk+ 3.0 -->
723 <object class="GtkDialog" id="dialog_reboot">
724+ <property name="can_focus">False</property>
725 <property name="border_width">6</property>
726 <property name="title" translatable="yes">Restart Required</property>
727- <property name="type">GTK_WINDOW_TOPLEVEL</property>
728- <property name="window_position">GTK_WIN_POS_NONE</property>
729+ <property name="resizable">False</property>
730 <property name="modal">True</property>
731- <property name="resizable">False</property>
732- <property name="destroy_with_parent">False</property>
733- <property name="decorated">True</property>
734- <property name="skip_taskbar_hint">False</property>
735- <property name="skip_pager_hint">False</property>
736- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
737- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
738- <property name="focus_on_map">True</property>
739- <property name="urgency_hint">False</property>
740- <property name="has_separator">False</property>
741+ <property name="type_hint">dialog</property>
742 <child internal-child="vbox">
743- <object class="GtkVBox" id="dialog-vbox1">
744+ <object class="GtkBox" id="dialog-vbox1">
745 <property name="visible">True</property>
746- <property name="homogeneous">False</property>
747+ <property name="can_focus">False</property>
748 <property name="spacing">12</property>
749 <child internal-child="action_area">
750- <object class="GtkHButtonBox" id="dialog-action_area1">
751+ <object class="GtkButtonBox" id="dialog-action_area1">
752 <property name="visible">True</property>
753- <property name="layout_style">GTK_BUTTONBOX_END</property>
754+ <property name="can_focus">False</property>
755+ <property name="layout_style">end</property>
756 <child>
757 <object class="GtkButton" id="button_cancel">
758 <property name="visible">True</property>
759+ <property name="can_focus">True</property>
760 <property name="can_default">True</property>
761 <property name="has_default">True</property>
762- <property name="can_focus">True</property>
763- <property name="relief">GTK_RELIEF_NORMAL</property>
764- <property name="focus_on_click">True</property>
765+ <property name="receives_default">False</property>
766+ <property name="use_action_appearance">False</property>
767 <child>
768 <object class="GtkAlignment" id="alignment1">
769 <property name="visible">True</property>
770- <property name="xalign">0.5</property>
771- <property name="yalign">0.5</property>
772+ <property name="can_focus">False</property>
773 <property name="xscale">0</property>
774 <property name="yscale">0</property>
775- <property name="top_padding">0</property>
776- <property name="bottom_padding">0</property>
777- <property name="left_padding">0</property>
778- <property name="right_padding">0</property>
779 <child>
780 <object class="GtkHBox" id="hbox2">
781 <property name="visible">True</property>
782- <property name="homogeneous">False</property>
783+ <property name="can_focus">False</property>
784 <property name="spacing">2</property>
785 <child>
786 <object class="GtkImage" id="image1">
787 <property name="visible">True</property>
788+ <property name="can_focus">False</property>
789 <property name="stock">gtk-cancel</property>
790- <property name="icon_size">4</property>
791- <property name="xalign">0.5</property>
792- <property name="yalign">0.5</property>
793- <property name="xpad">0</property>
794- <property name="ypad">0</property>
795 </object>
796 <packing>
797- <property name="padding">0</property>
798 <property name="expand">False</property>
799 <property name="fill">False</property>
800+ <property name="position">0</property>
801 </packing>
802 </child>
803 <child>
804 <object class="GtkLabel" id="label1">
805 <property name="visible">True</property>
806+ <property name="can_focus">False</property>
807 <property name="label" translatable="yes">Restart _Later</property>
808 <property name="use_underline">True</property>
809- <property name="use_markup">False</property>
810- <property name="justify">GTK_JUSTIFY_LEFT</property>
811- <property name="wrap">False</property>
812- <property name="selectable">False</property>
813- <property name="xalign">0.5</property>
814- <property name="yalign">0.5</property>
815- <property name="xpad">0</property>
816- <property name="ypad">0</property>
817- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
818- <property name="width_chars">-1</property>
819- <property name="single_line_mode">False</property>
820- <property name="angle">0</property>
821 </object>
822 <packing>
823- <property name="padding">0</property>
824 <property name="expand">False</property>
825 <property name="fill">False</property>
826+ <property name="position">1</property>
827 </packing>
828 </child>
829 </object>
830@@ -95,68 +67,53 @@
831 </object>
832 </child>
833 </object>
834+ <packing>
835+ <property name="expand">False</property>
836+ <property name="fill">True</property>
837+ <property name="position">0</property>
838+ </packing>
839 </child>
840 <child>
841 <object class="GtkButton" id="button_run">
842 <property name="visible">True</property>
843+ <property name="can_focus">True</property>
844 <property name="can_default">True</property>
845- <property name="can_focus">True</property>
846- <property name="relief">GTK_RELIEF_NORMAL</property>
847- <property name="focus_on_click">True</property>
848+ <property name="receives_default">False</property>
849+ <property name="use_action_appearance">False</property>
850 <child>
851 <object class="GtkAlignment" id="alignment2">
852 <property name="visible">True</property>
853- <property name="xalign">0.5</property>
854- <property name="yalign">0.5</property>
855+ <property name="can_focus">False</property>
856 <property name="xscale">0</property>
857 <property name="yscale">0</property>
858- <property name="top_padding">0</property>
859- <property name="bottom_padding">0</property>
860- <property name="left_padding">0</property>
861- <property name="right_padding">0</property>
862 <child>
863 <object class="GtkHBox" id="hbox3">
864 <property name="visible">True</property>
865- <property name="homogeneous">False</property>
866+ <property name="can_focus">False</property>
867 <property name="spacing">2</property>
868 <child>
869 <object class="GtkImage" id="image2">
870 <property name="visible">True</property>
871+ <property name="can_focus">False</property>
872 <property name="stock">gtk-yes</property>
873- <property name="icon_size">4</property>
874- <property name="xalign">0.5</property>
875- <property name="yalign">0.5</property>
876- <property name="xpad">0</property>
877- <property name="ypad">0</property>
878 </object>
879 <packing>
880- <property name="padding">0</property>
881 <property name="expand">False</property>
882 <property name="fill">False</property>
883+ <property name="position">0</property>
884 </packing>
885 </child>
886 <child>
887 <object class="GtkLabel" id="label2">
888 <property name="visible">True</property>
889+ <property name="can_focus">False</property>
890 <property name="label" translatable="yes">_Restart Now</property>
891 <property name="use_underline">True</property>
892- <property name="use_markup">False</property>
893- <property name="justify">GTK_JUSTIFY_LEFT</property>
894- <property name="wrap">False</property>
895- <property name="selectable">False</property>
896- <property name="xalign">0.5</property>
897- <property name="yalign">0.5</property>
898- <property name="xpad">0</property>
899- <property name="ypad">0</property>
900- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
901- <property name="width_chars">-1</property>
902- <property name="single_line_mode">False</property>
903- <property name="angle">0</property>
904 </object>
905 <packing>
906- <property name="padding">0</property>
907 <property name="expand">False</property>
908 <property name="fill">False</property>
909+ <property name="position">1</property>
910 </packing>
911 </child>
912 </object>
913@@ -164,82 +121,77 @@
914 </object>
915 </child>
916 </object>
917+ <packing>
918+ <property name="expand">False</property>
919+ <property name="fill">True</property>
920+ <property name="position">1</property>
921+ </packing>
922 </child>
923 </object>
924 <packing>
925- <property name="padding">0</property>
926 <property name="expand">False</property>
927 <property name="fill">True</property>
928- <property name="pack_type">GTK_PACK_END</property>
929+ <property name="pack_type">end</property>
930+ <property name="position">0</property>
931 </packing>
932 </child>
933 <child>
934 <object class="GtkVBox" id="vbox1">
935+ <property name="visible">True</property>
936+ <property name="can_focus">False</property>
937 <property name="border_width">6</property>
938- <property name="visible">True</property>
939- <property name="homogeneous">False</property>
940 <property name="spacing">12</property>
941 <child>
942 <object class="GtkHBox" id="hbox1">
943 <property name="visible">True</property>
944- <property name="homogeneous">False</property>
945+ <property name="can_focus">False</property>
946 <property name="spacing">12</property>
947 <child>
948 <object class="GtkImage" id="image">
949 <property name="visible">True</property>
950+ <property name="can_focus">False</property>
951 <property name="xalign">0</property>
952 <property name="yalign">0</property>
953- <property name="xpad">0</property>
954- <property name="ypad">0</property>
955 </object>
956 <packing>
957- <property name="padding">0</property>
958 <property name="expand">False</property>
959 <property name="fill">False</property>
960+ <property name="position">0</property>
961 </packing>
962 </child>
963 <child>
964 <object class="GtkVBox" id="vbox_messages">
965 <property name="visible">True</property>
966- <property name="homogeneous">False</property>
967+ <property name="can_focus">False</property>
968 <property name="spacing">12</property>
969 <child>
970 <object class="GtkLabel" id="label_message">
971 <property name="visible">True</property>
972 <property name="can_focus">True</property>
973+ <property name="xalign">0</property>
974 <property name="label" translatable="yes">The computer needs to restart to finish installing updates. Please save your work before continuing.</property>
975- <property name="use_underline">False</property>
976 <property name="use_markup">True</property>
977- <property name="justify">GTK_JUSTIFY_LEFT</property>
978 <property name="wrap">True</property>
979 <property name="selectable">True</property>
980- <property name="xalign">0</property>
981- <property name="yalign">0.5</property>
982- <property name="xpad">0</property>
983- <property name="ypad">0</property>
984- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
985- <property name="width_chars">-1</property>
986- <property name="single_line_mode">False</property>
987- <property name="angle">0</property>
988 </object>
989 <packing>
990- <property name="padding">0</property>
991 <property name="expand">False</property>
992 <property name="fill">False</property>
993+ <property name="position">0</property>
994 </packing>
995 </child>
996 </object>
997 <packing>
998- <property name="padding">0</property>
999 <property name="expand">True</property>
1000 <property name="fill">True</property>
1001+ <property name="position">1</property>
1002 </packing>
1003 </child>
1004 </object>
1005 <packing>
1006- <property name="padding">0</property>
1007 <property name="expand">True</property>
1008 <property name="fill">True</property>
1009+ <property name="position">0</property>
1010 </packing>
1011 </child>
1012 <child>
1013@@ -247,9 +199,9 @@
1014 </child>
1015 </object>
1016 <packing>
1017- <property name="padding">0</property>
1018 <property name="expand">True</property>
1019 <property name="fill">True</property>
1020+ <property name="position">1</property>
1021 </packing>
1022 </child>
1023 </object>

Subscribers

People subscribed via source and target branches

to all changes: