From 52e002de9a56d56439ce37d57bad766264f41a10 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 8 Dec 2012 22:10:08 +0000 Subject: hide useless help link button on GADS page --- contrib/gnunet_setup_gtk_main_window.glade | 1 + src/setup/gnunet-setup.c | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/contrib/gnunet_setup_gtk_main_window.glade b/contrib/gnunet_setup_gtk_main_window.glade index 62bd1377..0c719bab 100644 --- a/contrib/gnunet_setup_gtk_main_window.glade +++ b/contrib/gnunet_setup_gtk_main_window.glade @@ -87,6 +87,7 @@ True True + True diff --git a/src/setup/gnunet-setup.c b/src/setup/gnunet-setup.c index df292fa5..a4a83d18 100644 --- a/src/setup/gnunet-setup.c +++ b/src/setup/gnunet-setup.c @@ -123,6 +123,28 @@ help_click_callback (GtkWidget * widget, GdkEventButton * event, } +/** + * The main visible page in our main notebook changed. If the + * GADS page is visible, hide the help text, otherwise show it. + */ +void +GNUNET_setup_notebook_switch_page_cb (GtkNotebook *notebook, + GtkWidget *page, + guint page_num, + gpointer user_data) +{ + GtkWidget *help; + GtkWidget *gads; + + help = GTK_WIDGET (GNUNET_SETUP_get_object ("GNUNET_setup_help_text")); + gads = GTK_WIDGET (GNUNET_SETUP_get_object ("GNUNET_setup_gads_vbox")); + if (gads == page) + gtk_widget_hide (help); + else + gtk_widget_show (help); +} + + /** * Change the visibility of widgets according to the * value and visibility specification given. -- cgit v1.2.3