[gnome-disk-utility/udisks2-port] Nuke debug spew and use switch instead of if-then-else



commit d70b5fb0f1ad3f1e36e6bf6facbc39542c3f9e7b
Author: David Zeuthen <davidz redhat com>
Date:   Mon Mar 14 16:57:32 2011 -0400

    Nuke debug spew and use switch instead of if-then-else
    
    Signed-off-by: David Zeuthen <davidz redhat com>

 src/palimpsest/gduwindow.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/src/palimpsest/gduwindow.c b/src/palimpsest/gduwindow.c
index fdbd69c..8a590b8 100644
--- a/src/palimpsest/gduwindow.c
+++ b/src/palimpsest/gduwindow.c
@@ -788,18 +788,19 @@ static void
 update_all (GduWindow         *window,
             GDBusObjectProxy  *object_proxy)
 {
-  g_debug ("In %s co=%p (%s) op=%p (%s)",
-           G_STRFUNC,
-           window->current_object_proxy, g_dbus_object_proxy_get_object_path (window->current_object_proxy),
-           object_proxy, g_dbus_object_proxy_get_object_path (object_proxy));
-
-  if (window->current_page == DETAILS_PAGE_DEVICE)
+  switch (window->current_page)
     {
+    case DETAILS_PAGE_NOT_SELECTED:
+      /* Nothing to update */
+      break;
+
+    case DETAILS_PAGE_DEVICE:
       /* this is a little too inclusive.. */
       if (gdu_volume_grid_includes_object_proxy (GDU_VOLUME_GRID (window->volume_grid), object_proxy))
         {
           update_details_page (window, window->current_page);
         }
+      break;
     }
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]