[glide] Set inspector page based on current selection
- From: Robert Carr <racarr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glide] Set inspector page based on current selection
- Date: Sun, 2 May 2010 08:11:36 +0000 (UTC)
commit b528e39f212e48e0ab72501e840b9d01341d4bed
Author: Robert Carr <racarr Valentine localdomain>
Date: Sun May 2 02:22:07 2010 -0400
Set inspector page based on current selection
src/glide-inspector-notebook.c | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
---
diff --git a/src/glide-inspector-notebook.c b/src/glide-inspector-notebook.c
index fb98e59..0f5dfe3 100644
--- a/src/glide-inspector-notebook.c
+++ b/src/glide-inspector-notebook.c
@@ -25,6 +25,10 @@
#include "glide-inspector-image.h"
#include "glide-inspector-text.h"
+#include "glide-text.h"
+#include "glide-image.h"
+#include "glide-slide.h"
+
#define GLIDE_INSPECTOR_NOTEBOOK_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), GLIDE_TYPE_INSPECTOR_NOTEBOOK, GlideInspectorNotebookPrivate))
G_DEFINE_TYPE(GlideInspectorNotebook, glide_inspector_notebook, GTK_TYPE_NOTEBOOK);
@@ -34,6 +38,14 @@ enum {
PROP_STAGE_MANAGER
};
+enum {
+ PAGE_ANIMATIONS,
+ PAGE_GENERAL,
+ PAGE_SLIDE,
+ PAGE_TEXT,
+ PAGE_IMAGE
+};
+
static void
glide_inspector_notebook_selection_changed (GlideStageManager *manager,
GObject *old_selection,
@@ -49,6 +61,19 @@ glide_inspector_notebook_selection_changed (GlideStageManager *manager,
GtkWidget *page = gtk_notebook_get_nth_page (notebook, i);
g_object_set (page, "actor", selection, NULL);
}
+
+ if (GLIDE_IS_SLIDE (selection))
+ {
+ gtk_notebook_set_current_page (notebook, PAGE_SLIDE);
+ }
+ else if (GLIDE_IS_TEXT (selection))
+ {
+ gtk_notebook_set_current_page (notebook, PAGE_TEXT);
+ }
+ else if (GLIDE_IS_IMAGE (selection))
+ {
+ gtk_notebook_set_current_page (notebook, PAGE_IMAGE);
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]