aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2003-01-26 12:04:52 +0800
committerChris Toshok <toshok@src.gnome.org>2003-01-26 12:04:52 +0800
commit9d51279acef224bb3087d8e0148ff4b8e9363303 (patch)
tree379c0ca33cd89d764e3e7b689777aa35c12d13a6 /e-util
parent3cf26e43e21a5c9c551332a1c687a157fbcd3e3c (diff)
downloadgsoc2013-evolution-9d51279acef224bb3087d8e0148ff4b8e9363303.tar
gsoc2013-evolution-9d51279acef224bb3087d8e0148ff4b8e9363303.tar.gz
gsoc2013-evolution-9d51279acef224bb3087d8e0148ff4b8e9363303.tar.bz2
gsoc2013-evolution-9d51279acef224bb3087d8e0148ff4b8e9363303.tar.lz
gsoc2013-evolution-9d51279acef224bb3087d8e0148ff4b8e9363303.tar.xz
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')
-rw-r--r--e-util/ChangeLog4
-rw-r--r--e-util/e-pilot-settings.c53
-rw-r--r--e-util/e-pilot-settings.h12
3 files changed, 35 insertions, 34 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index 5a800998ce..8aa4d7740e 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,7 @@
+2003-01-25 Chris Toshok <toshok@ximian.com>
+
+ * e-pilot-settings.[ch]: GObjectify this.
+
2003-01-24 Hans Petter Jansson <hpj@ximian.com>
* e-categories-config.c (initialize_categories_config): Enable
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
diff --git a/e-util/e-pilot-settings.h b/e-util/e-pilot-settings.h
index 295977c406..908f9e1836 100644
--- a/e-util/e-pilot-settings.h
+++ b/e-util/e-pilot-settings.h
@@ -28,7 +28,7 @@
#include <config.h>
#endif
-#include <gnome.h>
+#include <gtk/gtk.h>
#ifdef __cplusplus
extern "C" {
@@ -36,10 +36,10 @@ extern "C" {
#endif /* __cplusplus */
#define E_TYPE_PILOT_SETTINGS (e_pilot_settings_get_type ())
-#define E_PILOT_SETTINGS(obj) (GTK_CHECK_CAST ((obj), E_TYPE_PILOT_SETTINGS, EPilotSettings))
-#define E_PILOT_SETTINGS_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_PILOT_SETTINGS, EPilotSettingsClass))
-#define E_IS_PILOT_SETTINGS(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_PILOT_SETTINGS))
-#define E_IS_PILOT_SETTINGS_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_PILOT_SETTINGS))
+#define E_PILOT_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_PILOT_SETTINGS, EPilotSettings))
+#define E_PILOT_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_PILOT_SETTINGS, EPilotSettingsClass))
+#define E_IS_PILOT_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_PILOT_SETTINGS))
+#define E_IS_PILOT_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_PILOT_SETTINGS))
typedef struct _EPilotSettings EPilotSettings;
@@ -60,7 +60,7 @@ struct _EPilotSettingsClass {
};
-GtkType e_pilot_settings_get_type (void);
+GType e_pilot_settings_get_type (void);
GtkWidget *e_pilot_settings_new (void);
gboolean e_pilot_settings_get_secret (EPilotSettings *ps);