aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/printing
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2008-05-23 01:27:48 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-05-23 01:27:48 +0800
commite99e12428d46db3be2878f6c2ca63bd7510149f4 (patch)
treef3e50bd91132262198bea8761f84913a232790bd /addressbook/printing
parente1d0bcf694c806af75cb4d9683d1941d9721a1f9 (diff)
downloadgsoc2013-evolution-e99e12428d46db3be2878f6c2ca63bd7510149f4.tar
gsoc2013-evolution-e99e12428d46db3be2878f6c2ca63bd7510149f4.tar.gz
gsoc2013-evolution-e99e12428d46db3be2878f6c2ca63bd7510149f4.tar.bz2
gsoc2013-evolution-e99e12428d46db3be2878f6c2ca63bd7510149f4.tar.lz
gsoc2013-evolution-e99e12428d46db3be2878f6c2ca63bd7510149f4.tar.xz
gsoc2013-evolution-e99e12428d46db3be2878f6c2ca63bd7510149f4.tar.zst
gsoc2013-evolution-e99e12428d46db3be2878f6c2ca63bd7510149f4.zip
** Fixes bug #534360
2008-05-22 Matthew Barnes <mbarnes@redhat.com> ** Fixes bug #534360 Migrate from deprecated GtkObject symbols to GObject equivalents. Touches over 150 files in all components; too many to list. svn path=/trunk/; revision=35526
Diffstat (limited to 'addressbook/printing')
-rw-r--r--addressbook/printing/e-contact-print-style-editor.c95
-rw-r--r--addressbook/printing/e-contact-print-style-editor.h10
2 files changed, 38 insertions, 67 deletions
diff --git a/addressbook/printing/e-contact-print-style-editor.c b/addressbook/printing/e-contact-print-style-editor.c
index 7ae6111e06..295cbbb6f6 100644
--- a/addressbook/printing/e-contact-print-style-editor.c
+++ b/addressbook/printing/e-contact-print-style-editor.c
@@ -23,57 +23,47 @@
#include "e-util/e-util-private.h"
static void e_contact_print_style_editor_init (EContactPrintStyleEditor *card);
-static void e_contact_print_style_editor_class_init (EContactPrintStyleEditorClass *klass);
-static void e_contact_print_style_editor_set_arg (GtkObject *o, GtkArg *arg, guint arg_id);
-static void e_contact_print_style_editor_get_arg (GtkObject *object, GtkArg *arg, guint arg_id);
-static void e_contact_print_style_editor_destroy (GtkObject *object);
+static void e_contact_print_style_editor_class_init (EContactPrintStyleEditorClass *class);
+static void e_contact_print_style_editor_finalize (GObject *object);
-static GtkVBoxClass *parent_class = NULL;
+static gpointer parent_class;
-
-/* The arguments we take */
-enum {
- ARG_0,
- ARG_CARD
-};
-
-GtkType
+GType
e_contact_print_style_editor_get_type (void)
{
- static GtkType contact_print_style_editor_type = 0;
-
- if (!contact_print_style_editor_type)
- {
- static const GtkTypeInfo contact_print_style_editor_info =
- {
- "EContactPrintStyleEditor",
- sizeof (EContactPrintStyleEditor),
- sizeof (EContactPrintStyleEditorClass),
- (GtkClassInitFunc) e_contact_print_style_editor_class_init,
- (GtkObjectInitFunc) e_contact_print_style_editor_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- contact_print_style_editor_type = gtk_type_unique (gtk_vbox_get_type (), &contact_print_style_editor_info);
- }
-
- return contact_print_style_editor_type;
+ static GType type = 0;
+
+ if (G_UNLIKELY (type == 0)) {
+ static const GTypeInfo type_info = {
+ sizeof (EContactPrintStyleEditorClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) e_contact_print_style_editor_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (EContactPrintStyleEditor),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) e_contact_print_style_editor_init,
+ NULL /* value_table */
+ };
+
+ type = g_type_register_static (
+ GTK_TYPE_VBOX, "EContactPrintStyleEditor",
+ &type_info, 0);
+ }
+
+ return type;
}
static void
-e_contact_print_style_editor_class_init (EContactPrintStyleEditorClass *klass)
+e_contact_print_style_editor_class_init (EContactPrintStyleEditorClass *class)
{
- GtkObjectClass *object_class;
+ GObjectClass *object_class;
- object_class = (GtkObjectClass*) klass;
+ parent_class = g_type_class_peek_parent (class);
- parent_class = gtk_type_class (gtk_vbox_get_type ());
-
- object_class->set_arg = e_contact_print_style_editor_set_arg;
- object_class->get_arg = e_contact_print_style_editor_get_arg;
- object_class->destroy = e_contact_print_style_editor_destroy;
+ object_class = G_OBJECT_CLASS (class);
+ object_class->finalize = e_contact_print_style_editor_finalize;
}
#if 0
@@ -113,7 +103,7 @@ e_contact_print_style_editor_init (EContactPrintStyleEditor *e_contact_print_sty
}
static void
-e_contact_print_style_editor_destroy (GtkObject *object)
+e_contact_print_style_editor_finalize (GObject *object)
{
EContactPrintStyleEditor *e_contact_print_style_editor = E_CONTACT_PRINT_STYLE_EDITOR(object);
@@ -122,7 +112,7 @@ e_contact_print_style_editor_destroy (GtkObject *object)
e_contact_print_style_editor->gui = NULL;
}
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
+ G_OBJECT_CLASS (parent_class)->finalize (object);
}
GtkWidget*
@@ -130,22 +120,3 @@ e_contact_print_style_editor_new (char *filename)
{
return g_object_new (e_contact_print_style_editor_get_type (), NULL);
}
-
-static void
-e_contact_print_style_editor_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
-{
- switch (arg_id){
- default:
- break;
- }
-}
-
-static void
-e_contact_print_style_editor_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
- switch (arg_id) {
- default:
- arg->type = GTK_TYPE_INVALID;
- break;
- }
-}
diff --git a/addressbook/printing/e-contact-print-style-editor.h b/addressbook/printing/e-contact-print-style-editor.h
index 0041c518da..69998dde10 100644
--- a/addressbook/printing/e-contact-print-style-editor.h
+++ b/addressbook/printing/e-contact-print-style-editor.h
@@ -39,10 +39,10 @@ extern "C" {
*/
#define E_CONTACT_PRINT_STYLE_EDITOR_TYPE (e_contact_print_style_editor_get_type ())
-#define E_CONTACT_PRINT_STYLE_EDITOR(obj) (GTK_CHECK_CAST ((obj), E_CONTACT_PRINT_STYLE_EDITOR_TYPE, EContactPrintStyleEditor))
-#define E_CONTACT_PRINT_STYLE_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_CONTACT_PRINT_STYLE_EDITOR_TYPE, EContactPrintStyleEditorClass))
-#define E_IS_MINICARD(obj) (GTK_CHECK_TYPE ((obj), E_CONTACT_PRINT_STYLE_EDITOR_TYPE))
-#define E_IS_MINICARD_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_CONTACT_PRINT_STYLE_EDITOR_TYPE))
+#define E_CONTACT_PRINT_STYLE_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_CONTACT_PRINT_STYLE_EDITOR_TYPE, EContactPrintStyleEditor))
+#define E_CONTACT_PRINT_STYLE_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_CONTACT_PRINT_STYLE_EDITOR_TYPE, EContactPrintStyleEditorClass))
+#define E_IS_MINICARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_CONTACT_PRINT_STYLE_EDITOR_TYPE))
+#define E_IS_MINICARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_CONTACT_PRINT_STYLE_EDITOR_TYPE))
typedef struct _EContactPrintStyleEditor EContactPrintStyleEditor;
@@ -63,7 +63,7 @@ struct _EContactPrintStyleEditorClass
GtkWidget *e_contact_print_style_editor_new(char *filename);
-GtkType e_contact_print_style_editor_get_type (void);
+GType e_contact_print_style_editor_get_type (void);
#ifdef __cplusplus
}