summaryrefslogtreecommitdiff
path: root/capplets
diff options
context:
space:
mode:
authorrbuj <[email protected]>2019-12-23 16:51:02 +0100
committerlukefromdc <[email protected]>2019-12-24 04:38:24 +0000
commit499985d8bae4d8997cec179a8dd86271a5b12bce (patch)
tree257efaa5503f60aa74617e02a4508b474ca51ed7 /capplets
parente55cb4a76da6da669a6f78575a93acc22bf3c6bd (diff)
downloadmate-control-center-499985d8bae4d8997cec179a8dd86271a5b12bce.tar.bz2
mate-control-center-499985d8bae4d8997cec179a8dd86271a5b12bce.tar.xz
display: Enable help button
Diffstat (limited to 'capplets')
-rw-r--r--capplets/display/xrandr-capplet.c41
1 files changed, 9 insertions, 32 deletions
diff --git a/capplets/display/xrandr-capplet.c b/capplets/display/xrandr-capplet.c
index 42b6b9b4..ebc7f348 100644
--- a/capplets/display/xrandr-capplet.c
+++ b/capplets/display/xrandr-capplet.c
@@ -2279,32 +2279,6 @@ dialog_map_event_cb (GtkWidget *widget, GdkEventAny *event, gpointer data)
}
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
apply_button_clicked_cb (GtkButton *button, gpointer data)
{
App *app = data;
@@ -2505,9 +2479,6 @@ 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);
-
app->apply_button = _gtk_builder_get_widget (builder, "apply_button");
g_signal_connect (app->apply_button, "clicked",
G_CALLBACK (apply_button_clicked_cb), app);
@@ -2529,9 +2500,15 @@ restart:
break;
case GTK_RESPONSE_HELP:
-#if 0
- g_debug ("Help");
-#endif
+ gtk_show_uri_on_window (GTK_DIALOG (app->dialog),
+ "help:mate-user-guide/goscustdesk-70",
+ gtk_get_current_event_time (),
+ &error);
+ if (error)
+ {
+ error_message (app, _("Could not open help content"), error->message);
+ g_error_free (error);
+ }
goto restart;
break;