diff options
author | Ken VanDine <ken.vandine@canonical.com> | 2011-09-02 12:22:01 -0400 |
---|---|---|
committer | Ken VanDine <ken.vandine@canonical.com> | 2011-09-02 12:22:01 -0400 |
commit | 4faa2c96bc8f608d7066564dd2569c013a2c6ea4 (patch) | |
tree | 1f4beb6cc8fd385c244fee13a13f9ab068ee4fd1 /src/apt-watcher.c | |
parent | abcb5c20d4788aa28a831dae1c3cb16e8a68f5bd (diff) | |
parent | 3f39e981fdbe934faf762de161645edd5eba753f (diff) | |
download | ayatana-indicator-session-4faa2c96bc8f608d7066564dd2569c013a2c6ea4.tar.gz ayatana-indicator-session-4faa2c96bc8f608d7066564dd2569c013a2c6ea4.tar.bz2 ayatana-indicator-session-4faa2c96bc8f608d7066564dd2569c013a2c6ea4.zip |
Import upstream version 0.3.4.2
Diffstat (limited to 'src/apt-watcher.c')
-rw-r--r-- | src/apt-watcher.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/apt-watcher.c b/src/apt-watcher.c index f5c9d55..480e174 100644 --- a/src/apt-watcher.c +++ b/src/apt-watcher.c @@ -298,6 +298,11 @@ apt_watcher_transaction_state_update_cb (AptTransaction* trans, else if (state == FINISHED){ g_object_unref (G_OBJECT(self->current_transaction)); self->current_transaction = NULL; + + if (self->current_state == UPDATES_AVAILABLE){ + return; + } + if (self->reboot_query != 0){ g_source_remove (self->reboot_query); self->reboot_query = 0; @@ -359,8 +364,6 @@ apt_watcher_query_reboot_status (gpointer data) return FALSE; } -// TODO - Ask MVO about this. -// Signal is of type s not sas which is on d-feet. static void apt_watcher_signal_cb ( GDBusProxy* proxy, gchar* sender_name, gchar* signal_name, @@ -374,10 +377,13 @@ static void apt_watcher_signal_cb ( GDBusProxy* proxy, GVariant *value = g_variant_get_child_value (parameters, 0); if (g_strcmp0(signal_name, "ActiveTransactionsChanged") == 0){ - gchar* input = NULL; - g_variant_get(value, "s", & input); - if (g_str_has_prefix (input, "/org/debian/apt/transaction/") == TRUE){ - g_debug ("Active Transactions signal - input is null = %i", input == NULL); + gchar* current = NULL; + g_debug ("ActiveTransactionsChanged"); + + //gchar** queued = NULL; + g_variant_get(value, "s", ¤t); + if (g_str_has_prefix (current, "/org/debian/apt/transaction/") == TRUE){ + g_debug ("ActiveTransactionsChanged - current is %s", current); if (self->current_transaction != NULL) { @@ -385,7 +391,7 @@ static void apt_watcher_signal_cb ( GDBusProxy* proxy, self->current_transaction = NULL; } - self->current_transaction = apt_transaction_new (input, REAL); + self->current_transaction = apt_transaction_new (current, REAL); g_signal_connect (G_OBJECT(self->current_transaction), "state-update", G_CALLBACK(apt_watcher_transaction_state_update_cb), self); |