ayatana-commits team mailing list archive
-
ayatana-commits team
-
Mailing list archive
-
Message #03877
[Merge] lp:~cjcurran/indicator-session/apt-menuitem-fixes into lp:indicator-session
Conor Curran has proposed merging lp:~cjcurran/indicator-session/apt-menuitem-fixes into lp:indicator-session.
Requested reviews:
Ted Gould (ted)
For more details, see:
https://code.launchpad.net/~cjcurran/indicator-session/apt-menuitem-fixes/+merge/73759
fixes the final few issues with the apt menuitem i hope, kinda hard to test
--
https://code.launchpad.net/~cjcurran/indicator-session/apt-menuitem-fixes/+merge/73759
Your team ayatana-commits is subscribed to branch lp:indicator-session.
=== modified file 'src/apt-transaction.c'
--- src/apt-transaction.c 2011-08-12 12:23:35 +0000
+++ src/apt-transaction.c 2011-09-02 09:13:24 +0000
@@ -213,7 +213,7 @@
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);
+ //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");
=== modified file 'src/apt-watcher.c'
--- src/apt-watcher.c 2011-08-31 17:20:08 +0000
+++ src/apt-watcher.c 2011-09-02 09:13:24 +0000
@@ -298,6 +298,11 @@
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 @@
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 @@
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 @@
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);
Follow ups