diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-12-08 22:10:08 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-12-08 22:10:08 +0000 |
commit | 52e002de9a56d56439ce37d57bad766264f41a10 (patch) | |
tree | 39b29d927747a20549a5f5d2e76ff3c92e8e96ea | |
parent | fafd5ae157860508be87a3ffcd7f1762524eae92 (diff) | |
download | gnunet-gtk-52e002de9a56d56439ce37d57bad766264f41a10.tar.gz gnunet-gtk-52e002de9a56d56439ce37d57bad766264f41a10.zip |
hide useless help link button on GADS page
-rw-r--r-- | contrib/gnunet_setup_gtk_main_window.glade | 1 | ||||
-rw-r--r-- | src/setup/gnunet-setup.c | 22 |
2 files changed, 23 insertions, 0 deletions
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 @@ | |||
87 | <object class="GtkNotebook" id="GNUNET_setup_notebook"> | 87 | <object class="GtkNotebook" id="GNUNET_setup_notebook"> |
88 | <property name="visible">True</property> | 88 | <property name="visible">True</property> |
89 | <property name="can_focus">True</property> | 89 | <property name="can_focus">True</property> |
90 | <signal name="switch-page" handler="GNUNET_setup_notebook_switch_page_cb" swapped="no"/> | ||
90 | <child> | 91 | <child> |
91 | <object class="GtkVBox" id="GNUNET_setup_general_vbox"> | 92 | <object class="GtkVBox" id="GNUNET_setup_general_vbox"> |
92 | <property name="visible">True</property> | 93 | <property name="visible">True</property> |
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 | |||
@@ -124,6 +124,28 @@ help_click_callback (GtkWidget * widget, GdkEventButton * event, | |||
124 | 124 | ||
125 | 125 | ||
126 | /** | 126 | /** |
127 | * The main visible page in our main notebook changed. If the | ||
128 | * GADS page is visible, hide the help text, otherwise show it. | ||
129 | */ | ||
130 | void | ||
131 | GNUNET_setup_notebook_switch_page_cb (GtkNotebook *notebook, | ||
132 | GtkWidget *page, | ||
133 | guint page_num, | ||
134 | gpointer user_data) | ||
135 | { | ||
136 | GtkWidget *help; | ||
137 | GtkWidget *gads; | ||
138 | |||
139 | help = GTK_WIDGET (GNUNET_SETUP_get_object ("GNUNET_setup_help_text")); | ||
140 | gads = GTK_WIDGET (GNUNET_SETUP_get_object ("GNUNET_setup_gads_vbox")); | ||
141 | if (gads == page) | ||
142 | gtk_widget_hide (help); | ||
143 | else | ||
144 | gtk_widget_show (help); | ||
145 | } | ||
146 | |||
147 | |||
148 | /** | ||
127 | * Change the visibility of widgets according to the | 149 | * Change the visibility of widgets according to the |
128 | * value and visibility specification given. | 150 | * value and visibility specification given. |
129 | * | 151 | * |