Merge lp:~cjcurran/indicator-session/apt-menuitem-fixes into lp:indicator-session/0.1

Proposed by Conor Curran
Status: Merged
Merged at revision: 200
Proposed branch: lp:~cjcurran/indicator-session/apt-menuitem-fixes
Merge into: lp:indicator-session/0.1
Diff against target: 64 lines (+14/-8)
2 files modified
src/apt-transaction.c (+1/-1)
src/apt-watcher.c (+13/-7)
To merge this branch: bzr merge lp:~cjcurran/indicator-session/apt-menuitem-fixes
Reviewer Review Type Date Requested Status
Ted Gould Pending
Review via email: mp+73759@code.launchpad.net

Description of the change

fixes the final few issues with the apt menuitem i hope, kinda hard to test

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/apt-transaction.c'
2--- src/apt-transaction.c 2011-08-12 12:23:35 +0000
3+++ src/apt-transaction.c 2011-09-02 09:13:24 +0000
4@@ -213,7 +213,7 @@
5 if (g_variant_is_of_type (role, G_VARIANT_TYPE_STRING) == TRUE){
6 gchar* current_role = NULL;
7 g_variant_get (role, "s", &current_role);
8- g_debug ("Current transaction role = %s", current_role);
9+ //g_debug ("Current transaction role = %s", current_role);
10 if (g_strcmp0 (current_role, "role-commit-packages") == 0 ||
11 g_strcmp0 (current_role, "role-upgrade-system") == 0){
12 g_debug ("UPGRADE IN PROGRESS");
13
14=== modified file 'src/apt-watcher.c'
15--- src/apt-watcher.c 2011-08-31 17:20:08 +0000
16+++ src/apt-watcher.c 2011-09-02 09:13:24 +0000
17@@ -298,6 +298,11 @@
18 else if (state == FINISHED){
19 g_object_unref (G_OBJECT(self->current_transaction));
20 self->current_transaction = NULL;
21+
22+ if (self->current_state == UPDATES_AVAILABLE){
23+ return;
24+ }
25+
26 if (self->reboot_query != 0){
27 g_source_remove (self->reboot_query);
28 self->reboot_query = 0;
29@@ -359,8 +364,6 @@
30 return FALSE;
31 }
32
33-// TODO - Ask MVO about this.
34-// Signal is of type s not sas which is on d-feet.
35 static void apt_watcher_signal_cb ( GDBusProxy* proxy,
36 gchar* sender_name,
37 gchar* signal_name,
38@@ -374,10 +377,13 @@
39 GVariant *value = g_variant_get_child_value (parameters, 0);
40
41 if (g_strcmp0(signal_name, "ActiveTransactionsChanged") == 0){
42- gchar* input = NULL;
43- g_variant_get(value, "s", & input);
44- if (g_str_has_prefix (input, "/org/debian/apt/transaction/") == TRUE){
45- g_debug ("Active Transactions signal - input is null = %i", input == NULL);
46+ gchar* current = NULL;
47+ g_debug ("ActiveTransactionsChanged");
48+
49+ //gchar** queued = NULL;
50+ g_variant_get(value, "s", &current);
51+ if (g_str_has_prefix (current, "/org/debian/apt/transaction/") == TRUE){
52+ g_debug ("ActiveTransactionsChanged - current is %s", current);
53
54 if (self->current_transaction != NULL)
55 {
56@@ -385,7 +391,7 @@
57 self->current_transaction = NULL;
58 }
59
60- self->current_transaction = apt_transaction_new (input, REAL);
61+ self->current_transaction = apt_transaction_new (current, REAL);
62 g_signal_connect (G_OBJECT(self->current_transaction),
63 "state-update",
64 G_CALLBACK(apt_watcher_transaction_state_update_cb), self);

Subscribers

People subscribed via source and target branches