aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2002-11-14 07:34:40 +0800
committerChris Toshok <toshok@src.gnome.org>2002-11-14 07:34:40 +0800
commit6c2f176cb6c541672e8af5f4d32e34951b866c6c (patch)
tree636453ad9d9d7956c869e61f6c1cdcc4e1b5915d
parent25b9eca3d8e27378912e85fd4060b0f8c1bbbe69 (diff)
downloadgsoc2013-evolution-6c2f176cb6c541672e8af5f4d32e34951b866c6c.tar
gsoc2013-evolution-6c2f176cb6c541672e8af5f4d32e34951b866c6c.tar.gz
gsoc2013-evolution-6c2f176cb6c541672e8af5f4d32e34951b866c6c.tar.bz2
gsoc2013-evolution-6c2f176cb6c541672e8af5f4d32e34951b866c6c.tar.lz
gsoc2013-evolution-6c2f176cb6c541672e8af5f4d32e34951b866c6c.tar.xz
gsoc2013-evolution-6c2f176cb6c541672e8af5f4d32e34951b866c6c.tar.zst
gsoc2013-evolution-6c2f176cb6c541672e8af5f4d32e34951b866c6c.zip
more porting work.
2002-11-13 Chris Toshok <toshok@ximian.com> * gal-define-views-dialog.[ch]: more porting work. * gal-define-views-model.[ch]: same. * gal-view-etable.c: same. * gal-view-factory-etable.c: same. * gal-view-instance-save-as-dialog.[ch]: same. * gal-view-instance.c: same. * gal-view-new-dialog.[ch]: same. * gal-define-views.glade: convert to glade2. * gal-view-instance-save-as-dialog.glade: same. * gal-view-new-dialog.glade: same. svn path=/trunk/; revision=18749
-rw-r--r--widgets/menus/gal-define-views-dialog.c165
-rw-r--r--widgets/menus/gal-define-views-dialog.h18
-rw-r--r--widgets/menus/gal-define-views-model.c115
-rw-r--r--widgets/menus/gal-define-views-model.h10
-rw-r--r--widgets/menus/gal-define-views.glade556
-rw-r--r--widgets/menus/gal-view-etable.c2
-rw-r--r--widgets/menus/gal-view-factory-etable.c2
-rw-r--r--widgets/menus/gal-view-instance-save-as-dialog.c126
-rw-r--r--widgets/menus/gal-view-instance-save-as-dialog.glade508
-rw-r--r--widgets/menus/gal-view-instance-save-as-dialog.h16
-rw-r--r--widgets/menus/gal-view-instance.c9
-rw-r--r--widgets/menus/gal-view-new-dialog.c134
-rw-r--r--widgets/menus/gal-view-new-dialog.glade391
-rw-r--r--widgets/menus/gal-view-new-dialog.h17
14 files changed, 971 insertions, 1098 deletions
diff --git a/widgets/menus/gal-define-views-dialog.c b/widgets/menus/gal-define-views-dialog.c
index 5eb08aac4b..5a996726fc 100644
--- a/widgets/menus/gal-define-views-dialog.c
+++ b/widgets/menus/gal-define-views-dialog.c
@@ -25,27 +25,26 @@
#include "gal-define-views-dialog.h"
-#include <libgnomeui/gnome-dialog.h>
-#include <gtk/gtksignal.h>
#include <gtk/gtk.h>
#include "gal-define-views-model.h"
#include "gal-view-new-dialog.h"
#include <gal/e-table/e-table-scrolled.h>
#include <gal/util/e-i18n.h>
+#include <gal/util/e-util.h>
-static void gal_define_views_dialog_init (GalDefineViewsDialog *card);
-static void gal_define_views_dialog_class_init (GalDefineViewsDialogClass *klass);
-static void gal_define_views_dialog_set_arg (GtkObject *o, GtkArg *arg, guint arg_id);
-static void gal_define_views_dialog_get_arg (GtkObject *object, GtkArg *arg, guint arg_id);
-static void gal_define_views_dialog_destroy (GtkObject *object);
+static void gal_define_views_dialog_init (GalDefineViewsDialog *card);
+static void gal_define_views_dialog_class_init (GalDefineViewsDialogClass *klass);
+static void gal_define_views_dialog_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
+static void gal_define_views_dialog_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
+static void gal_define_views_dialog_dispose (GObject *object);
-static GnomeDialogClass *parent_class = NULL;
-#define PARENT_TYPE gnome_dialog_get_type()
+static GtkDialogClass *parent_class = NULL;
+#define PARENT_TYPE GTK_TYPE_DIALOG
-/* The arguments we take */
+/* The properties we support */
enum {
- ARG_0,
- ARG_COLLECTION
+ PROP_0,
+ PROP_COLLECTION
};
typedef struct {
@@ -54,45 +53,28 @@ typedef struct {
GalDefineViewsDialog *names;
} GalDefineViewsDialogChild;
-GtkType
-gal_define_views_dialog_get_type (void)
-{
- static GtkType type = 0;
-
- if (!type) {
- static const GtkTypeInfo info =
- {
- "GalDefineViewsDialog",
- sizeof (GalDefineViewsDialog),
- sizeof (GalDefineViewsDialogClass),
- (GtkClassInitFunc) gal_define_views_dialog_class_init,
- (GtkObjectInitFunc) gal_define_views_dialog_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- type = gtk_type_unique (PARENT_TYPE, &info);
- }
- return type;
-}
+E_MAKE_TYPE(gal_define_views_dialog, "GalDefineViewsDialog", GalDefineViewsDialog, gal_define_views_dialog_class_init, gal_define_views_dialog_init, PARENT_TYPE)
static void
gal_define_views_dialog_class_init (GalDefineViewsDialogClass *klass)
{
- GtkObjectClass *object_class;
+ GObjectClass *object_class;
- object_class = (GtkObjectClass*) klass;
+ object_class = (GObjectClass*) klass;
- parent_class = gtk_type_class (PARENT_TYPE);
+ parent_class = g_type_class_ref (PARENT_TYPE);
- object_class->set_arg = gal_define_views_dialog_set_arg;
- object_class->get_arg = gal_define_views_dialog_get_arg;
- object_class->destroy = gal_define_views_dialog_destroy;
+ object_class->set_property = gal_define_views_dialog_set_property;
+ object_class->get_property = gal_define_views_dialog_get_property;
+ object_class->dispose = gal_define_views_dialog_dispose;
- gtk_object_add_arg_type("GalDefineViewsDialog::collection", GAL_VIEW_COLLECTION_TYPE,
- GTK_ARG_READWRITE, ARG_COLLECTION);
+ g_object_class_install_property (object_class, PROP_COLLECTION,
+ g_param_spec_object ("collection",
+ _("Collection"),
+ /*_( */"XXX blurb" /*)*/,
+ GAL_VIEW_COLLECTION_TYPE,
+ G_PARAM_READWRITE));
}
/* ETable creation */
@@ -111,43 +93,43 @@ gal_define_views_dialog_create_etable(char *name, char *string1, char *string2,
ETableModel *model;
model = gal_define_views_model_new();
table = e_table_scrolled_new(model, NULL, SPEC, NULL);
- gtk_object_set_data(GTK_OBJECT(table), "GalDefineViewsDialog::model", model);
+ g_object_set_data(G_OBJECT (table), "GalDefineViewsDialog::model", model);
return table;
}
/* Button callbacks */
static void
-gdvd_button_new_dialog_callback(GtkWidget *widget, int button, GalDefineViewsDialog *dialog)
+gdvd_button_new_dialog_callback(GtkWidget *widget, int id, GalDefineViewsDialog *dialog)
{
gchar *name;
GalView *view;
GalViewFactory *factory;
- switch (button) {
- case 0:
- gtk_object_get(GTK_OBJECT(widget),
- "name", &name,
- "factory", &factory,
- NULL);
+ switch (id) {
+ case GTK_RESPONSE_OK:
+ g_object_get(widget,
+ "name", &name,
+ "factory", &factory,
+ NULL);
if (name && factory) {
view = gal_view_factory_new_view(factory,
name);
gal_define_views_model_append(GAL_DEFINE_VIEWS_MODEL(dialog->model), view);
gal_view_edit(view);
- gtk_object_unref(GTK_OBJECT(view));
+ g_object_unref(view);
}
break;
}
- gnome_dialog_close(GNOME_DIALOG(widget));
+ gtk_widget_destroy (widget);
}
static void
gdvd_button_new_callback(GtkWidget *widget, GalDefineViewsDialog *dialog)
{
GtkWidget *view_new_dialog = gal_view_new_dialog_new(dialog->collection);
- gtk_signal_connect(GTK_OBJECT(view_new_dialog), "clicked",
- GTK_SIGNAL_FUNC(gdvd_button_new_dialog_callback), dialog);
- gtk_widget_show(GTK_WIDGET(view_new_dialog));
+ g_signal_connect(view_new_dialog, "response",
+ G_CALLBACK(gdvd_button_new_dialog_callback), dialog);
+ gtk_widget_show(view_new_dialog);
}
static void
@@ -207,14 +189,14 @@ gdvd_button_copy_callback(GtkWidget *widget, GalDefineViewsDialog *dialog)
}
static void
-gdvd_connect_signal(GalDefineViewsDialog *dialog, char *widget_name, char *signal, GtkSignalFunc handler)
+gdvd_connect_signal(GalDefineViewsDialog *dialog, char *widget_name, char *signal, GCallback handler)
{
GtkWidget *widget;
widget = glade_xml_get_widget(dialog->gui, widget_name);
if (widget)
- gtk_signal_connect(GTK_OBJECT(widget), signal, handler, dialog);
+ g_signal_connect(widget, signal, handler, dialog);
}
static void
@@ -235,42 +217,42 @@ gal_define_views_dialog_init (GalDefineViewsDialog *dialog)
}
gtk_widget_ref(widget);
gtk_widget_unparent(widget);
- gtk_box_pack_start(GTK_BOX(GNOME_DIALOG(dialog)->vbox), widget, TRUE, TRUE, 0);
+ gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), widget, TRUE, TRUE, 0);
gtk_widget_unref(widget);
- gnome_dialog_append_buttons(GNOME_DIALOG(dialog),
- GTK_STOCK_OK,
- GTK_STOCK_CANCEL,
- NULL);
+ gtk_dialog_add_buttons (GTK_DIALOG (dialog),
+ GTK_STOCK_OK, GTK_RESPONSE_OK,
+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ NULL);
- gdvd_connect_signal(dialog, "button-new", "clicked", GTK_SIGNAL_FUNC(gdvd_button_new_callback));
- gdvd_connect_signal(dialog, "button-modify", "clicked", GTK_SIGNAL_FUNC(gdvd_button_modify_callback));
- gdvd_connect_signal(dialog, "button-delete", "clicked", GTK_SIGNAL_FUNC(gdvd_button_delete_callback));
- gdvd_connect_signal(dialog, "button-copy", "clicked", GTK_SIGNAL_FUNC(gdvd_button_copy_callback));
+ gdvd_connect_signal(dialog, "button-new", "clicked", G_CALLBACK(gdvd_button_new_callback));
+ gdvd_connect_signal(dialog, "button-modify", "clicked", G_CALLBACK(gdvd_button_modify_callback));
+ gdvd_connect_signal(dialog, "button-delete", "clicked", G_CALLBACK(gdvd_button_delete_callback));
+ gdvd_connect_signal(dialog, "button-copy", "clicked", G_CALLBACK(gdvd_button_copy_callback));
dialog->model = NULL;
etable = glade_xml_get_widget(dialog->gui, "custom-table");
if (etable) {
- dialog->model = gtk_object_get_data(GTK_OBJECT(etable), "GalDefineViewsDialog::model");
- gtk_object_set(GTK_OBJECT(dialog->model),
- "collection", dialog->collection,
- NULL);
+ dialog->model = g_object_get_data(G_OBJECT (etable), "GalDefineViewsDialog::model");
+ g_object_set(dialog->model,
+ "collection", dialog->collection,
+ NULL);
}
gtk_window_set_policy(GTK_WINDOW(dialog), FALSE, TRUE, FALSE);
}
static void
-gal_define_views_dialog_destroy (GtkObject *object)
+gal_define_views_dialog_dispose (GObject *object)
{
GalDefineViewsDialog *gal_define_views_dialog = GAL_DEFINE_VIEWS_DIALOG(object);
if (gal_define_views_dialog->gui)
- gtk_object_unref(GTK_OBJECT(gal_define_views_dialog->gui));
+ g_object_unref(gal_define_views_dialog->gui);
gal_define_views_dialog->gui = NULL;
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
+ if (G_OBJECT_CLASS (parent_class)->dispose)
+ (* G_OBJECT_CLASS (parent_class)->dispose) (object);
}
static void
@@ -279,9 +261,9 @@ gal_define_views_dialog_set_collection(GalDefineViewsDialog *dialog,
{
dialog->collection = collection;
if (dialog->model) {
- gtk_object_set(GTK_OBJECT(dialog->model),
- "collection", collection,
- NULL);
+ g_object_set(dialog->model,
+ "collection", collection,
+ NULL);
}
if (dialog->gui) {
GtkWidget *widget = glade_xml_get_widget(dialog->gui, "label-views");
@@ -310,48 +292,45 @@ gal_define_views_dialog_set_collection(GalDefineViewsDialog *dialog,
GtkWidget*
gal_define_views_dialog_new (GalViewCollection *collection)
{
- GtkWidget *widget = GTK_WIDGET (gtk_type_new (gal_define_views_dialog_get_type ()));
+ GtkWidget *widget = g_object_new (GAL_DEFINE_VIEWS_DIALOG_TYPE, NULL);
gal_define_views_dialog_set_collection(GAL_DEFINE_VIEWS_DIALOG (widget), collection);
return widget;
}
static void
-gal_define_views_dialog_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
+gal_define_views_dialog_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
{
GalDefineViewsDialog *dialog;
- dialog = GAL_DEFINE_VIEWS_DIALOG (o);
+ dialog = GAL_DEFINE_VIEWS_DIALOG (object);
- switch (arg_id){
- case ARG_COLLECTION:
- if (GTK_VALUE_OBJECT(*arg))
- gal_define_views_dialog_set_collection(dialog, GAL_VIEW_COLLECTION(GTK_VALUE_OBJECT(*arg)));
+ switch (prop_id){
+ case PROP_COLLECTION:
+ if (g_value_get_object (value))
+ gal_define_views_dialog_set_collection(dialog, GAL_VIEW_COLLECTION(g_value_get_object (value)));
else
gal_define_views_dialog_set_collection(dialog, NULL);
break;
default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
return;
}
}
static void
-gal_define_views_dialog_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
+gal_define_views_dialog_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
{
GalDefineViewsDialog *dialog;
dialog = GAL_DEFINE_VIEWS_DIALOG (object);
- switch (arg_id) {
- case ARG_COLLECTION:
- if (dialog->collection)
- GTK_VALUE_OBJECT(*arg) = GTK_OBJECT(dialog->collection);
- else
- GTK_VALUE_OBJECT(*arg) = NULL;
- break;
+ switch (prop_id) {
+ case PROP_COLLECTION:
+ g_value_set_object (value, dialog->collection);
default:
- arg->type = GTK_TYPE_INVALID;
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
diff --git a/widgets/menus/gal-define-views-dialog.h b/widgets/menus/gal-define-views-dialog.h
index edd40ed7c5..03a047b9fe 100644
--- a/widgets/menus/gal-define-views-dialog.h
+++ b/widgets/menus/gal-define-views-dialog.h
@@ -24,7 +24,7 @@
#ifndef __GAL_DEFINE_VIEWS_DIALOG_H__
#define __GAL_DEFINE_VIEWS_DIALOG_H__
-#include <libgnomeui/gnome-dialog.h>
+#include <gtk/gtkdialog.h>
#include <glade/glade.h>
#include <gal/e-table/e-table-model.h>
#include <gal/menus/gal-view-collection.h>
@@ -42,18 +42,18 @@ extern "C" {
* --------------------------------------------------------------------------------
*/
-#define GAL_DEFINE_VIEWS_DIALOG_TYPE (gal_define_views_dialog_get_type ())
-#define GAL_DEFINE_VIEWS_DIALOG(obj) (GTK_CHECK_CAST ((obj), GAL_DEFINE_VIEWS_DIALOG_TYPE, GalDefineViewsDialog))
-#define GAL_DEFINE_VIEWS_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GAL_DEFINE_VIEWS_DIALOG_TYPE, GalDefineViewsDialogClass))
-#define GAL_IS_DEFINE_VIEWS_DIALOG(obj) (GTK_CHECK_TYPE ((obj), GAL_DEFINE_VIEWS_DIALOG_TYPE))
-#define GAL_IS_DEFINE_VIEWS_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), GAL_DEFINE_VIEWS_DIALOG_TYPE))
+#define GAL_DEFINE_VIEWS_DIALOG_TYPE (gal_define_views_dialog_get_type ())
+#define GAL_DEFINE_VIEWS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAL_DEFINE_VIEWS_DIALOG_TYPE, GalDefineViewsDialog))
+#define GAL_DEFINE_VIEWS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAL_DEFINE_VIEWS_DIALOG_TYPE, GalDefineViewsDialogClass))
+#define GAL_IS_DEFINE_VIEWS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAL_DEFINE_VIEWS_DIALOG_TYPE))
+#define GAL_IS_DEFINE_VIEWS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), GAL_DEFINE_VIEWS_DIALOG_TYPE))
typedef struct _GalDefineViewsDialog GalDefineViewsDialog;
typedef struct _GalDefineViewsDialogClass GalDefineViewsDialogClass;
struct _GalDefineViewsDialog
{
- GnomeDialog parent;
+ GtkDialog parent;
/* item specific fields */
GladeXML *gui;
@@ -64,11 +64,11 @@ struct _GalDefineViewsDialog
struct _GalDefineViewsDialogClass
{
- GnomeDialogClass parent_class;
+ GtkDialogClass parent_class;
};
GtkWidget *gal_define_views_dialog_new (GalViewCollection *collection);
-GtkType gal_define_views_dialog_get_type (void);
+GType gal_define_views_dialog_get_type (void);
#ifdef __cplusplus
}
diff --git a/widgets/menus/gal-define-views-model.c b/widgets/menus/gal-define-views-model.c
index eb41f3b84a..40e54a53b6 100644
--- a/widgets/menus/gal-define-views-model.c
+++ b/widgets/menus/gal-define-views-model.c
@@ -26,35 +26,36 @@
#include <libxml/parser.h>
#include <libxml/xmlmemory.h>
#include "gal-define-views-model.h"
+#include <gal/util/e-i18n.h>
+#include <gal/util/e-util.h>
-#define PARENT_TYPE e_table_model_get_type()
+#define PARENT_TYPE E_TABLE_MODEL_TYPE
static ETableModelClass *parent_class;
/*
* GalDefineViewsModel callbacks
* These are the callbacks that define the behavior of our custom model.
*/
-static void gal_define_views_model_set_arg (GtkObject *o, GtkArg *arg, guint arg_id);
-static void gal_define_views_model_get_arg (GtkObject *object, GtkArg *arg, guint arg_id);
-
+static void gal_define_views_model_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
+static void gal_define_views_model_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
enum {
- ARG_0,
- ARG_EDITABLE,
- ARG_COLLECTION
+ PROP_0,
+ PROP_EDITABLE,
+ PROP_COLLECTION
};
static void
-gdvm_destroy(GtkObject *object)
+gdvm_dispose(GObject *object)
{
GalDefineViewsModel *model = GAL_DEFINE_VIEWS_MODEL(object);
if (model->collection)
- gtk_object_unref(GTK_OBJECT(model->collection));
+ g_object_unref(model->collection);
model->collection = NULL;
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
+ if (G_OBJECT_CLASS (parent_class)->dispose)
+ (* G_OBJECT_CLASS (parent_class)->dispose) (object);
}
/* This function returns the number of columns in our ETableModel. */
@@ -162,20 +163,29 @@ gal_define_views_model_append (GalDefineViewsModel *model,
}
static void
-gal_define_views_model_class_init (GtkObjectClass *object_class)
+gal_define_views_model_class_init (GObjectClass *object_class)
{
ETableModelClass *model_class = (ETableModelClass *) object_class;
- parent_class = gtk_type_class (PARENT_TYPE);
+ parent_class = g_type_class_ref (PARENT_TYPE);
+
+ object_class->dispose = gdvm_dispose;
+ object_class->set_property = gal_define_views_model_set_property;
+ object_class->get_property = gal_define_views_model_get_property;
- object_class->destroy = gdvm_destroy;
- object_class->set_arg = gal_define_views_model_set_arg;
- object_class->get_arg = gal_define_views_model_get_arg;
+ g_object_class_install_property (object_class, PROP_EDITABLE,
+ g_param_spec_boolean ("editable",
+ _("Editable"),
+ /*_( */"XXX blurb" /*)*/,
+ FALSE,
+ G_PARAM_READWRITE));
- gtk_object_add_arg_type ("GalDefineViewsModel::editable", GTK_TYPE_BOOL,
- GTK_ARG_READWRITE, ARG_EDITABLE);
- gtk_object_add_arg_type ("GalDefineViewsModel::collection", GAL_VIEW_COLLECTION_TYPE,
- GTK_ARG_READWRITE, ARG_COLLECTION);
+ g_object_class_install_property (object_class, PROP_COLLECTION,
+ g_param_spec_object ("collection",
+ _("Collection"),
+ /*_( */"XXX blurb" /*)*/,
+ GAL_VIEW_COLLECTION_TYPE,
+ G_PARAM_READWRITE));
model_class->column_count = gdvm_col_count;
model_class->row_count = gdvm_row_count;
@@ -191,7 +201,7 @@ gal_define_views_model_class_init (GtkObjectClass *object_class)
}
static void
-gal_define_views_model_init (GtkObject *object)
+gal_define_views_model_init (GObject *object)
{
GalDefineViewsModel *model = GAL_DEFINE_VIEWS_MODEL(object);
@@ -199,75 +209,50 @@ gal_define_views_model_init (GtkObject *object)
}
static void
-gal_define_views_model_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
+gal_define_views_model_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
{
GalDefineViewsModel *model;
- model = GAL_DEFINE_VIEWS_MODEL (o);
+ model = GAL_DEFINE_VIEWS_MODEL (object);
- switch (arg_id){
- case ARG_EDITABLE:
- model->editable = GTK_VALUE_BOOL (*arg);
+ switch (prop_id){
+ case PROP_EDITABLE:
+ model->editable = g_value_get_boolean (value);
break;
- case ARG_COLLECTION:
- e_table_model_pre_change(E_TABLE_MODEL(o));
- if (GTK_VALUE_OBJECT (*arg))
- model->collection = GAL_VIEW_COLLECTION(GTK_VALUE_OBJECT (*arg));
+ case PROP_COLLECTION:
+ e_table_model_pre_change(E_TABLE_MODEL(object));
+ if (g_value_get_object (value))
+ model->collection = GAL_VIEW_COLLECTION(g_value_get_object (value));
else
model->collection = NULL;
- e_table_model_changed(E_TABLE_MODEL(o));
+ e_table_model_changed(E_TABLE_MODEL(object));
break;
}
}
static void
-gal_define_views_model_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
+gal_define_views_model_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
{
GalDefineViewsModel *model;
model = GAL_DEFINE_VIEWS_MODEL (object);
- switch (arg_id) {
- case ARG_EDITABLE:
- GTK_VALUE_BOOL (*arg) = model->editable;
+ switch (prop_id) {
+ case PROP_EDITABLE:
+ g_value_set_boolean (value, model->editable);
break;
- case ARG_COLLECTION:
- if (model->collection)
- GTK_VALUE_OBJECT (*arg) = GTK_OBJECT(model->collection);
- else
- GTK_VALUE_OBJECT (*arg) = NULL;
- break;
+ case PROP_COLLECTION:
+ g_value_set_object (value, model->collection);
default:
- arg->type = GTK_TYPE_INVALID;
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
-GtkType
-gal_define_views_model_get_type (void)
-{
- static GtkType type = 0;
-
- if (!type){
- GtkTypeInfo info = {
- "GalDefineViewsModel",
- sizeof (GalDefineViewsModel),
- sizeof (GalDefineViewsModelClass),
- (GtkClassInitFunc) gal_define_views_model_class_init,
- (GtkObjectInitFunc) gal_define_views_model_init,
- NULL, /* reserved 1 */
- NULL, /* reserved 2 */
- (GtkClassInitFunc) NULL
- };
-
- type = gtk_type_unique (PARENT_TYPE, &info);
- }
-
- return type;
-}
+E_MAKE_TYPE(gal_define_views_model, "GalDefineViewsModel", GalDefineViewsModel, gal_define_views_model_class_init, gal_define_views_model_init, PARENT_TYPE)
/**
* gal_define_views_model_new
@@ -282,7 +267,7 @@ gal_define_views_model_new (void)
{
GalDefineViewsModel *et;
- et = gtk_type_new (gal_define_views_model_get_type ());
+ et = g_object_new (GAL_DEFINE_VIEWS_MODEL_TYPE, NULL);
return E_TABLE_MODEL(et);
}
diff --git a/widgets/menus/gal-define-views-model.h b/widgets/menus/gal-define-views-model.h
index 2724216985..6ea2b28cbc 100644
--- a/widgets/menus/gal-define-views-model.h
+++ b/widgets/menus/gal-define-views-model.h
@@ -33,10 +33,10 @@ extern "C" {
#endif /* __cplusplus */
#define GAL_DEFINE_VIEWS_MODEL_TYPE (gal_define_views_model_get_type ())
-#define GAL_DEFINE_VIEWS_MODEL(o) (GTK_CHECK_CAST ((o), GAL_DEFINE_VIEWS_MODEL_TYPE, GalDefineViewsModel))
-#define GAL_DEFINE_VIEWS_MODEL_CLASS(k) (GTK_CHECK_CLASS_CAST((k), GAL_DEFINE_VIEWS_MODEL_TYPE, GalDefineViewsModelClass))
-#define GAL_IS_DEFINE_VIEWS_MODEL(o) (GTK_CHECK_TYPE ((o), GAL_DEFINE_VIEWS_MODEL_TYPE))
-#define GAL_IS_DEFINE_VIEWS_MODEL_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), GAL_DEFINE_VIEWS_MODEL_TYPE))
+#define GAL_DEFINE_VIEWS_MODEL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GAL_DEFINE_VIEWS_MODEL_TYPE, GalDefineViewsModel))
+#define GAL_DEFINE_VIEWS_MODEL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GAL_DEFINE_VIEWS_MODEL_TYPE, GalDefineViewsModelClass))
+#define GAL_IS_DEFINE_VIEWS_MODEL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GAL_DEFINE_VIEWS_MODEL_TYPE))
+#define GAL_IS_DEFINE_VIEWS_MODEL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GAL_DEFINE_VIEWS_MODEL_TYPE))
typedef struct {
ETableModel parent;
@@ -53,7 +53,7 @@ typedef struct {
} GalDefineViewsModelClass;
-GtkType gal_define_views_model_get_type (void);
+GType gal_define_views_model_get_type (void);
ETableModel *gal_define_views_model_new (void);
void gal_define_views_model_append (GalDefineViewsModel *model,
diff --git a/widgets/menus/gal-define-views.glade b/widgets/menus/gal-define-views.glade
index 72eac5764b..ce5ea5a928 100644
--- a/widgets/menus/gal-define-views.glade
+++ b/widgets/menus/gal-define-views.glade
@@ -1,311 +1,287 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd" >
-<project>
- <name>gal-define-views</name>
- <program_name>gal-define-views</program_name>
- <directory></directory>
- <source_directory>src</source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
- <language>C</language>
- <gnome_support>True</gnome_support>
- <gettext_support>True</gettext_support>
- <use_widget_names>True</use_widget_names>
- <output_main_file>False</output_main_file>
- <output_support_files>False</output_support_files>
- <output_build_files>False</output_build_files>
- <gnome_help_support>True</gnome_help_support>
-</project>
+<glade-interface>
+ <widget class="GtkDialog" id="dialog1">
+ <property name="visible">no</property>
+ <property name="title" translatable="yes">Define Views for &quot;%s&quot;</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="modal">no</property>
+ <property name="allow_shrink">no</property>
+ <property name="allow_grow">yes</property>
+ <property name="window-position">GTK_WIN_POS_NONE</property>
-<widget>
- <class>GnomeDialog</class>
- <name>dialog1</name>
- <visible>False</visible>
- <title>Define Views for &quot;%s&quot;</title>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>True</allow_grow>
- <auto_shrink>False</auto_shrink>
- <auto_close>False</auto_close>
- <hide_on_close>False</hide_on_close>
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox1">
+ <property name="homogeneous">no</property>
+ <property name="spacing">8</property>
+ <property name="visible">yes</property>
- <widget>
- <class>GtkVBox</class>
- <child_name>GnomeDialog:vbox</child_name>
- <name>dialog-vbox1</name>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
- <child>
- <padding>4</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area1">
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+ <property name="spacing">8</property>
+ <property name="visible">yes</property>
- <widget>
- <class>GtkHButtonBox</class>
- <child_name>GnomeDialog:action_area</child_name>
- <name>dialog-action_area1</name>
- <layout_style>GTK_BUTTONBOX_END</layout_style>
- <spacing>8</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>7</child_ipad_x>
- <child_ipad_y>0</child_ipad_y>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- <pack>GTK_PACK_END</pack>
- </child>
+ <child>
+ <widget class="GtkButton" id="button1">
+ <property name="can_default">yes</property>
+ <property name="can_focus">yes</property>
+ <property name="visible">yes</property>
+ <property name="label">gtk-ok</property>
+ <property name="use_stock">yes</property>
+ <property name="use_underline">yes</property>
+ </widget>
+ </child>
- <widget>
- <class>GtkButton</class>
- <name>button1</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
- </widget>
+ <child>
+ <widget class="GtkButton" id="button7">
+ <property name="can_default">yes</property>
+ <property name="can_focus">yes</property>
+ <property name="visible">yes</property>
+ <property name="label">gtk-cancel</property>
+ <property name="use_stock">yes</property>
+ <property name="use_underline">yes</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">no</property>
+ <property name="fill">yes</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
- <widget>
- <class>GtkButton</class>
- <name>button7</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
- </widget>
- </widget>
+ <child>
+ <widget class="GtkTable" id="table-top">
+ <property name="homogeneous">no</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
+ <property name="n-rows">5</property>
+ <property name="n-columns">1</property>
+ <property name="visible">yes</property>
- <widget>
- <class>GtkTable</class>
- <name>table-top</name>
- <rows>5</rows>
- <columns>1</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>6</row_spacing>
- <column_spacing>6</column_spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
+ <child>
+ <widget class="GtkFrame" id="frame1">
+ <property name="label" translatable="yes">Description</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow">GTK_SHADOW_ETCHED_IN</property>
+ <property name="visible">yes</property>
- <widget>
- <class>GtkFrame</class>
- <name>frame1</name>
- <label>Description</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkTable</class>
- <name>table-description</name>
- <border_width>6</border_width>
- <rows>1</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>6</row_spacing>
- <column_spacing>6</column_spacing>
- </widget>
- </widget>
+ <child>
+ <widget class="GtkTable" id="table-description">
+ <property name="border_width">6</property>
+ <property name="homogeneous">no</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
+ <property name="n-rows">1</property>
+ <property name="n-columns">2</property>
+ <property name="visible">yes</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_padding">0</property>
+ <property name="y_padding">0</property>
+ <property name="x_options">fill</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
- <widget>
- <class>GtkHBox</class>
- <name>hbox1</name>
- <homogeneous>False</homogeneous>
- <spacing>6</spacing>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
+ <child>
+ <widget class="GtkHBox" id="hbox1">
+ <property name="homogeneous">no</property>
+ <property name="spacing">6</property>
+ <property name="visible">yes</property>
- <widget>
- <class>Custom</class>
- <name>custom-table</name>
- <creation_function>gal_define_views_dialog_create_etable</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Fri, 10 Nov 2000 16:37:39 GMT</last_modification_time>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
+ <child>
+ <widget class="Custom" id="custom-table">
+ <property name="creation_function">gal_define_views_dialog_create_etable</property>
+ <property name="int1">0</property>
+ <property name="int2">0</property>
+ <property name="last_modification_time">Fri, 10 Nov 2000 16:37:39 GMT</property>
+ <property name="visible">yes</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">yes</property>
+ <property name="fill">yes</property>
+ </packing>
+ </child>
- <widget>
- <class>GtkVBox</class>
- <name>vbox1</name>
- <homogeneous>False</homogeneous>
- <spacing>6</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
+ <child>
+ <widget class="GtkVBox" id="vbox1">
+ <property name="homogeneous">no</property>
+ <property name="spacing">6</property>
+ <property name="visible">yes</property>
- <widget>
- <class>GtkButton</class>
- <name>button-new</name>
- <can_focus>True</can_focus>
- <label>_New...</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
+ <child>
+ <widget class="GtkButton" id="button-new">
+ <property name="can_focus">yes</property>
+ <property name="label" translatable="yes">_New...</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="visible">yes</property>
+ <property name="use_underline">yes</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">no</property>
+ <property name="fill">no</property>
+ </packing>
+ </child>
- <widget>
- <class>GtkButton</class>
- <name>button-copy</name>
- <can_focus>True</can_focus>
- <label>_Copy...</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
+ <child>
+ <widget class="GtkButton" id="button-copy">
+ <property name="can_focus">yes</property>
+ <property name="label" translatable="yes">_Copy...</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="visible">yes</property>
+ <property name="use_underline">yes</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">no</property>
+ <property name="fill">no</property>
+ </packing>
+ </child>
- <widget>
- <class>GtkButton</class>
- <name>button-modify</name>
- <can_focus>True</can_focus>
- <label>_Edit...</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
+ <child>
+ <widget class="GtkButton" id="button-modify">
+ <property name="can_focus">yes</property>
+ <property name="label" translatable="yes">_Edit...</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="visible">yes</property>
+ <property name="use_underline">yes</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">no</property>
+ <property name="fill">no</property>
+ </packing>
+ </child>
- <widget>
- <class>GtkButton</class>
- <name>button-delete</name>
- <can_focus>True</can_focus>
- <label>_Delete...</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
+ <child>
+ <widget class="GtkButton" id="button-delete">
+ <property name="can_focus">yes</property>
+ <property name="label" translatable="yes">_Delete...</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="visible">yes</property>
+ <property name="use_underline">yes</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">no</property>
+ <property name="fill">no</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">no</property>
+ <property name="fill">no</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_padding">0</property>
+ <property name="y_padding">0</property>
+ <property name="x_options">expand|fill</property>
+ <property name="y_options">expand|fill</property>
+ </packing>
+ </child>
- <widget>
- <class>GtkHButtonBox</class>
- <name>hbuttonbox1</name>
- <layout_style>GTK_BUTTONBOX_END</layout_style>
- <spacing>6</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>7</child_ipad_x>
- <child_ipad_y>0</child_ipad_y>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>4</top_attach>
- <bottom_attach>5</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
+ <child>
+ <widget class="GtkHButtonBox" id="hbuttonbox1">
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+ <property name="spacing">6</property>
+ <property name="visible">yes</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="x_padding">0</property>
+ <property name="y_padding">0</property>
+ <property name="x_options">fill</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
- <widget>
- <class>GtkAlignment</class>
- <name>alignment3</name>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xscale>0</xscale>
- <yscale>1</yscale>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment3">
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">0</property>
+ <property name="yscale">1</property>
+ <property name="visible">yes</property>
- <widget>
- <class>GtkButton</class>
- <name>button-reset</name>
- <can_focus>True</can_focus>
- <label>Re_set to Factory Defaults...</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- </widget>
- </widget>
+ <child>
+ <widget class="GtkButton" id="button-reset">
+ <property name="can_focus">yes</property>
+ <property name="label" translatable="yes">Re_set to Factory Defaults...</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="visible">yes</property>
+ <property name="use_underline">yes</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_padding">0</property>
+ <property name="y_padding">0</property>
+ <property name="x_options">fill</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
- <widget>
- <class>GtkLabel</class>
- <name>label-views</name>
- <label>Define Views for %s</label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
+ <child>
+ <widget class="GtkLabel" id="label-views">
+ <property name="label" translatable="yes">Define Views for %s</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">no</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="visible">yes</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_padding">0</property>
+ <property name="y_padding">0</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">yes</property>
+ <property name="fill">yes</property>
+ </packing>
+ </child>
</widget>
- </widget>
+ <packing>
+ <property name="padding">4</property>
+ <property name="expand">yes</property>
+ <property name="fill">yes</property>
+ </packing>
+ </child>
</widget>
-</widget>
-
-</GTK-Interface>
+</glade-interface>
diff --git a/widgets/menus/gal-view-etable.c b/widgets/menus/gal-view-etable.c
index f12f6d7d66..c69a624de5 100644
--- a/widgets/menus/gal-view-etable.c
+++ b/widgets/menus/gal-view-etable.c
@@ -25,7 +25,7 @@
#include "gal-view-etable.h"
#include <gal/e-table/e-table-config.h>
-#define PARENT_TYPE gal_view_get_type ()
+#define PARENT_TYPE GAL_VIEW_TYPE
static GalViewClass *gal_view_etable_parent_class;
diff --git a/widgets/menus/gal-view-factory-etable.c b/widgets/menus/gal-view-factory-etable.c
index 46a7eb2e79..c0d68fe006 100644
--- a/widgets/menus/gal-view-factory-etable.c
+++ b/widgets/menus/gal-view-factory-etable.c
@@ -27,7 +27,7 @@
#include "gal-view-factory-etable.h"
#include "gal-view-etable.h"
-#define PARENT_TYPE gal_view_factory_get_type ()
+#define PARENT_TYPE GAL_VIEW_FACTORY_TYPE
static GalViewFactoryClass *gal_view_factory_etable_parent_class;
diff --git a/widgets/menus/gal-view-instance-save-as-dialog.c b/widgets/menus/gal-view-instance-save-as-dialog.c
index 5ac6dde416..11099f0b1c 100644
--- a/widgets/menus/gal-view-instance-save-as-dialog.c
+++ b/widgets/menus/gal-view-instance-save-as-dialog.c
@@ -35,13 +35,13 @@
#include <gtk/gtktogglebutton.h>
#include <gtk/gtkbox.h>
-static GnomeDialogClass *parent_class = NULL;
-#define PARENT_TYPE gnome_dialog_get_type()
+static GtkDialogClass *parent_class = NULL;
+#define PARENT_TYPE GTK_TYPE_DIALOG
/* The arguments we take */
enum {
- ARG_0,
- ARG_INSTANCE,
+ PROP_0,
+ PROP_INSTANCE,
};
typedef struct {
@@ -58,9 +58,9 @@ gal_view_instance_save_as_dialog_set_instance(GalViewInstanceSaveAsDialog *dialo
{
dialog->instance = instance;
if (dialog->model) {
- gtk_object_set(GTK_OBJECT(dialog->model),
- "collection", instance ? instance->collection : NULL,
- NULL);
+ g_object_set(dialog->model,
+ "collection", instance ? instance->collection : NULL,
+ NULL);
}
}
@@ -98,28 +98,28 @@ gvisad_radio_toggled (GtkWidget *widget, GalViewInstanceSaveAsDialog *dialog)
}
static void
-gvisad_connect_signal(GalViewInstanceSaveAsDialog *dialog, char *widget_name, char *signal, GtkSignalFunc handler)
+gvisad_connect_signal(GalViewInstanceSaveAsDialog *dialog, char *widget_name, char *signal, GCallback handler)
{
GtkWidget *widget;
widget = glade_xml_get_widget(dialog->gui, widget_name);
if (widget)
- g_signal_connect (G_OBJECT (widget), signal, G_CALLBACK (handler), dialog);
+ g_signal_connect (G_OBJECT (widget), signal, handler, dialog);
}
/* Method override implementations */
static void
-gal_view_instance_save_as_dialog_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
+gal_view_instance_save_as_dialog_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
{
GalViewInstanceSaveAsDialog *dialog;
- dialog = GAL_VIEW_INSTANCE_SAVE_AS_DIALOG (o);
+ dialog = GAL_VIEW_INSTANCE_SAVE_AS_DIALOG (object);
- switch (arg_id){
- case ARG_INSTANCE:
- if (GTK_VALUE_OBJECT(*arg))
- gal_view_instance_save_as_dialog_set_instance(dialog, GAL_VIEW_INSTANCE(GTK_VALUE_OBJECT(*arg)));
+ switch (prop_id){
+ case PROP_INSTANCE:
+ if (g_value_get_object (value))
+ gal_view_instance_save_as_dialog_set_instance(dialog, GAL_VIEW_INSTANCE(g_value_get_object (value)));
else
gal_view_instance_save_as_dialog_set_instance(dialog, NULL);
break;
@@ -130,53 +130,56 @@ gal_view_instance_save_as_dialog_set_arg (GtkObject *o, GtkArg *arg, guint arg_i
}
static void
-gal_view_instance_save_as_dialog_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
+gal_view_instance_save_as_dialog_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
{
GalViewInstanceSaveAsDialog *dialog;
dialog = GAL_VIEW_INSTANCE_SAVE_AS_DIALOG (object);
- switch (arg_id) {
- case ARG_INSTANCE:
- if (dialog->instance)
- GTK_VALUE_OBJECT(*arg) = GTK_OBJECT(dialog->instance);
- else
- GTK_VALUE_OBJECT(*arg) = NULL;
+ switch (prop_id) {
+ case PROP_INSTANCE:
+ g_value_set_object (value, dialog->instance);
break;
default:
- arg->type = GTK_TYPE_INVALID;
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
-gal_view_instance_save_as_dialog_destroy (GtkObject *object)
+gal_view_instance_save_as_dialog_dispose (GObject *object)
{
GalViewInstanceSaveAsDialog *gal_view_instance_save_as_dialog = GAL_VIEW_INSTANCE_SAVE_AS_DIALOG(object);
- gtk_object_unref(GTK_OBJECT(gal_view_instance_save_as_dialog->gui));
+ if (gal_view_instance_save_as_dialog->gui)
+ g_object_unref(gal_view_instance_save_as_dialog->gui);
+ gal_view_instance_save_as_dialog->gui = NULL;
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
+ if (G_OBJECT_CLASS (parent_class)->dispose)
+ (* G_OBJECT_CLASS (parent_class)->dispose) (object);
}
/* Init functions */
static void
gal_view_instance_save_as_dialog_class_init (GalViewInstanceSaveAsDialogClass *klass)
{
- GtkObjectClass *object_class;
+ GObjectClass *object_class;
- object_class = (GtkObjectClass*) klass;
+ object_class = (GObjectClass*) klass;
- parent_class = gtk_type_class (PARENT_TYPE);
+ parent_class = g_type_class_ref (PARENT_TYPE);
- object_class->set_arg = gal_view_instance_save_as_dialog_set_arg;
- object_class->get_arg = gal_view_instance_save_as_dialog_get_arg;
- object_class->destroy = gal_view_instance_save_as_dialog_destroy;
+ object_class->set_property = gal_view_instance_save_as_dialog_set_property;
+ object_class->get_property = gal_view_instance_save_as_dialog_get_property;
+ object_class->dispose = gal_view_instance_save_as_dialog_dispose;
- gtk_object_add_arg_type("GalViewInstanceSaveAsDialog::instance", GAL_VIEW_INSTANCE_TYPE,
- GTK_ARG_READWRITE, ARG_INSTANCE);
+ g_object_class_install_property (object_class, PROP_INSTANCE,
+ g_param_spec_object ("instance",
+ _("Instance"),
+ /*_( */"XXX blurb" /*)*/,
+ GAL_VIEW_INSTANCE_TYPE,
+ G_PARAM_READWRITE));
}
static void
@@ -197,24 +200,24 @@ gal_view_instance_save_as_dialog_init (GalViewInstanceSaveAsDialog *dialog)
}
gtk_widget_ref(widget);
gtk_widget_unparent(widget);
- gtk_box_pack_start(GTK_BOX(GNOME_DIALOG(dialog)->vbox), widget, TRUE, TRUE, 0);
+ gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), widget, TRUE, TRUE, 0);
gtk_widget_unref(widget);
- gnome_dialog_append_buttons(GNOME_DIALOG(dialog),
- GNOME_STOCK_BUTTON_OK,
- GNOME_STOCK_BUTTON_CANCEL,
- NULL);
+ gtk_dialog_add_buttons (GTK_DIALOG (dialog),
+ GTK_STOCK_OK, GTK_RESPONSE_OK,
+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ NULL);
- gvisad_connect_signal(dialog, "radiobutton-replace", "toggled", GTK_SIGNAL_FUNC(gvisad_radio_toggled));
- gvisad_connect_signal(dialog, "radiobutton-create", "toggled", GTK_SIGNAL_FUNC(gvisad_radio_toggled));
+ gvisad_connect_signal(dialog, "radiobutton-replace", "toggled", G_CALLBACK(gvisad_radio_toggled));
+ gvisad_connect_signal(dialog, "radiobutton-create", "toggled", G_CALLBACK(gvisad_radio_toggled));
dialog->model = NULL;
etable = glade_xml_get_widget(dialog->gui, "custom-replace");
if (etable) {
- dialog->model = gtk_object_get_data(GTK_OBJECT(etable), "GalViewInstanceSaveAsDialog::model");
- gtk_object_set(GTK_OBJECT(dialog->model),
- "collection", dialog->instance ? dialog->instance->collection : NULL,
- NULL);
+ dialog->model = g_object_get_data(etable, "GalViewInstanceSaveAsDialog::model");
+ g_object_set(dialog->model,
+ "collection", dialog->instance ? dialog->instance->collection : NULL,
+ NULL);
}
gvisad_setup_radio_buttons (dialog);
@@ -238,7 +241,7 @@ gal_view_instance_save_as_dialog_create_etable(char *name, char *string1, char *
ETableModel *model;
model = gal_define_views_model_new();
table = e_table_scrolled_new(model, NULL, SPEC, NULL);
- gtk_object_set_data(GTK_OBJECT(table), "GalViewInstanceSaveAsDialog::model", model);
+ g_object_set_data(table, "GalViewInstanceSaveAsDialog::model", model);
return table;
}
@@ -253,34 +256,15 @@ gal_view_instance_save_as_dialog_create_etable(char *name, char *string1, char *
GtkWidget*
gal_view_instance_save_as_dialog_new (GalViewInstance *instance)
{
- GtkWidget *widget = GTK_WIDGET (gtk_type_new (gal_view_instance_save_as_dialog_get_type ()));
+ GtkWidget *widget = g_object_new (GAL_VIEW_INSTANCE_SAVE_AS_DIALOG_TYPE, NULL);
gal_view_instance_save_as_dialog_set_instance(GAL_VIEW_INSTANCE_SAVE_AS_DIALOG (widget), instance);
return widget;
}
-GtkType
-gal_view_instance_save_as_dialog_get_type (void)
-{
- static GtkType type = 0;
-
- if (!type) {
- static const GtkTypeInfo info =
- {
- "GalViewInstanceSaveAsDialog",
- sizeof (GalViewInstanceSaveAsDialog),
- sizeof (GalViewInstanceSaveAsDialogClass),
- (GtkClassInitFunc) gal_view_instance_save_as_dialog_class_init,
- (GtkObjectInitFunc) gal_view_instance_save_as_dialog_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- type = gtk_type_unique (PARENT_TYPE, &info);
- }
-
- return type;
-}
+E_MAKE_TYPE(gal_view_instance_save_as_dialog, "GalViewInstanceSaveAsDialog",
+ GalViewInstanceSaveAsDialog,
+ gal_view_instance_save_as_dialog_class_init,
+ gal_view_instance_save_as_dialog_init, PARENT_TYPE)
void
gal_view_instance_save_as_dialog_save (GalViewInstanceSaveAsDialog *dialog)
diff --git a/widgets/menus/gal-view-instance-save-as-dialog.glade b/widgets/menus/gal-view-instance-save-as-dialog.glade
index bc5d99dd58..e60357e17c 100644
--- a/widgets/menus/gal-view-instance-save-as-dialog.glade
+++ b/widgets/menus/gal-view-instance-save-as-dialog.glade
@@ -1,269 +1,243 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>gal-view-instance-save-as-dialog</name>
- <program_name>gal-view-instance-save-as-dialog</program_name>
- <directory></directory>
- <source_directory>src</source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
- <language>C</language>
- <gnome_support>True</gnome_support>
- <gettext_support>True</gettext_support>
- <use_widget_names>True</use_widget_names>
- <output_main_file>False</output_main_file>
- <output_support_files>False</output_support_files>
- <output_build_files>False</output_build_files>
- <gnome_help_support>True</gnome_help_support>
-</project>
-
-<widget>
- <class>GnomeDialog</class>
- <name>dialog1</name>
- <visible>False</visible>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>True</allow_grow>
- <auto_shrink>False</auto_shrink>
- <auto_close>False</auto_close>
- <hide_on_close>False</hide_on_close>
-
- <widget>
- <class>GtkVBox</class>
- <child_name>GnomeDialog:vbox</child_name>
- <name>dialog-vbox1</name>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
- <child>
- <padding>4</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHButtonBox</class>
- <child_name>GnomeDialog:action_area</child_name>
- <name>dialog-action_area1</name>
- <layout_style>GTK_BUTTONBOX_END</layout_style>
- <spacing>8</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>7</child_ipad_x>
- <child_ipad_y>0</child_ipad_y>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- <pack>GTK_PACK_END</pack>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button1</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd" >
+
+<glade-interface>
+ <widget class="GtkDialog" id="dialog1">
+ <property name="visible">no</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="modal">no</property>
+ <property name="allow_shrink">no</property>
+ <property name="allow_grow">yes</property>
+ <property name="window-position">GTK_WIN_POS_NONE</property>
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox1">
+ <property name="homogeneous">no</property>
+ <property name="spacing">8</property>
+ <property name="visible">yes</property>
+
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area1">
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+ <property name="spacing">8</property>
+ <property name="visible">yes</property>
+
+ <child>
+ <widget class="GtkButton" id="button1">
+ <property name="can_default">yes</property>
+ <property name="can_focus">yes</property>
+ <property name="visible">yes</property>
+ <property name="label">gtk-ok</property>
+ <property name="use_stock">yes</property>
+ <property name="use_underline">yes</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="button3">
+ <property name="can_default">yes</property>
+ <property name="can_focus">yes</property>
+ <property name="visible">yes</property>
+ <property name="label">gtk-cancel</property>
+ <property name="use_stock">yes</property>
+ <property name="use_underline">yes</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">no</property>
+ <property name="fill">yes</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkTable" id="table-top">
+ <property name="homogeneous">no</property>
+ <property name="row_spacing">0</property>
+ <property name="column_spacing">0</property>
+ <property name="n-rows">5</property>
+ <property name="n-columns">1</property>
+ <property name="visible">yes</property>
+
+ <child>
+ <widget class="GtkNotebook" id="notebook-help">
+ <property name="show_tabs">no</property>
+ <property name="show_border">no</property>
+ <property name="tab_pos">GTK_POS_TOP</property>
+ <property name="scrollable">no</property>
+ <property name="tab_hborder">2</property>
+ <property name="tab_vborder">2</property>
+ <property name="enable-popup">no</property>
+ <property name="visible">yes</property>
+
+ <child>
+ <widget class="GtkLabel" id="label6">
+ <property name="label" translatable="yes">The current view will replace the given view. Any folders
+set to this view wil be replaced with the current view.</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">no</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="visible">yes</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label4">
+ <property name="label" translatable="yes">label4</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">no</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="visible">yes</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label7">
+ <property name="label" translatable="yes">This will create a new View.</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">no</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="visible">yes</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label5">
+ <property name="label" translatable="yes">label5</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">no</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="visible">yes</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="x_padding">0</property>
+ <property name="y_padding">0</property>
+ <property name="x_options">expand|fill</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="Custom" id="custom-replace">
+ <property name="creation_function">gal_view_instance_save_as_dialog_create_etable</property>
+ <property name="int1">0</property>
+ <property name="int2">0</property>
+ <property name="last_modification_time">Fri, 01 Feb 2002 20:18:32 GMT</property>
+ <property name="visible">yes</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_padding">0</property>
+ <property name="y_padding">0</property>
+ <property name="x_options">fill</property>
+ <property name="y_options">expand|fill</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="entry-create">
+ <property name="sensitive">no</property>
+ <property name="can_focus">yes</property>
+ <property name="editable">yes</property>
+ <property name="text" translatable="yes"></property>
+ <property name="max-length">0</property>
+ <property name="visibility">yes</property>
+ <property name="visible">yes</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_padding">0</property>
+ <property name="y_padding">0</property>
+ <property name="x_options">expand|fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkRadioButton" id="radiobutton-replace">
+ <property name="can_focus">yes</property>
+ <property name="label" translatable="yes">Replace Existing View</property>
+ <property name="active">no</property>
+ <property name="draw_indicator">yes</property>
+ <property name="visible">yes</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_padding">0</property>
+ <property name="y_padding">0</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkRadioButton" id="radiobutton-create">
+ <property name="can_focus">yes</property>
+ <property name="label" translatable="yes">Create New View Named</property>
+ <property name="active">yes</property>
+ <property name="draw_indicator">yes</property>
+ <property name="visible">yes</property>
+ <property name="group">radiobutton-replace</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_padding">0</property>
+ <property name="y_padding">0</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">yes</property>
+ <property name="fill">yes</property>
+ </packing>
+ </child>
</widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button3</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
- </widget>
- </widget>
-
- <widget>
- <class>GtkTable</class>
- <name>table-top</name>
- <rows>5</rows>
- <columns>1</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>0</row_spacing>
- <column_spacing>0</column_spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkNotebook</class>
- <name>notebook-help</name>
- <show_tabs>False</show_tabs>
- <show_border>False</show_border>
- <tab_pos>GTK_POS_TOP</tab_pos>
- <scrollable>False</scrollable>
- <tab_hborder>2</tab_hborder>
- <tab_vborder>2</tab_vborder>
- <popup_enable>False</popup_enable>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>4</top_attach>
- <bottom_attach>5</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label6</name>
- <label>The current view will replace the given view. Any folders
-set to this view wil be replaced with the current view.</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label4</name>
- <label>label4</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label7</name>
- <label>This will create a new View.</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label5</name>
- <label>label5</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>custom-replace</name>
- <creation_function>gal_view_instance_save_as_dialog_create_etable</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Fri, 01 Feb 2002 20:18:32 GMT</last_modification_time>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-create</name>
- <sensitive>False</sensitive>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>radiobutton-replace</name>
- <can_focus>True</can_focus>
- <label>Replace Existing View</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>choice-group</group>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>radiobutton-create</name>
- <can_focus>True</can_focus>
- <label>Create New View Named</label>
- <active>True</active>
- <draw_indicator>True</draw_indicator>
- <group>choice-group</group>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
- </widget>
+ <packing>
+ <property name="padding">4</property>
+ <property name="expand">yes</property>
+ <property name="fill">yes</property>
+ </packing>
+ </child>
</widget>
-</widget>
-
-</GTK-Interface>
+</glade-interface>
diff --git a/widgets/menus/gal-view-instance-save-as-dialog.h b/widgets/menus/gal-view-instance-save-as-dialog.h
index 567e00d7b0..53d99d0789 100644
--- a/widgets/menus/gal-view-instance-save-as-dialog.h
+++ b/widgets/menus/gal-view-instance-save-as-dialog.h
@@ -24,7 +24,7 @@
#ifndef __GAL_VIEW_INSTANCE_SAVE_AS_DIALOG_H__
#define __GAL_VIEW_INSTANCE_SAVE_AS_DIALOG_H__
-#include <libgnomeui/gnome-dialog.h>
+#include <gtk/gtkdialog.h>
#include <glade/glade.h>
#include <gal/e-table/e-table-model.h>
#include <gal/menus/gal-view-collection.h>
@@ -44,10 +44,10 @@ extern "C" {
*/
#define GAL_VIEW_INSTANCE_SAVE_AS_DIALOG_TYPE (gal_view_instance_save_as_dialog_get_type ())
-#define GAL_VIEW_INSTANCE_SAVE_AS_DIALOG(obj) (GTK_CHECK_CAST ((obj), GAL_VIEW_INSTANCE_SAVE_AS_DIALOG_TYPE, GalViewInstanceSaveAsDialog))
-#define GAL_VIEW_INSTANCE_SAVE_AS_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GAL_VIEW_INSTANCE_SAVE_AS_DIALOG_TYPE, GalViewInstanceSaveAsDialogClass))
-#define GAL_IS_VIEW_INSTANCE_SAVE_AS_DIALOG(obj) (GTK_CHECK_TYPE ((obj), GAL_VIEW_INSTANCE_SAVE_AS_DIALOG_TYPE))
-#define GAL_IS_VIEW_INSTANCE_SAVE_AS_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), GAL_VIEW_INSTANCE_SAVE_AS_DIALOG_TYPE))
+#define GAL_VIEW_INSTANCE_SAVE_AS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAL_VIEW_INSTANCE_SAVE_AS_DIALOG_TYPE, GalViewInstanceSaveAsDialog))
+#define GAL_VIEW_INSTANCE_SAVE_AS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAL_VIEW_INSTANCE_SAVE_AS_DIALOG_TYPE, GalViewInstanceSaveAsDialogClass))
+#define GAL_IS_VIEW_INSTANCE_SAVE_AS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAL_VIEW_INSTANCE_SAVE_AS_DIALOG_TYPE))
+#define GAL_IS_VIEW_INSTANCE_SAVE_AS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), GAL_VIEW_INSTANCE_SAVE_AS_DIALOG_TYPE))
typedef struct _GalViewInstanceSaveAsDialog GalViewInstanceSaveAsDialog;
typedef struct _GalViewInstanceSaveAsDialogClass GalViewInstanceSaveAsDialogClass;
@@ -59,7 +59,7 @@ typedef enum {
struct _GalViewInstanceSaveAsDialog
{
- GnomeDialog parent;
+ GtkDialog parent;
/* item specific fields */
GladeXML *gui;
@@ -73,11 +73,11 @@ struct _GalViewInstanceSaveAsDialog
struct _GalViewInstanceSaveAsDialogClass
{
- GnomeDialogClass parent_class;
+ GtkDialogClass parent_class;
};
GtkWidget *gal_view_instance_save_as_dialog_new (GalViewInstance *instance);
-GtkType gal_view_instance_save_as_dialog_get_type (void);
+GType gal_view_instance_save_as_dialog_get_type (void);
void gal_view_instance_save_as_dialog_save (GalViewInstanceSaveAsDialog *dialog);
diff --git a/widgets/menus/gal-view-instance.c b/widgets/menus/gal-view-instance.c
index 87747931f4..94b43eada6 100644
--- a/widgets/menus/gal-view-instance.c
+++ b/widgets/menus/gal-view-instance.c
@@ -26,7 +26,6 @@
#include <util/e-i18n.h>
#include <ctype.h>
#include <string.h>
-#include <gtk/gtksignal.h>
#include <libxml/parser.h>
#include <libgnome/gnome-util.h>
#include <libgnomeui/gnome-dialog.h>
@@ -492,7 +491,7 @@ add_popup_radio_item (EPopupMenu *menu_item,
static void
add_popup_menu_item (EPopupMenu *menu_item,
gchar *title,
- GtkSignalFunc fn,
+ GCallback fn,
gpointer closure)
{
const EPopupMenu menu_item_struct =
@@ -559,18 +558,18 @@ gal_view_instance_get_popup_menu (GalViewInstance *instance)
value = TRUE;
}
- add_popup_radio_item (ret_val + i, item->title, GTK_SIGNAL_FUNC (view_item_cb), closure, value);
+ add_popup_radio_item (ret_val + i, item->title, G_CALLBACK (view_item_cb), closure, value);
}
if (!found) {
e_popup_menu_copy_1 (ret_val + i++, &separator);
add_popup_radio_item (ret_val + i++, N_("Custom View"), NULL, NULL, TRUE);
- add_popup_menu_item (ret_val + i++, N_("Save Custom View"), GTK_SIGNAL_FUNC (save_current_view_cb), instance);
+ add_popup_menu_item (ret_val + i++, N_("Save Custom View"), G_CALLBACK (save_current_view_cb), instance);
}
e_popup_menu_copy_1 (ret_val + i++, &separator);
- add_popup_menu_item (ret_val + i++, N_("Define Views"), GTK_SIGNAL_FUNC (define_views_cb), instance);
+ add_popup_menu_item (ret_val + i++, N_("Define Views"), G_CALLBACK (define_views_cb), instance);
e_popup_menu_copy_1 (ret_val + i++, &terminator);
return ret_val;
diff --git a/widgets/menus/gal-view-new-dialog.c b/widgets/menus/gal-view-new-dialog.c
index 6c858d141b..2677f2a415 100644
--- a/widgets/menus/gal-view-new-dialog.c
+++ b/widgets/menus/gal-view-new-dialog.c
@@ -28,64 +28,56 @@
#include "gal-define-views-model.h"
#include <gal/widgets/e-unicode.h>
#include <gal/e-table/e-table-scrolled.h>
+#include <gal/util/e-i18n.h>
+#include <gal/util/e-util.h>
static void gal_view_new_dialog_init (GalViewNewDialog *card);
static void gal_view_new_dialog_class_init (GalViewNewDialogClass *klass);
-static void gal_view_new_dialog_set_arg (GtkObject *o, GtkArg *arg, guint arg_id);
-static void gal_view_new_dialog_get_arg (GtkObject *object, GtkArg *arg, guint arg_id);
-static void gal_view_new_dialog_destroy (GtkObject *object);
+static void gal_view_new_dialog_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
+static void gal_view_new_dialog_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
+static void gal_view_new_dialog_dispose (GObject *object);
-static GnomeDialogClass *parent_class = NULL;
-#define PARENT_TYPE gnome_dialog_get_type()
+static GtkDialogClass *parent_class = NULL;
+#define PARENT_TYPE GTK_TYPE_DIALOG
/* The arguments we take */
enum {
- ARG_0,
- ARG_NAME,
- ARG_FACTORY
+ PROP_0,
+ PROP_NAME,
+ PROP_FACTORY
};
-GtkType
-gal_view_new_dialog_get_type (void)
-{
- static GtkType type = 0;
-
- if (!type) {
- static const GtkTypeInfo info =
- {
- "GalViewNewDialog",
- sizeof (GalViewNewDialog),
- sizeof (GalViewNewDialogClass),
- (GtkClassInitFunc) gal_view_new_dialog_class_init,
- (GtkObjectInitFunc) gal_view_new_dialog_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- type = gtk_type_unique (PARENT_TYPE, &info);
- }
-
- return type;
-}
+E_MAKE_TYPE(gal_view_new_dialog, "GalViewNewDialog",
+ GalViewNewDialog,
+ gal_view_new_dialog_class_init,
+ gal_view_new_dialog_init, PARENT_TYPE)
static void
gal_view_new_dialog_class_init (GalViewNewDialogClass *klass)
{
- GtkObjectClass *object_class;
+ GObjectClass *object_class;
- object_class = (GtkObjectClass*) klass;
+ object_class = (GObjectClass*) klass;
- parent_class = gtk_type_class (PARENT_TYPE);
+ parent_class = g_type_class_ref (PARENT_TYPE);
- object_class->set_arg = gal_view_new_dialog_set_arg;
- object_class->get_arg = gal_view_new_dialog_get_arg;
- object_class->destroy = gal_view_new_dialog_destroy;
+ object_class->set_property = gal_view_new_dialog_set_property;
+ object_class->get_property = gal_view_new_dialog_get_property;
+ object_class->dispose = gal_view_new_dialog_dispose;
- gtk_object_add_arg_type ("GalViewNewDialog::name", GTK_TYPE_STRING,
- GTK_ARG_READWRITE, ARG_NAME);
- gtk_object_add_arg_type ("GalViewNewDialog::factory", GTK_TYPE_OBJECT,
- GTK_ARG_READABLE, ARG_FACTORY);
+ g_object_class_install_property (object_class, PROP_FACTORY,
+ g_param_spec_string ("name",
+ _("Name"),
+ /*_( */"XXX blurb" /*)*/,
+ NULL,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (object_class, PROP_FACTORY,
+ g_param_spec_object ("factory",
+ _("Factory"),
+ /*_( */"XXX blurb" /*)*/,
+ GAL_VIEW_FACTORY_TYPE,
+ G_PARAM_READWRITE));
}
static void
@@ -103,13 +95,13 @@ gal_view_new_dialog_init (GalViewNewDialog *dialog)
}
gtk_widget_ref(widget);
gtk_widget_unparent(widget);
- gtk_box_pack_start(GTK_BOX(GNOME_DIALOG(dialog)->vbox), widget, TRUE, TRUE, 0);
+ gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), widget, TRUE, TRUE, 0);
gtk_widget_unref(widget);
- gnome_dialog_append_buttons(GNOME_DIALOG(dialog),
- GTK_STOCK_OK,
- GTK_STOCK_CANCEL,
- NULL);
+ gtk_dialog_add_buttons (GTK_DIALOG (dialog),
+ GTK_STOCK_OK, GTK_RESPONSE_OK,
+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ NULL);
gtk_window_set_policy(GTK_WINDOW(dialog), FALSE, TRUE, FALSE);
@@ -118,23 +110,23 @@ gal_view_new_dialog_init (GalViewNewDialog *dialog)
}
static void
-gal_view_new_dialog_destroy (GtkObject *object)
+gal_view_new_dialog_dispose (GObject *object)
{
GalViewNewDialog *gal_view_new_dialog = GAL_VIEW_NEW_DIALOG(object);
if (gal_view_new_dialog->gui)
- gtk_object_unref(GTK_OBJECT(gal_view_new_dialog->gui));
+ g_object_unref(gal_view_new_dialog->gui);
gal_view_new_dialog->gui = NULL;
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
+ if (G_OBJECT_CLASS (parent_class)->dispose)
+ (* G_OBJECT_CLASS (parent_class)->dispose) (object);
}
GtkWidget*
gal_view_new_dialog_new (GalViewCollection *collection)
{
GtkWidget *widget =
- gal_view_new_dialog_construct(gtk_type_new (gal_view_new_dialog_get_type ()),
+ gal_view_new_dialog_construct(g_object_new (GAL_VIEW_NEW_DIALOG_TYPE, NULL),
collection);
return widget;
}
@@ -167,60 +159,62 @@ gal_view_new_dialog_construct (GalViewNewDialog *dialog,
char *text[1];
int row;
- gtk_object_ref(GTK_OBJECT(factory));
+ g_object_ref(factory);
text[0] = (char *) gal_view_factory_get_title(factory);
row = gtk_clist_append(GTK_CLIST(list), text);
gtk_clist_set_row_data(GTK_CLIST(list), row, factory);
}
- gtk_signal_connect(GTK_OBJECT (list),
- "select_row",
- GTK_SIGNAL_FUNC(gal_view_new_dialog_select_row_callback),
- dialog);
+ g_signal_connect(list,
+ "select_row",
+ G_CALLBACK(gal_view_new_dialog_select_row_callback),
+ dialog);
return GTK_WIDGET(dialog);
}
static void
-gal_view_new_dialog_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
+gal_view_new_dialog_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
{
GalViewNewDialog *dialog;
GtkWidget *entry;
- dialog = GAL_VIEW_NEW_DIALOG (o);
+ dialog = GAL_VIEW_NEW_DIALOG (object);
- switch (arg_id){
- case ARG_NAME:
+ switch (prop_id){
+ case PROP_NAME:
entry = glade_xml_get_widget(dialog->gui, "entry-name");
- if (entry && GTK_IS_EDITABLE(entry)) {
- e_utf8_gtk_editable_set_text(GTK_EDITABLE(entry), GTK_VALUE_STRING(*arg));
+ if (entry && GTK_IS_ENTRY(entry)) {
+ gtk_entry_set_text(GTK_ENTRY(entry), g_value_get_string (value));
}
break;
default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
return;
}
}
+
static void
-gal_view_new_dialog_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
+gal_view_new_dialog_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
{
GalViewNewDialog *dialog;
GtkWidget *entry;
dialog = GAL_VIEW_NEW_DIALOG (object);
- switch (arg_id) {
- case ARG_NAME:
+ switch (prop_id) {
+ case PROP_NAME:
entry = glade_xml_get_widget(dialog->gui, "entry-name");
- if (entry && GTK_IS_EDITABLE(entry)) {
- GTK_VALUE_STRING(*arg) = e_utf8_gtk_editable_get_text(GTK_EDITABLE(entry));
+ if (entry && GTK_IS_ENTRY(entry)) {
+ g_value_set_string (value, gtk_entry_get_text (GTK_ENTRY (entry)));
}
break;
- case ARG_FACTORY:
- GTK_VALUE_OBJECT(*arg) = dialog->selected_factory ? GTK_OBJECT(dialog->selected_factory) : NULL;
+ case PROP_FACTORY:
+ g_value_set_object (value, dialog->selected_factory);
break;
default:
- arg->type = GTK_TYPE_INVALID;
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
diff --git a/widgets/menus/gal-view-new-dialog.glade b/widgets/menus/gal-view-new-dialog.glade
index 173fa6c3af..eac107fc00 100644
--- a/widgets/menus/gal-view-new-dialog.glade
+++ b/widgets/menus/gal-view-new-dialog.glade
@@ -1,220 +1,201 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd" >
-<project>
- <name>gal-view-new-dialog</name>
- <program_name>gal-view-new-dialog</program_name>
- <directory></directory>
- <source_directory>src</source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
- <language>C</language>
- <gnome_support>True</gnome_support>
- <gettext_support>True</gettext_support>
- <use_widget_names>True</use_widget_names>
- <output_main_file>False</output_main_file>
- <output_support_files>False</output_support_files>
- <output_build_files>False</output_build_files>
- <gnome_help_support>True</gnome_help_support>
-</project>
+<glade-interface>
+ <widget class="GtkDialog" id="dialog1">
+ <property name="visible">no</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="modal">no</property>
+ <property name="allow_shrink">no</property>
+ <property name="allow_grow">yes</property>
+ <property name="window-position">GTK_WIN_POS_NONE</property>
-<widget>
- <class>GnomeDialog</class>
- <name>dialog1</name>
- <visible>False</visible>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>True</allow_grow>
- <auto_shrink>False</auto_shrink>
- <auto_close>False</auto_close>
- <hide_on_close>False</hide_on_close>
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox1">
+ <property name="homogeneous">no</property>
+ <property name="spacing">8</property>
+ <property name="visible">yes</property>
- <widget>
- <class>GtkVBox</class>
- <child_name>GnomeDialog:vbox</child_name>
- <name>dialog-vbox1</name>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
- <child>
- <padding>4</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area1">
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+ <property name="spacing">8</property>
+ <property name="visible">yes</property>
- <widget>
- <class>GtkHButtonBox</class>
- <child_name>GnomeDialog:action_area</child_name>
- <name>dialog-action_area1</name>
- <layout_style>GTK_BUTTONBOX_END</layout_style>
- <spacing>8</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>7</child_ipad_x>
- <child_ipad_y>0</child_ipad_y>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- <pack>GTK_PACK_END</pack>
- </child>
+ <child>
+ <widget class="GtkButton" id="button1">
+ <property name="can_default">yes</property>
+ <property name="can_focus">yes</property>
+ <property name="visible">yes</property>
+ <property name="label">gtk-ok</property>
+ <property name="use_stock">yes</property>
+ <property name="use_underline">yes</property>
+ </widget>
+ </child>
- <widget>
- <class>GtkButton</class>
- <name>button1</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
- </widget>
+ <child>
+ <widget class="GtkButton" id="button3">
+ <property name="can_default">yes</property>
+ <property name="can_focus">yes</property>
+ <property name="visible">yes</property>
+ <property name="label">gtk-cancel</property>
+ <property name="use_stock">yes</property>
+ <property name="use_underline">yes</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">no</property>
+ <property name="fill">yes</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
- <widget>
- <class>GtkButton</class>
- <name>button3</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
- </widget>
- </widget>
+ <child>
+ <widget class="GtkTable" id="table-top">
+ <property name="homogeneous">no</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
+ <property name="n-rows">4</property>
+ <property name="n-columns">1</property>
+ <property name="visible">yes</property>
- <widget>
- <class>GtkTable</class>
- <name>table-top</name>
- <rows>4</rows>
- <columns>1</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>6</row_spacing>
- <column_spacing>6</column_spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
+ <child>
+ <widget class="GtkLabel" id="label1">
+ <property name="label" translatable="yes">Name of new view:</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">no</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">entry-name</property>
+ <property name="visible">yes</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_padding">0</property>
+ <property name="y_padding">0</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
- <widget>
- <class>GtkLabel</class>
- <name>label1</name>
- <label>Name of new view:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-name</focus_target>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
+ <child>
+ <widget class="GtkEntry" id="entry-name">
+ <property name="can_focus">yes</property>
+ <property name="editable">yes</property>
+ <property name="text" translatable="yes"></property>
+ <property name="max-length">0</property>
+ <property name="visibility">yes</property>
+ <property name="visible">yes</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_padding">0</property>
+ <property name="y_padding">0</property>
+ <property name="x_options">expand|fill</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
- <widget>
- <class>GtkEntry</class>
- <name>entry-name</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
+ <child>
+ <widget class="GtkLabel" id="label2">
+ <property name="label" translatable="yes">Type of view:</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">no</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="visible">yes</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_padding">0</property>
+ <property name="y_padding">0</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
- <widget>
- <class>GtkLabel</class>
- <name>label2</name>
- <label>Type of view:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow1">
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+ <property name="visible">yes</property>
+
+ <child>
+ <widget class="GtkTreeView" id="clist-type-list">
+ <property name="can_focus">yes</property>
+ <property name="headers-visible">no</property>
+ <property name="visible">yes</property>
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow1</name>
- <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
+ <child>
+ <widget class="GtkLabel" id="label5">
+ <property name="child_name">CList:title</property>
+ <property name="label" translatable="yes">label5</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">no</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="visible">yes</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
- <widget>
- <class>GtkCList</class>
- <name>clist-type-list</name>
- <can_focus>True</can_focus>
- <columns>1</columns>
- <column_widths>80</column_widths>
- <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
- <show_titles>False</show_titles>
- <shadow_type>GTK_SHADOW_IN</shadow_type>
+ <child internal-child="hscrollbar">
+ <widget class="GtkHScrollbar" id="convertwidget1">
+ <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
+ <property name="visible">yes</property>
+ </widget>
+ </child>
- <widget>
- <class>GtkLabel</class>
- <child_name>CList:title</child_name>
- <name>label5</name>
- <label>label5</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
+ <child internal-child="vscrollbar">
+ <widget class="GtkVScrollbar" id="convertwidget2">
+ <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
+ <property name="visible">yes</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_padding">0</property>
+ <property name="y_padding">0</property>
+ <property name="x_options">fill</property>
+ <property name="y_options">expand|fill</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">yes</property>
+ <property name="fill">yes</property>
+ </packing>
+ </child>
</widget>
- </widget>
+ <packing>
+ <property name="padding">4</property>
+ <property name="expand">yes</property>
+ <property name="fill">yes</property>
+ </packing>
+ </child>
</widget>
-</widget>
-
-</GTK-Interface>
+</glade-interface>
diff --git a/widgets/menus/gal-view-new-dialog.h b/widgets/menus/gal-view-new-dialog.h
index 623cb341d0..d7d7912ea2 100644
--- a/widgets/menus/gal-view-new-dialog.h
+++ b/widgets/menus/gal-view-new-dialog.h
@@ -24,6 +24,7 @@
#ifndef __GAL_VIEW_NEW_DIALOG_H__
#define __GAL_VIEW_NEW_DIALOG_H__
+#include <gtk/gtkdialog.h>
#include <glade/glade.h>
#include <gal-view-collection.h>
@@ -40,18 +41,18 @@ extern "C" {
* --------------------------------------------------------------------------------
*/
-#define GAL_VIEW_NEW_DIALOG_TYPE (gal_view_new_dialog_get_type ())
-#define GAL_VIEW_NEW_DIALOG(obj) (GTK_CHECK_CAST ((obj), GAL_VIEW_NEW_DIALOG_TYPE, GalViewNewDialog))
-#define GAL_VIEW_NEW_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GAL_VIEW_NEW_DIALOG_TYPE, GalViewNewDialogClass))
-#define GAL_IS_VIEW_NEW_DIALOG(obj) (GTK_CHECK_TYPE ((obj), GAL_VIEW_NEW_DIALOG_TYPE))
-#define GAL_IS_VIEW_NEW_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), GAL_VIEW_NEW_DIALOG_TYPE))
+#define GAL_VIEW_NEW_DIALOG_TYPE (gal_view_new_dialog_get_type ())
+#define GAL_VIEW_NEW_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAL_VIEW_NEW_DIALOG_TYPE, GalViewNewDialog))
+#define GAL_VIEW_NEW_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAL_VIEW_NEW_DIALOG_TYPE, GalViewNewDialogClass))
+#define GAL_IS_VIEW_NEW_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAL_VIEW_NEW_DIALOG_TYPE))
+#define GAL_IS_VIEW_NEW_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), GAL_VIEW_NEW_DIALOG_TYPE))
typedef struct _GalViewNewDialog GalViewNewDialog;
typedef struct _GalViewNewDialogClass GalViewNewDialogClass;
struct _GalViewNewDialog
{
- GnomeDialog parent;
+ GtkDialog parent;
/* item specific fields */
GladeXML *gui;
@@ -62,11 +63,11 @@ struct _GalViewNewDialog
struct _GalViewNewDialogClass
{
- GnomeDialogClass parent_class;
+ GtkDialogClass parent_class;
};
GtkWidget *gal_view_new_dialog_new (GalViewCollection *collection);
-GtkType gal_view_new_dialog_get_type (void);
+GType gal_view_new_dialog_get_type (void);
GtkWidget *gal_view_new_dialog_construct (GalViewNewDialog *dialog,
GalViewCollection *collection);