← Back to team overview

ayatana-commits team mailing list archive

[Merge] lp:~cjcurran/indicator-session/apt-updates-bug into lp:indicator-session

 

Conor Curran has proposed merging lp:~cjcurran/indicator-session/apt-updates-bug into lp:indicator-session.

Requested reviews:
  Ted Gould (ted)

For more details, see:
https://code.launchpad.net/~cjcurran/indicator-session/apt-updates-bug/+merge/71348

Now the apt-transaction should only flag that there are updates available when there is more than one update in the array, gstrvlength returns length 1 when the array on dfeet is empty
-- 
https://code.launchpad.net/~cjcurran/indicator-session/apt-updates-bug/+merge/71348
Your team ayatana-commits is subscribed to branch lp:indicator-session.
=== modified file 'src/apt-transaction.c'
--- src/apt-transaction.c	2011-08-05 15:09:59 +0000
+++ src/apt-transaction.c	2011-08-12 12:27:24 +0000
@@ -185,11 +185,18 @@
       g_variant_get (value, "(asasasasasasas)", &install, 
                      &reinstall, &remove, &purge, &upgrade, &downgrade,
                      &keep);      
-      gboolean upgrade_needed = (g_strv_length(upgrade) > 0) ||
-                                (g_strv_length(install) > 0) ||
-                                (g_strv_length(reinstall) > 0) ||
-                                (g_strv_length(remove) > 0) ||
-                                (g_strv_length(purge) > 0);
+      /*                     
+      g_debug ("upgrade package length %i", g_strv_length(upgrade));                
+      g_debug ("install package length %i", g_strv_length(install));
+      g_debug ("reinstall package length %i", g_strv_length(reinstall));
+      g_debug ("remove package length %i", g_strv_length(remove));
+      g_debug ("purge package length %i", g_strv_length(purge));
+      */
+      gboolean upgrade_needed = (g_strv_length(upgrade) > 1) ||
+                                (g_strv_length(install) > 1) ||
+                                (g_strv_length(reinstall) > 1) ||
+                                (g_strv_length(remove) > 1) ||
+                                (g_strv_length(purge) > 1);
       if (upgrade_needed == TRUE){
         current_state = UPDATES_AVAILABLE;        
       }

=== modified file 'src/apt-watcher.c'
--- src/apt-watcher.c	2011-08-09 08:59:20 +0000
+++ src/apt-watcher.c	2011-08-12 12:27:24 +0000
@@ -281,8 +281,9 @@
                                       _("Reboot Required"));
       session_dbus_restart_required (self->session_dbus_interface);
     }
+    g_debug ("Finished with a reboot value of %i", reboot); 
     g_object_unref (G_OBJECT(self->current_transaction));
-    self->current_transaction = NULL;                                        
+    self->current_transaction = NULL;                                    
   }
   self->current_state = state;
 } 
@@ -327,9 +328,7 @@
       self->current_transaction = apt_transaction_new (input, REAL);
       g_signal_connect (G_OBJECT(self->current_transaction),
                         "state-update",
-                        G_CALLBACK(apt_watcher_transaction_state_update_cb), self);
-      
-          
+                        G_CALLBACK(apt_watcher_transaction_state_update_cb), self);              
     }
   }
   g_variant_unref (parameters);

=== modified file 'src/indicator-session.c'
--- src/indicator-session.c	2011-08-09 08:59:20 +0000
+++ src/indicator-session.c	2011-08-12 12:27:24 +0000
@@ -163,13 +163,11 @@
   }
                                                       
   self->users.label = GTK_LABEL (gtk_label_new (NULL));
-  // Only show once we have a valid username
-  // gtk_widget_hide (GTK_WIDGET(self->users.label));
 
   // devices
   self->devices.menu = GTK_MENU (dbusmenu_gtkmenu_new(INDICATOR_SESSION_DBUS_NAME,
                                                       INDICATOR_SESSION_DBUS_OBJECT));
-  self->devices.image = indicator_image_helper (ICON_DEFAULT);
+  self->devices.image = indicator_image_helper ("system-devices-panel");
   
   gtk_widget_show (GTK_WIDGET(self->devices.menu));
   gtk_widget_show (GTK_WIDGET(self->devices.image));
@@ -501,7 +499,7 @@
   }
   else if (g_strcmp0(signal_name, "RebootRequired") == 0) {
     // TODO waiting on design to give me a name.
-    self->devices.image = indicator_image_helper (ICON_DEFAULT);        
+    self->devices.image = indicator_image_helper ("system-devices-alert-panel");        
   }  
 }
 


Follow ups