[glide] Start adding an inspector pane



commit a0380bc4bc19a29d8ac1636087edc6266ba82a0b
Author: Robert Carr <racarr Valentine localdomain>
Date:   Sat May 1 19:11:00 2010 -0400

    Start adding an inspector pane

 data/ui/glide-window.ui              |   33 +++++++
 src/Makefile.am                      |    6 +-
 src/glide-inspector-animation-priv.h |   34 +++++++
 src/glide-inspector-animation.c      |  123 ++++++++++++++++++++++++++
 src/glide-inspector-animation.h      |   61 +++++++++++++
 src/glide-inspector-notebook-priv.h  |   38 ++++++++
 src/glide-inspector-notebook.c       |  157 ++++++++++++++++++++++++++++++++++
 src/glide-inspector-notebook.h       |   61 +++++++++++++
 src/glide-window-private.h           |    1 +
 src/glide-window.c                   |   21 +++++
 10 files changed, 534 insertions(+), 1 deletions(-)
---
diff --git a/data/ui/glide-window.ui b/data/ui/glide-window.ui
index 3f867ce..52c3ec6 100644
--- a/data/ui/glide-window.ui
+++ b/data/ui/glide-window.ui
@@ -360,6 +360,28 @@
               </packing>
             </child>
             <child>
+              <object class="GtkToolButton" id="inspector-button">
+                <property name="visible">True</property>
+                <property name="related_action">inspector-action</property>
+                <property name="use_action_appearance">True</property>
+                <property name="label" translatable="yes">Inspector</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="homogeneous">True</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkSeparatorToolItem" id="separatorafteri">
+                <property name="visible">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="homogeneous">True</property>
+              </packing>
+            </child>
+            <child>
               <object class="GtkToolItem" id="color-chooser-toolitem">
                 <property name="visible">True</property>
                 <child>
@@ -540,6 +562,9 @@
                 <property name="position">1</property>
               </packing>
             </child>
+            <child>
+              <placeholder/>
+            </child>
           </object>
           <packing>
             <property name="position">2</property>
@@ -891,4 +916,12 @@
     <property name="sensitive">False</property>
     <signal name="activate" handler="glide_window_export_png_action_activate"/>
   </object>
+  <object class="GtkAction" id="inspector-action">
+    <property name="label">Inspector</property>
+    <property name="short_label">Show Inspector</property>
+    <property name="tooltip">Show the inspector pane</property>
+    <property name="stock_id">gtk-info</property>
+    <property name="sensitive">False</property>
+    <signal name="activate" handler="glide_window_inspector_action_activate"/>
+  </object>
 </interface>
diff --git a/src/Makefile.am b/src/Makefile.am
index a25f134..b948bc6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -74,7 +74,11 @@ glide_SOURCES = \
 	glide-slide-button.c \
 	glide-slide-button.h \
 	glide-slide-box.c \
-	glide-slide-box.h \
+	glide-slide-box.h \ 
+	glide-inspector-notebook.c \
+	glide-inspector-notebook.h \
+	glide-inspector-animation.c \
+	glide-inspector-animation.h \
 	$(glide_VALABUILTSOURCES)
 
 
diff --git a/src/glide-inspector-animation-priv.h b/src/glide-inspector-animation-priv.h
new file mode 100644
index 0000000..977be0c
--- /dev/null
+++ b/src/glide-inspector-animation-priv.h
@@ -0,0 +1,34 @@
+/*
+ * glide-inspector-animation-priv.h
+ * Copyright (C) Robert Carr 2010 <racarr gnome org>
+ * 
+ * Glide is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * Glide is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#ifndef __GLIDE_INSPECTOR_ANIMATION_PRIVATE_H__
+#define __GLIDE_INSPECTOR_ANIMATION_PRIVATE_H__
+
+#include "glide-inspector-animation.h"
+
+G_BEGIN_DECLS
+
+struct _GlideInspectorAnimationPrivate
+{
+  GlideActor *actor;
+};
+
+G_END_DECLS
+
+#endif
diff --git a/src/glide-inspector-animation.c b/src/glide-inspector-animation.c
new file mode 100644
index 0000000..ceb44d6
--- /dev/null
+++ b/src/glide-inspector-animation.c
@@ -0,0 +1,123 @@
+/*
+ * glide-inspector-animation.c
+ * Copyright (C) Robert Carr 2010 <racarr gnome org>
+ * 
+ * Glide is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * Glide is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "glide-inspector-animation.h"
+#include "glide-inspector-animation-priv.h"
+
+#define GLIDE_INSPECTOR_ANIMATION_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), GLIDE_TYPE_INSPECTOR_ANIMATION, GlideInspectorAnimationPrivate))
+
+G_DEFINE_TYPE(GlideInspectorAnimation, glide_inspector_animation, GTK_TYPE_VBOX);
+
+enum {
+  PROP_0,
+  PROP_ACTOR
+};
+
+static void
+glide_inspector_animation_finalize (GObject *object)
+{
+  
+}
+
+static void
+glide_inspector_animation_get_property (GObject *object,
+			      guint prop_id,
+			      GValue *value,
+			      GParamSpec *pspec)
+{
+  GlideInspectorAnimation *inspector = GLIDE_INSPECTOR_ANIMATION (object);
+  
+  switch (prop_id)
+    {
+    case PROP_ACTOR:
+      g_value_set_object (value, inspector->priv->actor);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+    }
+}
+
+static void
+glide_inspector_animation_set_property (GObject *object,
+			      guint prop_id,
+			      const GValue *value,
+			      GParamSpec *pspec)
+{
+  GlideInspectorAnimation *inspector = GLIDE_INSPECTOR_ANIMATION (object);
+  
+  switch (prop_id)
+    {
+    case PROP_ACTOR:
+      glide_inspector_animation_set_actor (inspector, g_value_get_object (value));
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+    }
+}
+
+static void
+glide_inspector_animation_init (GlideInspectorAnimation *inspector)
+{
+  inspector->priv = GLIDE_INSPECTOR_ANIMATION_GET_PRIVATE (inspector);
+
+  gtk_widget_set_size_request (GTK_WIDGET (inspector), 200, 20);
+}
+
+static void
+glide_inspector_animation_class_init (GlideInspectorAnimationClass *klass)
+{
+  GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+  object_class->finalize = glide_inspector_animation_finalize;
+  object_class->get_property = glide_inspector_animation_get_property;
+  object_class->set_property = glide_inspector_animation_set_property;
+  
+  g_object_class_install_property (object_class,
+				   PROP_ACTOR,
+				   g_param_spec_object ("actor",
+							"Actor",
+							"The actor we are inspecting",
+							GLIDE_TYPE_ACTOR,
+							G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_type_class_add_private (object_class, sizeof(GlideInspectorAnimationPrivate));
+}
+
+GtkWidget *
+glide_inspector_animation_new ()
+{
+  return (GtkWidget *)g_object_new (GLIDE_TYPE_INSPECTOR_ANIMATION, NULL);
+}
+
+
+GlideActor *
+glide_inspector_animation_get_actor (GlideInspectorAnimation *inspector)
+{
+  return inspector->priv->actor;
+}
+
+void
+glide_inspector_animation_set_actor (GlideInspectorAnimation *inspector,
+				   GlideActor *actor)
+{
+  inspector->priv->actor = actor;
+  
+  g_object_notify (G_OBJECT (inspector), "actor");
+}
diff --git a/src/glide-inspector-animation.h b/src/glide-inspector-animation.h
new file mode 100644
index 0000000..8d578cd
--- /dev/null
+++ b/src/glide-inspector-animation.h
@@ -0,0 +1,61 @@
+/*
+ * glide-inspector-animation.h
+ * Copyright (C) Robert Carr 2010 <racarr gnome org>
+ * 
+ * Glide is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * Glide is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __GLIDE_INSPECTOR_ANIMATION_H__
+#define __GLIDE_INSPECTOR_ANIMATION_H__
+
+#include <gtk/gtk.h>
+#include "glide-actor.h"
+
+G_BEGIN_DECLS
+
+#define GLIDE_TYPE_INSPECTOR_ANIMATION              (glide_inspector_animation_get_type())
+#define GLIDE_INSPECTOR_ANIMATION(obj)              (G_TYPE_CHECK_INSTANCE_CAST((obj), GLIDE_TYPE_INSPECTOR_ANIMATION, GlideInspectorAnimation))
+#define GLIDE_INSPECTOR_ANIMATION_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST((klass), GLIDE_TYPE_INSPECTOR_ANIMATION, GlideInspectorAnimationClass))
+#define GLIDE_IS_INSPECTOR_ANIMATION(obj)           (G_TYPE_CHECK_INSTANCE_TYPE((obj), GLIDE_TYPE_INSPECTOR_ANIMATION))
+#define GLIDE_IS_INSPECTOR_ANIMATION_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GLIDE_TYPE_INSPECTOR_ANIMATION))
+#define GLIDE_INSPECTOR_ANIMATION_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS((obj), GLIDE_TYPE_INSPECTOR_ANIMATION, GlideInspectorAnimationClass))
+
+typedef struct _GlideInspectorAnimationPrivate GlideInspectorAnimationPrivate;
+
+
+typedef struct _GlideInspectorAnimation GlideInspectorAnimation;
+
+struct _GlideInspectorAnimation
+{
+  GtkVBox vbox;
+  
+  GlideInspectorAnimationPrivate *priv;
+};
+
+typedef struct _GlideInspectorAnimationClass GlideInspectorAnimationClass;
+
+struct _GlideInspectorAnimationClass
+{
+  GtkVBoxClass parent_class;
+};
+
+GType glide_inspector_animation_get_type (void) G_GNUC_CONST;
+GtkWidget *glide_inspector_animation_new (void);
+
+GlideActor *glide_inspector_animation_get_actor (GlideInspectorAnimation *inspector);
+void glide_inspector_animation_set_actor (GlideInspectorAnimation *inspector, GlideActor *actor);
+
+G_END_DECLS
+
+#endif
diff --git a/src/glide-inspector-notebook-priv.h b/src/glide-inspector-notebook-priv.h
new file mode 100644
index 0000000..145b5fc
--- /dev/null
+++ b/src/glide-inspector-notebook-priv.h
@@ -0,0 +1,38 @@
+/*
+ * glide-inspector-notebook-priv.h
+ * Copyright (C) Robert Carr 2010 <racarr gnome org>
+ * 
+ * Glide is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * Glide is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#ifndef __GLIDE_INSPECTOR_NOTEBOOK_PRIVATE_H__
+#define __GLIDE_INSPECTOR_NOTEBOOK_PRIVATE_H__
+
+#include "glide-inspector-notebook.h"
+
+G_BEGIN_DECLS
+
+struct _GlideInspectorNotebookPrivate
+{
+  GlideStageManager *manager;
+  
+  GtkWidget *inspector_animation;
+  
+  gulong selection_changed_id;
+};
+
+G_END_DECLS
+
+#endif
diff --git a/src/glide-inspector-notebook.c b/src/glide-inspector-notebook.c
new file mode 100644
index 0000000..834ebc3
--- /dev/null
+++ b/src/glide-inspector-notebook.c
@@ -0,0 +1,157 @@
+/*
+ * glide-inspector-notebook.c
+ * Copyright (C) Robert Carr 2010 <racarr gnome org>
+ * 
+ * Glide is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * Glide is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "glide-inspector-notebook.h"
+#include "glide-inspector-notebook-priv.h"
+
+#include "glide-inspector-animation.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);
+
+enum {
+  PROP_0,
+  PROP_STAGE_MANAGER
+};
+
+static void
+glide_inspector_notebook_selection_changed (GlideStageManager *manager,
+					    GObject *old_selection,
+					    gpointer user_data)
+{
+  GlideInspectorNotebook *inspector = (GlideInspectorNotebook *)user_data;
+  GtkNotebook *notebook = (GtkNotebook *)inspector;
+  GlideActor *selection = glide_stage_manager_get_selection (manager);
+  GtkWidget *page = gtk_notebook_get_nth_page (notebook, gtk_notebook_get_current_page (notebook));
+  
+  g_object_set (page, "actor", selection, NULL);
+}
+
+static void
+glide_inspector_notebook_finalize (GObject *object)
+{
+  
+}
+
+static void
+glide_inspector_notebook_get_property (GObject *object,
+			      guint prop_id,
+			      GValue *value,
+			      GParamSpec *pspec)
+{
+  GlideInspectorNotebook *inspector = GLIDE_INSPECTOR_NOTEBOOK (object);
+  
+  switch (prop_id)
+    {
+    case PROP_STAGE_MANAGER:
+      g_value_set_object (value, inspector->priv->manager);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+    }
+}
+
+static void
+glide_inspector_notebook_set_property (GObject *object,
+			      guint prop_id,
+			      const GValue *value,
+			      GParamSpec *pspec)
+{
+  GlideInspectorNotebook *inspector = GLIDE_INSPECTOR_NOTEBOOK (object);
+  
+  switch (prop_id)
+    {
+    case PROP_STAGE_MANAGER:
+      glide_inspector_notebook_set_stage_manager (inspector, g_value_get_object (value));
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+    }
+}
+
+static void
+glide_inspector_notebook_add_pages (GlideInspectorNotebook *inspector)
+{
+  GtkNotebook *notebook = GTK_NOTEBOOK (inspector);
+  GtkWidget *label = gtk_label_new ("Animation");
+
+  inspector->priv->inspector_animation= glide_inspector_animation_new ();
+  gtk_notebook_append_page (notebook, inspector->priv->inspector_animation, label);
+}
+
+static void
+glide_inspector_notebook_init (GlideInspectorNotebook *inspector)
+{
+  inspector->priv = GLIDE_INSPECTOR_NOTEBOOK_GET_PRIVATE (inspector);
+  
+  glide_inspector_notebook_add_pages (inspector);
+}
+
+static void
+glide_inspector_notebook_class_init (GlideInspectorNotebookClass *klass)
+{
+  GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+  object_class->finalize = glide_inspector_notebook_finalize;
+  object_class->get_property = glide_inspector_notebook_get_property;
+  object_class->set_property = glide_inspector_notebook_set_property;
+  
+  g_object_class_install_property (object_class,
+				   PROP_STAGE_MANAGER,
+				   g_param_spec_object ("stage-manager",
+							"Stage manager",
+							"The stage manager this inspector is responsible for",
+							GLIDE_TYPE_STAGE_MANAGER,
+							G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_type_class_add_private (object_class, sizeof(GlideInspectorNotebookPrivate));
+}
+
+GtkWidget *
+glide_inspector_notebook_new ()
+{
+  return (GtkWidget *)g_object_new (GLIDE_TYPE_INSPECTOR_NOTEBOOK, NULL);
+}
+
+
+GlideStageManager *
+glide_inspector_notebook_get_stage_manager (GlideInspectorNotebook *inspector)
+{
+  return inspector->priv->manager;
+}
+
+void
+glide_inspector_notebook_set_stage_manager (GlideInspectorNotebook *inspector,
+					    GlideStageManager *manager)
+{
+  if (inspector->priv->selection_changed_id)
+    {
+      g_signal_handler_disconnect (inspector->priv->manager,
+				   inspector->priv->selection_changed_id);
+    }
+  inspector->priv->manager = manager;
+  inspector->priv->selection_changed_id = g_signal_connect (inspector->priv->manager,
+							    "selection-changed",
+							    G_CALLBACK (glide_inspector_notebook_selection_changed),
+							    inspector);
+  
+  g_object_notify (G_OBJECT (inspector), "stage-manager");
+}
diff --git a/src/glide-inspector-notebook.h b/src/glide-inspector-notebook.h
new file mode 100644
index 0000000..e14eea9
--- /dev/null
+++ b/src/glide-inspector-notebook.h
@@ -0,0 +1,61 @@
+/*
+ * glide-inspector-notebook.h
+ * Copyright (C) Robert Carr 2010 <racarr gnome org>
+ * 
+ * Glide is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * Glide is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __GLIDE_INSPECTOR_NOTEBOOK_H__
+#define __GLIDE_INSPECTOR_NOTEBOOK_H__
+
+#include <gtk/gtk.h>
+#include "glide-stage-manager.h"
+
+G_BEGIN_DECLS
+
+#define GLIDE_TYPE_INSPECTOR_NOTEBOOK              (glide_inspector_notebook_get_type())
+#define GLIDE_INSPECTOR_NOTEBOOK(obj)              (G_TYPE_CHECK_INSTANCE_CAST((obj), GLIDE_TYPE_INSPECTOR_NOTEBOOK, GlideInspectorNotebook))
+#define GLIDE_INSPECTOR_NOTEBOOK_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST((klass), GLIDE_TYPE_INSPECTOR_NOTEBOOK, GlideInspectorNotebookClass))
+#define GLIDE_IS_INSPECTOR_NOTEBOOK(obj)           (G_TYPE_CHECK_INSTANCE_TYPE((obj), GLIDE_TYPE_INSPECTOR_NOTEBOOK))
+#define GLIDE_IS_INSPECTOR_NOTEBOOK_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GLIDE_TYPE_INSPECTOR_NOTEBOOK))
+#define GLIDE_INSPECTOR_NOTEBOOK_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS((obj), GLIDE_TYPE_INSPECTOR_NOTEBOOK, GlideInspectorNotebookClass))
+
+typedef struct _GlideInspectorNotebookPrivate GlideInspectorNotebookPrivate;
+
+
+typedef struct _GlideInspectorNotebook GlideInspectorNotebook;
+
+struct _GlideInspectorNotebook
+{
+  GtkNotebook notebook;
+  
+  GlideInspectorNotebookPrivate *priv;
+};
+
+typedef struct _GlideInspectorNotebookClass GlideInspectorNotebookClass;
+
+struct _GlideInspectorNotebookClass
+{
+  GtkNotebookClass parent_class;
+};
+
+GType glide_inspector_notebook_get_type (void) G_GNUC_CONST;
+GtkWidget *glide_inspector_notebook_new (void);
+
+GlideStageManager *glide_inspector_notebook_get_stage_manager (GlideInspectorNotebook *inspector);
+void glide_inspector_notebook_set_stage_manager (GlideInspectorNotebook *inspector, GlideStageManager *manager);
+
+G_END_DECLS
+
+#endif
diff --git a/src/glide-window-private.h b/src/glide-window-private.h
index d8c9984..179e36a 100644
--- a/src/glide-window-private.h
+++ b/src/glide-window-private.h
@@ -46,6 +46,7 @@ struct _GlideWindowPrivate
   GlideUndoManager *undo_manager;
   
   GtkWidget *slide_box;
+  GtkWidget *inspector_notebook;
 };
 
 G_END_DECLS
diff --git a/src/glide-window.c b/src/glide-window.c
index b13ec89..83b684c 100644
--- a/src/glide-window.c
+++ b/src/glide-window.c
@@ -45,6 +45,8 @@
 
 #include "glide-slide-box.h"
 
+#include "glide-inspector-notebook.h"
+
 #define GLIDE_WINDOW_UI_OBJECT(w, obj) (gtk_builder_get_object (w->priv->builder, obj))
 
 
@@ -141,6 +143,7 @@ glide_window_enable_document_actions (GlideWindow *w)
   glide_window_enable_action (w, "save-action");
   glide_window_enable_action (w, "pdf-export-action");
   glide_window_enable_action (w, "png-export-action");
+  glide_window_enable_action (w, "inspector-action");
   
   glide_window_enable_widget (w, "animation-combobox");
   glide_window_enable_widget (w, "text-color-button");
@@ -496,6 +499,8 @@ glide_window_set_document (GlideWindow *w, GlideDocument *d)
   
   glide_slide_box_set_stage_manager (GLIDE_SLIDE_BOX (w->priv->slide_box),
 				     w->priv->manager);
+  glide_inspector_notebook_set_stage_manager (GLIDE_INSPECTOR_NOTEBOOK (w->priv->inspector_notebook),
+					      w->priv->manager);
 
   w->priv->undo_manager = glide_undo_manager_new ();
   glide_stage_manager_set_undo_manager (w->priv->manager, w->priv->undo_manager);
@@ -920,6 +925,18 @@ glide_window_about_action_activate (GtkAction *a,
   gtk_widget_show (GTK_WIDGET (GLIDE_WINDOW_UI_OBJECT (w, "about-dialog")));
 }
 
+void
+glide_window_inspector_action_activate (GtkAction *a,
+					gpointer user_data)
+{
+  GlideWindow *w = (GlideWindow *)user_data;
+  
+  if (GTK_WIDGET_VISIBLE (w->priv->inspector_notebook))
+    gtk_widget_hide (w->priv->inspector_notebook);
+  else
+    gtk_widget_show (w->priv->inspector_notebook);
+}
+
 
 void
 glide_window_delete_action_activate (GtkAction *a,
@@ -1515,6 +1532,10 @@ glide_window_load_ui (GlideWindow *w)
   w->priv->slide_box = glide_slide_box_new ();
   gtk_container_add (GTK_CONTAINER (GLIDE_WINDOW_UI_OBJECT (w, "slide-pane-viewport")), w->priv->slide_box);
   gtk_widget_show (w->priv->slide_box);
+  
+  w->priv->inspector_notebook = glide_inspector_notebook_new ();
+  gtk_container_add (GTK_CONTAINER (GLIDE_WINDOW_UI_OBJECT (w, "middle-hbox")), w->priv->inspector_notebook);
+  gtk_widget_show (w->priv->inspector_notebook);
 }
 
 void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]