diff options
author | Conor Curran <conor.curran@canonical.com> | 2011-09-08 10:22:06 +0100 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2011-09-08 10:22:06 +0100 |
commit | e889dd7e4d0f5f3eb84d4eff9c080b0f23883999 (patch) | |
tree | 2cda66ed432779506cca6aede1ad0f0565023326 /src/apt-transaction.c | |
parent | ba69c336b75e608f2fced7d63bd3e8f2722ef82f (diff) | |
parent | b85f29bbd848238a4b60fe2eccf3ead06c47b979 (diff) | |
download | ayatana-indicator-session-e889dd7e4d0f5f3eb84d4eff9c080b0f23883999.tar.gz ayatana-indicator-session-e889dd7e4d0f5f3eb84d4eff9c080b0f23883999.tar.bz2 ayatana-indicator-session-e889dd7e4d0f5f3eb84d4eff9c080b0f23883999.zip |
merge the apt handling fixes
Diffstat (limited to 'src/apt-transaction.c')
-rw-r--r-- | src/apt-transaction.c | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/src/apt-transaction.c b/src/apt-transaction.c index cd9e131..317d74a 100644 --- a/src/apt-transaction.c +++ b/src/apt-transaction.c @@ -160,7 +160,7 @@ apt_transaction_receive_signal (GDBusProxy * proxy, AptTransaction* self = APT_TRANSACTION(user_data); AptState current_state = DONT_KNOW; - if (g_strcmp0(signal_name, "PropertyChanged") == 0 && self->type == SIMULATION) + if (g_strcmp0(signal_name, "PropertyChanged") == 0) { gchar* prop_name= NULL; GVariant* value = NULL; @@ -204,23 +204,22 @@ apt_transaction_receive_signal (GDBusProxy * proxy, current_state = UP_TO_DATE; } } - } - else if (g_strcmp0(signal_name, "PropertyChanged") == 0 && - self->type == REAL) - { - GVariant* role = g_dbus_proxy_get_cached_property (self->proxy, - "Role"); - if (g_variant_is_of_type (role, G_VARIANT_TYPE_STRING) == TRUE){ - gchar* current_role = NULL; - g_variant_get (role, "s", ¤t_role); - //g_debug ("Current transaction role = %s", current_role); - if (g_strcmp0 (current_role, "role-commit-packages") == 0 || - g_strcmp0 (current_role, "role-upgrade-system") == 0){ - g_debug ("UPGRADE IN PROGRESS"); - current_state = UPGRADE_IN_PROGRESS; + if (self->type == REAL) + { + GVariant* role = g_dbus_proxy_get_cached_property (self->proxy, + "Role"); + if (g_variant_is_of_type (role, G_VARIANT_TYPE_STRING) == TRUE){ + gchar* current_role = NULL; + g_variant_get (role, "s", ¤t_role); + //g_debug ("Current transaction role = %s", current_role); + if (g_strcmp0 (current_role, "role-commit-packages") == 0 || + g_strcmp0 (current_role, "role-upgrade-system") == 0){ + g_debug ("UPGRADE IN PROGRESS"); + current_state = UPGRADE_IN_PROGRESS; + } } - } - } + } + } else if (g_strcmp0(signal_name, "Finished") == 0) { g_debug ("TRANSACTION Finished"); |