screen: Hide brightness heading when unused

Trying to just hide the widget will cause some severely bizarre
display problems, so just set the heading to be empty instead
for now.

We should probably look at another way of handling this case.

https://bugzilla.gnome.org/show_bug.cgi?id=657606
This commit is contained in:
Bastien Nocera 2011-08-29 12:51:25 +01:00
parent 824c26c925
commit 9410bea42f

View file

@ -253,6 +253,9 @@ get_brightness_cb (GObject *source_object, GAsyncResult *res, gpointer user_data
{
gtk_widget_hide (WID ("screen_brightness_hscale"));
gtk_widget_hide (WID ("screen_auto_reduce_checkbutton"));
/* FIXME: This needs a proper fix:
* https://bugzilla.gnome.org/show_bug.cgi?id=657606 */
gtk_label_set_text (GTK_LABEL (WID ("brightness-section-heading")), "");
g_warning ("Error getting brightness: %s", error->message);
g_error_free (error);
return;