diff options
author | Chris Toshok <toshok@ximian.com> | 2003-01-26 12:04:52 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2003-01-26 12:04:52 +0800 |
commit | 9d51279acef224bb3087d8e0148ff4b8e9363303 (patch) | |
tree | 379c0ca33cd89d764e3e7b689777aa35c12d13a6 /e-util/e-pilot-settings.c | |
parent | 3cf26e43e21a5c9c551332a1c687a157fbcd3e3c (diff) | |
download | gsoc2013-evolution-9d51279acef224bb3087d8e0148ff4b8e9363303.tar.gz gsoc2013-evolution-9d51279acef224bb3087d8e0148ff4b8e9363303.tar.zst gsoc2013-evolution-9d51279acef224bb3087d8e0148ff4b8e9363303.zip |
GObjectify this.
2003-01-25 Chris Toshok <toshok@ximian.com>
* e-pilot-settings.[ch]: GObjectify this.
svn path=/trunk/; revision=19629
Diffstat (limited to 'e-util/e-pilot-settings.c')
-rw-r--r-- | e-util/e-pilot-settings.c | 53 |
1 files changed, 25 insertions, 28 deletions
diff --git a/e-util/e-pilot-settings.c b/e-util/e-pilot-settings.c index 4b5c55ebca..9eed8a9f79 100644 --- a/e-util/e-pilot-settings.c +++ b/e-util/e-pilot-settings.c @@ -25,7 +25,8 @@ #include <config.h> #endif -#include <gnome.h> +#include <gtk/gtk.h> +#include <libgnome/gnome-i18n.h> #include "e-pilot-settings.h" struct _EPilotSettingsPrivate @@ -39,43 +40,39 @@ struct _EPilotSettingsPrivate static void class_init (EPilotSettingsClass *klass); static void init (EPilotSettings *ps); -static GtkObjectClass *parent_class = NULL; +static GObjectClass *parent_class = NULL; -GtkType +GType e_pilot_settings_get_type (void) { - static GtkType type = 0; - - if (type == 0) - { - static const GtkTypeInfo info = - { - "EPilotSettings", - sizeof (EPilotSettings), - sizeof (EPilotSettingsClass), - (GtkClassInitFunc) class_init, - (GtkObjectInitFunc) init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL, - }; - - type = gtk_type_unique (gtk_table_get_type (), &info); - } - - return type; + static GType type = 0; + + if (!type) { + static GTypeInfo info = { + sizeof (EPilotSettingsClass), + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, + (GClassInitFunc) class_init, + NULL, NULL, + sizeof (EPilotSettings), + 0, + (GInstanceInitFunc) init + }; + type = g_type_register_static (GTK_TYPE_TABLE, "EPilotSettings", &info, 0); + } + + return type; } static void class_init (EPilotSettingsClass *klass) { - GtkObjectClass *object_class; + GObjectClass *object_class; - object_class = GTK_OBJECT_CLASS (klass); - - parent_class = gtk_type_class (gtk_table_get_type ()); + object_class = G_OBJECT_CLASS (klass); + parent_class = g_type_class_ref (GTK_TYPE_TABLE); } @@ -117,7 +114,7 @@ init (EPilotSettings *ps) GtkWidget * e_pilot_settings_new (void) { - return gtk_type_new (E_TYPE_PILOT_SETTINGS); + return g_object_new (E_TYPE_PILOT_SETTINGS, NULL); } gboolean |