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>

svn path=/trunk/; revision=9176
This commit is contained in:
Federico Mena Quintero 2008-12-18 19:09:21 +00:00 committed by Federico Mena Quintero
parent ae0f600947
commit 1394953ef6
2 changed files with 38 additions and 0 deletions

View file

@ -1,3 +1,12 @@
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.
2008-12-16 Frederic Peters <fpeters@0d.be>
* xrandr-capplet.c: (select_current_output_from_dialog_position):

View file

@ -1833,6 +1833,32 @@ dialog_map_event_cb (GtkWidget *widget, GdkEventAny *event, gpointer data)
return FALSE;
}
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)
{
@ -1926,6 +1952,9 @@ run_application (App *app)
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);