aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/menus/gal-view.c
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/menus/gal-view.c')
-rw-r--r--widgets/menus/gal-view.c56
1 files changed, 54 insertions, 2 deletions
diff --git a/widgets/menus/gal-view.c b/widgets/menus/gal-view.c
index 484e1d5116..f48a6f0026 100644
--- a/widgets/menus/gal-view.c
+++ b/widgets/menus/gal-view.c
@@ -8,6 +8,7 @@
* (C) 2000 Helix Code, Inc.
*/
#include <config.h>
+#include <gtk/gtksignal.h>
#include "gal-view.h"
#define GV_CLASS(e) ((GalViewClass *)((GtkObject *)e)->klass)
@@ -21,6 +22,13 @@ d(static gint depth = 0);
static GtkObjectClass *gal_view_parent_class;
+enum {
+ CHANGED,
+ LAST_SIGNAL
+};
+
+static guint gal_view_signals [LAST_SIGNAL] = { 0, };
+
/**
* gal_view_edit
* @view: The view to edit
@@ -102,6 +110,24 @@ gal_view_set_title (GalView *view,
}
/**
+ * gal_view_get_type_code
+ * @view: The view to get.
+ *
+ * Returns: The type of the view.
+ */
+const char *
+gal_view_get_type_code (GalView *view)
+{
+ g_return_val_if_fail (view != NULL, NULL);
+ g_return_val_if_fail (GAL_IS_VIEW (view), NULL);
+
+ if (GV_CLASS (view)->get_type_code)
+ return GV_CLASS (view)->get_type_code (view);
+ else
+ return NULL;
+}
+
+/**
* gal_view_clone
* @view: The view to clone.
*
@@ -119,6 +145,20 @@ gal_view_clone (GalView *view)
return NULL;
}
+/**
+ * gal_view_changed
+ * @view: The view that changed.
+ */
+void
+gal_view_changed (GalView *view)
+{
+ g_return_if_fail (view != NULL);
+ g_return_if_fail (GAL_IS_VIEW (view));
+
+ gtk_signal_emit(GTK_OBJECT(view),
+ gal_view_signals [CHANGED]);
+}
+
static void
gal_view_class_init (GtkObjectClass *object_class)
{
@@ -126,10 +166,22 @@ gal_view_class_init (GtkObjectClass *object_class)
gal_view_parent_class = gtk_type_class (PARENT_TYPE);
klass->edit = NULL;
- klass->load = NULL;
- klass->save = NULL;
+ klass->load = NULL;
+ klass->save = NULL;
klass->get_title = NULL;
klass->clone = NULL;
+
+ klass->changed = NULL;
+
+ gal_view_signals [CHANGED] =
+ gtk_signal_new ("changed",
+ GTK_RUN_LAST,
+ object_class->type,
+ GTK_SIGNAL_OFFSET (GalViewClass, changed),
+ gtk_marshal_NONE__NONE,
+ GTK_TYPE_NONE, 0);
+
+ gtk_object_class_add_signals (object_class, gal_view_signals, LAST_SIGNAL);
}
GtkType