aboutsummaryrefslogtreecommitdiff
path: root/src/apt-watcher.c
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2011-08-31 18:02:57 +0100
committerConor Curran <conor.curran@canonical.com>2011-08-31 18:02:57 +0100
commit5f9ec570e2e9552273a9a7b4c15cc4f6ce03a3ab (patch)
tree84954bf36822f0f576b3d0db268b3cc4cd427552 /src/apt-watcher.c
parentc7a50eedd6e9878547b73e8cf952f75f544cb5d2 (diff)
downloadayatana-indicator-session-5f9ec570e2e9552273a9a7b4c15cc4f6ce03a3ab.tar.gz
ayatana-indicator-session-5f9ec570e2e9552273a9a7b4c15cc4f6ce03a3ab.tar.bz2
ayatana-indicator-session-5f9ec570e2e9552273a9a7b4c15cc4f6ce03a3ab.zip
tidy up
Diffstat (limited to 'src/apt-watcher.c')
-rw-r--r--src/apt-watcher.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/apt-watcher.c b/src/apt-watcher.c
index 779d02b..d19dc4f 100644
--- a/src/apt-watcher.c
+++ b/src/apt-watcher.c
@@ -221,17 +221,14 @@ apt_watcher_show_apt_dialog (DbusmenuMenuitem * mi,
GError * error = NULL;
g_return_if_fail (APT_IS_WATCHER (userdata));
AptWatcher* self = APT_WATCHER (userdata);
-
- gchar* disposition = dbusmenu_menuitem_property_get (self->apt_item,
- DBUSMENU_MENUITEM_PROP_DISPOSITION);
+ const gchar* disposition = NULL;
+ disposition = dbusmenu_menuitem_property_get (self->apt_item,
+ DBUSMENU_MENUITEM_PROP_DISPOSITION);
if (g_strcmp0 (disposition, DBUSMENU_MENUITEM_DISPOSITION_ALERT) == 0){
gchar * helper = g_build_filename (LIBEXECDIR, "gtk-logout-helper", NULL);
- gchar * dialog_line = g_strdup_printf ("%s --%s", helper, "Restart");
+ gchar * dialog_line = g_strdup_printf ("%s --%s", helper, "restart");
g_free(helper);
- g_debug("Showing dialog '%s'", dialog_line);
- GError * error = NULL;
-
if (!g_spawn_command_line_async(dialog_line, &error)) {
g_warning("Unable to show dialog: %s", error->message);
g_error_free(error);