[gnome-control-center] color: If there are no profiles or devices then hide the toolbar



commit df30d9ea067770c29169d026185be92797ce2fb5
Author: Richard Hughes <richard hughsie com>
Date:   Wed Aug 24 12:35:43 2011 +0100

    color: If there are no profiles or devices then hide the toolbar

 panels/color/cc-color-panel.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/panels/color/cc-color-panel.c b/panels/color/cc-color-panel.c
index 17bb2b6..76d87c1 100644
--- a/panels/color/cc-color-panel.c
+++ b/panels/color/cc-color-panel.c
@@ -948,6 +948,11 @@ gcm_prefs_devices_treeview_clicked_cb (GtkTreeSelection *selection,
                                                "toolbutton_profile_remove"));
   gtk_widget_set_visible (widget, profile != NULL);
 
+  /* if no buttons then hide toolbar */
+  widget = GTK_WIDGET (gtk_builder_get_object (priv->builder,
+                                               "toolbar_devices"));
+  gtk_widget_set_visible (widget, profile != NULL || device != NULL);
+
   if (device != NULL)
     g_object_unref (device);
   if (profile != NULL)



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