[gnome-initial-setup] cc-notebook: Allow deleting the current page
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup] cc-notebook: Allow deleting the current page
- Date: Tue, 21 Aug 2012 19:37:01 +0000 (UTC)
commit 9ecf95ba1e8c6021097e549015ca3049eec4dc39
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Aug 21 15:05:11 2012 -0400
cc-notebook: Allow deleting the current page
gnome-initial-setup/cc-notebook.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gnome-initial-setup/cc-notebook.c b/gnome-initial-setup/cc-notebook.c
index 8de082c..0cfbaf2 100644
--- a/gnome-initial-setup/cc-notebook.c
+++ b/gnome-initial-setup/cc-notebook.c
@@ -530,7 +530,6 @@ cc_notebook_remove_page (CcNotebook *self,
g_return_if_fail (CC_IS_NOTEBOOK (self));
g_return_if_fail (GTK_IS_WIDGET (widget));
- g_return_if_fail (widget != self->priv->selected_page);
frame = g_object_get_data (G_OBJECT (widget), "cc-notebook-frame");
@@ -547,6 +546,10 @@ cc_notebook_remove_page (CcNotebook *self,
}
self->priv->pages = g_list_remove (self->priv->pages, widget);
+
+ if (widget == self->priv->selected_page)
+ self->priv->selected_page = NULL;
+
gtk_widget_queue_resize (GTK_WIDGET (self));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]