aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-url-entry.c
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 /widgets/misc/e-url-entry.c
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 'widgets/misc/e-url-entry.c')
-rw-r--r--widgets/misc/e-url-entry.c68
1 files changed, 34 insertions, 34 deletions
diff --git a/widgets/misc/e-url-entry.c b/widgets/misc/e-url-entry.c
index 1b921f07b0..1ee2ddbf79 100644
--- a/widgets/misc/e-url-entry.c
+++ b/widgets/misc/e-url-entry.c
@@ -36,56 +36,56 @@ struct _EUrlEntryPrivate {
GtkWidget *button;
};
-static void class_init (EUrlEntryClass *klass);
+static void class_init (EUrlEntryClass *class);
static void init (EUrlEntry *url_entry);
-static void destroy (GtkObject *obj);
+static void finalize (GObject *object);
static void button_clicked_cb (GtkWidget *widget, gpointer data);
static void entry_changed_cb (GtkEditable *editable, gpointer data);
static gboolean mnemonic_activate (GtkWidget *widget, gboolean group_cycling);
-static GtkHBoxClass *parent_class = NULL;
+static gpointer parent_class = NULL;
-GtkType
+GType
e_url_entry_get_type (void)
{
- static GtkType type = 0;
-
- if (type == 0)
- {
- static const GtkTypeInfo info =
- {
- "EUrlEntry",
- sizeof (EUrlEntry),
- sizeof (EUrlEntryClass),
- (GtkClassInitFunc) class_init,
- (GtkObjectInitFunc) init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- type = gtk_type_unique (gtk_hbox_get_type (), &info);
- }
-
- return type;
+ static GType type = 0;
+
+ if (G_UNLIKELY (type == 0)) {
+ static const GTypeInfo type_info = {
+ sizeof (EUrlEntryClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (EUrlEntry),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) init,
+ NULL /* value_table */
+ };
+
+ type = g_type_register_static (
+ GTK_TYPE_HBOX, "EUrlEntry", &type_info, 0);
+ }
+
+ return type;
}
static void
-class_init (EUrlEntryClass *klass)
+class_init (EUrlEntryClass *class)
{
- GtkObjectClass *object_class;
+ GObjectClass *object_class;
GtkWidgetClass *widget_class;
- object_class = GTK_OBJECT_CLASS (klass);
- widget_class = GTK_WIDGET_CLASS (klass);
-
- parent_class = g_type_class_ref(gtk_hbox_get_type ());
+ parent_class = g_type_class_peek_parent (class);
- object_class->destroy = destroy;
+ object_class = G_OBJECT_CLASS (class);
+ object_class->finalize = finalize;
+ widget_class = GTK_WIDGET_CLASS (class);
widget_class->mnemonic_activate = mnemonic_activate;
}
@@ -119,17 +119,17 @@ init (EUrlEntry *url_entry)
}
static void
-destroy (GtkObject *obj)
+finalize (GObject *object)
{
EUrlEntry *url_entry;
- url_entry = E_URL_ENTRY (obj);
+ url_entry = E_URL_ENTRY (object);
if (url_entry->priv) {
g_free (url_entry->priv);
url_entry->priv = NULL;
}
- GTK_OBJECT_CLASS (parent_class)->destroy (obj);
+ G_OBJECT_CLASS (parent_class)->finalize (object);
}
/* GtkWidget::mnemonic_activate() handler for the EUrlEntry */