aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastien Bacher <seb128@ubuntu.com>2012-03-14 19:34:16 +0100
committerSebastien Bacher <seb128@ubuntu.com>2012-03-14 19:34:16 +0100
commitedd9186e435382b9f13d9c42a64c4778961814f5 (patch)
tree9693df6dd56732cea14a76a902a2b655996aeeec /src
parent59aeee2af527feb71089354f29d5155a40512f9f (diff)
parentbc34f047520493d166e785a5fca971f7a4a830a9 (diff)
downloadayatana-indicator-session-edd9186e435382b9f13d9c42a64c4778961814f5.tar.gz
ayatana-indicator-session-edd9186e435382b9f13d9c42a64c4778961814f5.tar.bz2
ayatana-indicator-session-edd9186e435382b9f13d9c42a64c4778961814f5.zip
Import upstream version 0.3.94
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.in5
-rw-r--r--src/apt-watcher.c25
2 files changed, 19 insertions, 11 deletions
diff --git a/src/Makefile.in b/src/Makefile.in
index ab579b3..91d22d4 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -58,7 +58,10 @@ libexec_PROGRAMS = indicator-session-service$(EXEEXT) $(am__EXEEXT_1)
subdir = src
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/intltool.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
diff --git a/src/apt-watcher.c b/src/apt-watcher.c
index c638a93..092942f 100644
--- a/src/apt-watcher.c
+++ b/src/apt-watcher.c
@@ -52,6 +52,7 @@ get_updates_complete (GObject *source_object,
AptWatcher* self = APT_WATCHER (user_data);
PkResults *results;
+ PkRestartEnum restart_required;
GError *error = NULL;
results = pk_client_generic_finish (PK_CLIENT(source_object), res, &error);
@@ -83,6 +84,20 @@ get_updates_complete (GObject *source_object,
DBUSMENU_MENUITEM_PROP_LABEL,
_("Software Up to Date"));
}
+
+ /* check if there was a restart required info in the signal */
+ restart_required = pk_results_get_require_restart_worst (results);
+ if (restart_required == PK_RESTART_ENUM_SYSTEM ||
+ restart_required == PK_RESTART_ENUM_SECURITY_SYSTEM) {
+ dbusmenu_menuitem_property_set (self->apt_item,
+ DBUSMENU_MENUITEM_PROP_LABEL,
+ _("Restart to Complete Updates…"));
+ dbusmenu_menuitem_property_set (self->apt_item,
+ DBUSMENU_MENUITEM_PROP_DISPOSITION,
+ DBUSMENU_MENUITEM_DISPOSITION_ALERT);
+ session_dbus_restart_required (self->session_dbus_interface);
+ }
+
g_ptr_array_unref (packages);
g_object_unref (results);
g_object_unref (source_object);
@@ -115,16 +130,6 @@ static void apt_watcher_signal_cb ( GDBusProxy* proxy,
g_debug ("updates changed signal received");
apt_watcher_check_for_updates (self);
}
- else if (g_strcmp0(signal_name, "RestartSchedule") == 0) {
- g_debug ("RestartScheduled signal received");
- dbusmenu_menuitem_property_set (self->apt_item,
- DBUSMENU_MENUITEM_PROP_LABEL,
- _("Restart to Complete Updates…"));
- dbusmenu_menuitem_property_set (self->apt_item,
- DBUSMENU_MENUITEM_PROP_DISPOSITION,
- DBUSMENU_MENUITEM_DISPOSITION_ALERT);
- session_dbus_restart_required (self->session_dbus_interface);
- }
}
static void