aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/menus/gal-view.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-11-12 05:45:24 +0800
committerChris Lahey <clahey@src.gnome.org>2000-11-12 05:45:24 +0800
commit2d64058a8f7c03d1035504eaacc219730b5cd3c6 (patch)
treec8a0537fe8db3b3685413e0ab2914b20ee7f8e9f /widgets/menus/gal-view.c
parent618515cd0beaed45af59994d84592b5d513bd979 (diff)
downloadgsoc2013-evolution-2d64058a8f7c03d1035504eaacc219730b5cd3c6.tar.gz
gsoc2013-evolution-2d64058a8f7c03d1035504eaacc219730b5cd3c6.tar.zst
gsoc2013-evolution-2d64058a8f7c03d1035504eaacc219730b5cd3c6.zip
Added a bunch of .lo s from the menus directory.
2000-11-11 Christopher James Lahey <clahey@helixcode.com> * gal/Makefile.am: Added a bunch of .lo s from the menus directory. From gal/menus: 2000-11-11 Christopher James Lahey <clahey@helixcode.com> * Makefile.am: Added gal-define-views-model.c, gal-define-views-model.h, gal-view-new-dialog.c, gal-view-new-dialog.h, gal-view-new-dialog.glade, gal-view-new-dialog.glade.h, gal-view.c, and gal-view.h. * gal-define-views-dialog.c, gal-define-views-dialog.h: Connect up the New button. Use an ETable. * gal-define-views.glade, gal-define-views.glade.h: Put in custom object for the ETable * gal-define-views-model.c, gal-define-views-model.h: New model for list of views. * gal-view-menus.c: Close the define views dialog when it's done. * gal-view-new-dialog.c, gal-view-new-dialog.glade, gal-view-new-dialog.glade.h, gal-view-new-dialog.h: New class for creating a new view. * gal-view.c, gal-view.h: New class for representing a single view in the define views model. svn path=/trunk/; revision=6544
Diffstat (limited to 'widgets/menus/gal-view.c')
-rw-r--r--widgets/menus/gal-view.c97
1 files changed, 97 insertions, 0 deletions
diff --git a/widgets/menus/gal-view.c b/widgets/menus/gal-view.c
new file mode 100644
index 0000000000..19c9d50f85
--- /dev/null
+++ b/widgets/menus/gal-view.c
@@ -0,0 +1,97 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * gal-view-menus.c: Savable state of a table.
+ *
+ * Author:
+ * Chris Lahey <clahey@helixcode.com>
+ *
+ * (C) 2000 Helix Code, Inc.
+ */
+#include <config.h>
+#include <stdlib.h>
+#include <gtk/gtksignal.h>
+#include "gal-view.h"
+#include <gal/util/e-util.h>
+
+static void gal_view_set_arg (GtkObject *o, GtkArg *arg, guint arg_id);
+static void gal_view_get_arg (GtkObject *object, GtkArg *arg, guint arg_id);
+
+#define PARENT_TYPE (gtk_object_get_type())
+
+static GtkObjectClass *gv_parent_class;
+
+enum {
+ ARG_0,
+ ARG_NAME,
+};
+
+static void
+gv_destroy (GtkObject *object)
+{
+ GalView *gv = GAL_VIEW (object);
+
+ g_free(gv->name);
+
+ GTK_OBJECT_CLASS (gv_parent_class)->destroy (object);
+}
+
+static void
+gal_view_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
+{
+ GalView *view;
+
+ view = GAL_VIEW (o);
+
+ switch (arg_id){
+ case ARG_NAME:
+ g_free(view->name);
+ view->name = g_strdup(GTK_VALUE_STRING (*arg));
+ break;
+ }
+}
+
+static void
+gal_view_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
+{
+ GalView *view;
+
+ view = GAL_VIEW (object);
+
+ switch (arg_id) {
+ case ARG_NAME:
+ GTK_VALUE_STRING (*arg) = g_strdup(view->name);
+ break;
+ default:
+ arg->type = GTK_TYPE_INVALID;
+ break;
+ }
+}
+
+static void
+gv_init (GalView *view)
+{
+ view->name = NULL;
+}
+
+static void
+gv_class_init (GtkObjectClass *klass)
+{
+ gv_parent_class = gtk_type_class (PARENT_TYPE);
+
+ klass->destroy = gv_destroy;
+ klass->set_arg = gal_view_set_arg;
+ klass->get_arg = gal_view_get_arg;
+
+ gtk_object_add_arg_type ("GalView::name", GTK_TYPE_STRING,
+ GTK_ARG_READWRITE, ARG_NAME);
+}
+
+E_MAKE_TYPE(gal_view, "GalView", GalView, gv_class_init, gv_init, PARENT_TYPE);
+
+GalView *
+gal_view_new (void)
+{
+ GalView *gv = gtk_type_new (GAL_VIEW_TYPE);
+
+ return (GalView *) gv;
+}