gnome-control-center r9176 - trunk/capplets/display



Author: federico
Date: Thu Dec 18 19:09:21 2008
New Revision: 9176
URL: http://svn.gnome.org/viewvc/gnome-control-center?rev=9176&view=rev

Log:
bnc450141 - Hide the Help button in the display capplet, as it does nothing
2008-12-16  Federico Mena Quintero  <federico novell com>

	https://bugzilla.novell.com/show_bug.cgi?id=450141 - Help button
	in the Display capplet does nothing.

	* xrandr-capplet.c (run_application): Hide the Help button as we
	have no help to show for this capplet yet.
	(hide_help_button): New function.

Signed-off-by: Federico Mena Quintero <federico novell com>

Modified:
   trunk/capplets/display/ChangeLog
   trunk/capplets/display/xrandr-capplet.c

Modified: trunk/capplets/display/xrandr-capplet.c
==============================================================================
--- trunk/capplets/display/xrandr-capplet.c	(original)
+++ trunk/capplets/display/xrandr-capplet.c	Thu Dec 18 19:09:21 2008
@@ -1834,6 +1834,32 @@
 }
 
 static void
+hide_help_button (App *app)
+{
+    GtkWidget *action_area;
+    GList *children;
+    GList *l;
+
+    action_area = gtk_dialog_get_action_area (GTK_DIALOG (app->dialog));
+    children = gtk_container_get_children (GTK_CONTAINER (action_area));
+
+    for (l = children; l; l = l->next)
+    {
+	GtkWidget *child;
+	int response;
+
+	child = GTK_WIDGET (l->data);
+
+	response = gtk_dialog_get_response_for_widget (GTK_DIALOG (app->dialog), child);
+	if (response == GTK_RESPONSE_HELP)
+	{
+	    gtk_widget_hide (child);
+	    return;
+	}
+    }
+}
+
+static void
 run_application (App *app)
 {
 #ifndef GLADEDIR
@@ -1926,6 +1952,9 @@
 
     gtk_container_add (GTK_CONTAINER (align), app->area);
 
+    /* Until we have help to show, we'll just hide the Help button */
+    hide_help_button (app);
+
     on_screen_changed (app->screen, app);
 
     g_object_unref (xml);



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