[gnome-initial-setup] gis-assistant: Hide navigation buttons on last page
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup] gis-assistant: Hide navigation buttons on last page
- Date: Mon, 30 Jul 2012 23:53:31 +0000 (UTC)
commit 6327d0f13856e1e3a8ce71e9542fd165141faef1
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Jul 27 06:20:20 2012 -0300
gis-assistant: Hide navigation buttons on last page
gnome-initial-setup/gis-assistant.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/gnome-initial-setup/gis-assistant.c b/gnome-initial-setup/gis-assistant.c
index 738b389..f3822f6 100644
--- a/gnome-initial-setup/gis-assistant.c
+++ b/gnome-initial-setup/gis-assistant.c
@@ -127,14 +127,19 @@ update_navigation_buttons (GisAssistant *assistant,
GtkWidget *page)
{
GisAssistantPrivate *priv = assistant->priv;
- gboolean can_go_backward, can_go_forward;
+ PageData *current_page = priv->current_page;
+ gboolean can_go_backward, can_go_forward, is_last_page;
- can_go_backward = (priv->current_page->link->prev != NULL);
+ can_go_backward = (current_page->link->prev != NULL);
gtk_widget_set_sensitive (priv->back, can_go_backward);
- can_go_forward = (priv->current_page->link->next != NULL) && gis_assistant_get_page_complete (assistant, page);
+ can_go_forward = gis_assistant_get_page_complete (assistant, page);
gtk_widget_set_sensitive (priv->forward, can_go_forward);
+ is_last_page = (current_page->link->next == NULL);
+ gtk_widget_set_visible (priv->back, !is_last_page);
+ gtk_widget_set_visible (priv->forward, !is_last_page);
+
if (gis_assistant_get_use_unicode_buttons (assistant, page))
{
gtk_button_set_label (GTK_BUTTON (priv->forward), "â");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]