[gnome-pilot/dbus] Bug #594214: Remove GtkType and gtk_type_unique modified: capplet/gnome-pilot-assistant.c modif
- From: Matthew Charles Davey <mcdavey src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-pilot/dbus] Bug #594214: Remove GtkType and gtk_type_unique modified: capplet/gnome-pilot-assistant.c modif
- Date: Sun, 8 Aug 2010 13:03:57 +0000 (UTC)
commit 5b0439b402a6cc32420da9f7f20102363c254850
Author: Matt Davey <mcdavey mrao cam ac uk>
Date: Sat Aug 7 15:12:35 2010 +0100
Bug #594214: Remove GtkType and gtk_type_unique
modified: capplet/gnome-pilot-assistant.c
modified: capplet/gnome-pilot-assistant.h
modified: capplet/gnome-pilot-cdialog.c
modified: capplet/gnome-pilot-cdialog.h
modified: capplet/gnome-pilot-ddialog.c
modified: capplet/gnome-pilot-ddialog.h
modified: capplet/gnome-pilot-pdialog.c
modified: capplet/gnome-pilot-pdialog.h
modified: gpilotd/gnome-pilot-conduit-standard-abs.c
modified: gpilotd/gnome-pilot-conduit-standard-abs.h
modified: gpilotd/gnome-pilot-conduit-sync-abs.c
modified: gpilotd/gnome-pilot-conduit-sync-abs.h
capplet/gnome-pilot-assistant.c | 25 +++++++++++++------------
capplet/gnome-pilot-assistant.h | 2 +-
capplet/gnome-pilot-cdialog.c | 25 ++++++++++++-------------
capplet/gnome-pilot-cdialog.h | 2 +-
capplet/gnome-pilot-ddialog.c | 24 ++++++++++++------------
capplet/gnome-pilot-ddialog.h | 2 +-
capplet/gnome-pilot-pdialog.c | 24 ++++++++++++------------
capplet/gnome-pilot-pdialog.h | 2 +-
gpilotd/gnome-pilot-conduit-standard-abs.c | 25 ++++++++++++++-----------
gpilotd/gnome-pilot-conduit-standard-abs.h | 2 +-
gpilotd/gnome-pilot-conduit-sync-abs.c | 26 ++++++++++++++------------
gpilotd/gnome-pilot-conduit-sync-abs.h | 2 +-
12 files changed, 83 insertions(+), 78 deletions(-)
---
diff --git a/capplet/gnome-pilot-assistant.c b/capplet/gnome-pilot-assistant.c
index c26c38c..48afbc0 100644
--- a/capplet/gnome-pilot-assistant.c
+++ b/capplet/gnome-pilot-assistant.c
@@ -136,26 +136,27 @@ static void gpd_system_info_requested (GnomePilotClient *gpc,
static void gpd_destroy (GtkObject *object);
-GtkType
+GType
gnome_pilot_assistant_get_type (void)
{
- static GtkType type = 0;
+ static GType type = 0;
if (type == 0)
{
- static const GtkTypeInfo info =
+ static const GTypeInfo info =
{
- "GnomePilotAssistant",
- sizeof (GnomePilotAssistant),
sizeof (GnomePilotAssistantClass),
- (GtkClassInitFunc) class_init,
- (GtkObjectInitFunc) init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
+ NULL,
+ NULL,
+ (GClassInitFunc) class_init,
+ NULL,
+ NULL,
+ sizeof (GnomePilotAssistant),
+ 0,
+ (GInstanceInitFunc) init,
};
-
- type = gtk_type_unique (gtk_object_get_type (), &info);
+
+ type = g_type_register_static (gtk_object_get_type (), "GnomePilotAssistant", &info, 0);
}
return type;
diff --git a/capplet/gnome-pilot-assistant.h b/capplet/gnome-pilot-assistant.h
index 36a47f5..e8223fd 100644
--- a/capplet/gnome-pilot-assistant.h
+++ b/capplet/gnome-pilot-assistant.h
@@ -63,7 +63,7 @@ struct _GnomePilotAssistantClass {
};
-GtkType gnome_pilot_assistant_get_type (void);
+GType gnome_pilot_assistant_get_type (void);
GtkObject *gnome_pilot_assistant_new (GnomePilotClient *gpc);
gboolean gnome_pilot_assistant_run_and_close (GnomePilotAssistant *gpd);
diff --git a/capplet/gnome-pilot-cdialog.c b/capplet/gnome-pilot-cdialog.c
index e3f962c..f324ea7 100644
--- a/capplet/gnome-pilot-cdialog.c
+++ b/capplet/gnome-pilot-cdialog.c
@@ -61,26 +61,27 @@ static void gpcd_action_activated (GtkWidget *widget, gpointer user_data);
static void gpcd_destroy (GtkObject *object);
-GtkType
+GType
gnome_pilot_cdialog_get_type (void)
{
- static GtkType type = 0;
+ static GType type = 0;
if (type == 0)
{
- static const GtkTypeInfo info =
+ static const GTypeInfo info =
{
- "GnomePilotCDialog",
- sizeof (GnomePilotCDialog),
sizeof (GnomePilotCDialogClass),
- (GtkClassInitFunc) class_init,
- (GtkObjectInitFunc) init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
+ NULL,
+ NULL,
+ (GClassInitFunc) class_init,
+ NULL,
+ NULL,
+ sizeof (GnomePilotCDialog),
+ 0,
+ (GInstanceInitFunc) init,
};
- type = gtk_type_unique (gtk_object_get_type (), &info);
+ type = g_type_register_static (gtk_object_get_type (), "GnomePilotCDialog", &info, 0);
}
return type;
@@ -178,8 +179,6 @@ static void
init_widgets (GnomePilotCDialog *gpcd)
{
GnomePilotCDialogPrivate *priv;
- GtkWidget *combo;
- GList *l;
priv = gpcd->priv;
diff --git a/capplet/gnome-pilot-cdialog.h b/capplet/gnome-pilot-cdialog.h
index 20f9a26..25f3c0b 100644
--- a/capplet/gnome-pilot-cdialog.h
+++ b/capplet/gnome-pilot-cdialog.h
@@ -54,7 +54,7 @@ struct _GnomePilotCDialogClass {
};
-GtkType gnome_pilot_cdialog_get_type (void);
+GType gnome_pilot_cdialog_get_type (void);
GtkObject *gnome_pilot_cdialog_new (ConduitState *state);
GnomePilotConduitSyncType gnome_pilot_cdialog_first_sync_type (GnomePilotCDialog *gpcd);
diff --git a/capplet/gnome-pilot-ddialog.c b/capplet/gnome-pilot-ddialog.c
index c149513..b7a3704 100644
--- a/capplet/gnome-pilot-ddialog.c
+++ b/capplet/gnome-pilot-ddialog.c
@@ -74,26 +74,26 @@ static void set_widget_visibility_by_type(GnomePilotDDialog *gpdd, int type);
static void network_device_toggled_callback (GtkRadioButton *btn,
void *data);
-GtkType
+GType
gnome_pilot_ddialog_get_type (void)
{
- static GtkType type = 0;
+ static GType type = 0;
if (type == 0)
{
- static const GtkTypeInfo info =
+ static const GTypeInfo info =
{
- "GnomePilotDDialog",
- sizeof (GnomePilotDDialog),
sizeof (GnomePilotDDialogClass),
- (GtkClassInitFunc) class_init,
- (GtkObjectInitFunc) init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
+ NULL,
+ NULL,
+ (GClassInitFunc) class_init,
+ NULL,
+ NULL,
+ sizeof (GnomePilotDDialog),
+ 0,
+ (GInstanceInitFunc) init,
};
-
- type = gtk_type_unique (gtk_object_get_type (), &info);
+ type = g_type_register_static (gtk_object_get_type (), "GnomePilotDDialog", &info, 0);
}
return type;
diff --git a/capplet/gnome-pilot-ddialog.h b/capplet/gnome-pilot-ddialog.h
index 1ccc283..94abc74 100644
--- a/capplet/gnome-pilot-ddialog.h
+++ b/capplet/gnome-pilot-ddialog.h
@@ -54,7 +54,7 @@ struct _GnomePilotDDialogClass {
};
-GtkType gnome_pilot_ddialog_get_type (void);
+GType gnome_pilot_ddialog_get_type (void);
GtkObject *gnome_pilot_ddialog_new (GPilotDevice *device);
gboolean gnome_pilot_ddialog_run_and_close (GnomePilotDDialog *gppd, GtkWindow *parent);
diff --git a/capplet/gnome-pilot-pdialog.c b/capplet/gnome-pilot-pdialog.c
index 0dde650..851c933 100644
--- a/capplet/gnome-pilot-pdialog.c
+++ b/capplet/gnome-pilot-pdialog.c
@@ -92,26 +92,26 @@ static void gppd_system_info_requested (GnomePilotClient *gpc,
static void gppd_destroy (GtkObject *object);
-GtkType
+GType
gnome_pilot_pdialog_get_type (void)
{
- static GtkType type = 0;
+ static GType type = 0;
if (type == 0)
{
- static const GtkTypeInfo info =
+ static const GTypeInfo info =
{
- "GnomePilotPDialog",
- sizeof (GnomePilotPDialog),
sizeof (GnomePilotPDialogClass),
- (GtkClassInitFunc) class_init,
- (GtkObjectInitFunc) init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
+ NULL,
+ NULL,
+ (GClassInitFunc) class_init,
+ NULL,
+ NULL,
+ sizeof (GnomePilotPDialog),
+ 0,
+ (GInstanceInitFunc) init,
};
-
- type = gtk_type_unique (gtk_object_get_type (), &info);
+ type = g_type_register_static (gtk_object_get_type (), "GnomePilotPDialog", &info, 0);
}
return type;
diff --git a/capplet/gnome-pilot-pdialog.h b/capplet/gnome-pilot-pdialog.h
index d50c7f5..c951b48 100644
--- a/capplet/gnome-pilot-pdialog.h
+++ b/capplet/gnome-pilot-pdialog.h
@@ -54,7 +54,7 @@ struct _GnomePilotPDialogClass {
};
-GtkType gnome_pilot_pdialog_get_type (void);
+GType gnome_pilot_pdialog_get_type (void);
GtkObject *gnome_pilot_pdialog_new (GnomePilotClient *gpc, PilotState *state, GPilotPilot *pilot);
void gnome_pilot_pdialog_set_pilot (GtkObject *obj, GPilotPilot *pilot);
gboolean gnome_pilot_pdialog_run_and_close (GnomePilotPDialog *gppd, GtkWindow *dialog);
diff --git a/gpilotd/gnome-pilot-conduit-standard-abs.c b/gpilotd/gnome-pilot-conduit-standard-abs.c
index 750b0ae..dc9694a 100644
--- a/gpilotd/gnome-pilot-conduit-standard-abs.c
+++ b/gpilotd/gnome-pilot-conduit-standard-abs.c
@@ -178,26 +178,29 @@ void standard_abs_close_db_and_purge_local(GnomePilotConduitStandardAbs*,GnomePi
static GnomePilotConduitStandardClass *parent_class = NULL;
static guint pilot_conduit_standard_abs_signals[LAST_SIGNAL] = { 0 };
-GtkType
+GType
gnome_pilot_conduit_standard_abs_get_type (void)
{
- static GtkType pilot_conduit_standard_abs_type = 0;
+ static GType pilot_conduit_standard_abs_type = 0;
if (!pilot_conduit_standard_abs_type)
{
- static const GtkTypeInfo pilot_conduit_standard_abs_info =
+ static const GTypeInfo pilot_conduit_standard_abs_info =
{
- "GnomePilotConduitStandardAbs",
- sizeof (GnomePilotConduitStandardAbs),
sizeof (GnomePilotConduitStandardAbsClass),
- (GtkClassInitFunc) gnome_pilot_conduit_standard_abs_class_init,
- (GtkObjectInitFunc) gnome_pilot_conduit_standard_abs_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
+ NULL,
+ NULL,
+ (GClassInitFunc) gnome_pilot_conduit_standard_abs_class_init,
+ NULL,
+ NULL,
+ sizeof (GnomePilotConduitStandardAbs),
+ 0,
+ (GInstanceInitFunc) gnome_pilot_conduit_standard_abs_init,
};
- pilot_conduit_standard_abs_type = gtk_type_unique (gnome_pilot_conduit_standard_get_type (), &pilot_conduit_standard_abs_info);
+ pilot_conduit_standard_abs_type = g_type_register_static (
+ gnome_pilot_conduit_standard_get_type (),
+ "GnomePilotConduitStandardAbs", &pilot_conduit_standard_abs_info, 0);
}
return pilot_conduit_standard_abs_type;
diff --git a/gpilotd/gnome-pilot-conduit-standard-abs.h b/gpilotd/gnome-pilot-conduit-standard-abs.h
index af59822..2bd7823 100644
--- a/gpilotd/gnome-pilot-conduit-standard-abs.h
+++ b/gpilotd/gnome-pilot-conduit-standard-abs.h
@@ -142,7 +142,7 @@ struct _GnomePilotConduitStandardAbsClass
GnomePilotDBInfo *dbinfo);
};
-GtkType gnome_pilot_conduit_standard_abs_get_type (void);
+GType gnome_pilot_conduit_standard_abs_get_type (void);
GtkObject *gnome_pilot_conduit_standard_abs_new (char *db_name,
guint32 creator_id);
gint gnome_pilot_conduit_standard_abs_match_record (GnomePilotConduitStandardAbs *conduit,
diff --git a/gpilotd/gnome-pilot-conduit-sync-abs.c b/gpilotd/gnome-pilot-conduit-sync-abs.c
index 9337132..ceeab72 100644
--- a/gpilotd/gnome-pilot-conduit-sync-abs.c
+++ b/gpilotd/gnome-pilot-conduit-sync-abs.c
@@ -101,26 +101,28 @@ static gboolean gpilot_sync_pc_match (GnomePilotDBInfo *);
static GnomePilotConduitStandardClass *parent_class = NULL;
static guint pilot_conduit_sync_abs_signals[LAST_SIGNAL] = { 0 };
-GtkType
+GType
gnome_pilot_conduit_sync_abs_get_type (void)
{
- static GtkType pilot_conduit_sync_abs_type = 0;
+ static GType pilot_conduit_sync_abs_type = 0;
if (!pilot_conduit_sync_abs_type)
{
- static const GtkTypeInfo pilot_conduit_sync_abs_info =
+ static const GTypeInfo pilot_conduit_sync_abs_info =
{
- "GnomePilotConduitSyncAbs",
- sizeof (GnomePilotConduitSyncAbs),
sizeof (GnomePilotConduitSyncAbsClass),
- (GtkClassInitFunc) gnome_pilot_conduit_sync_abs_class_init,
- (GtkObjectInitFunc) gnome_pilot_conduit_sync_abs_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
+ NULL,
+ NULL,
+ (GClassInitFunc) gnome_pilot_conduit_sync_abs_class_init,
+ NULL,
+ NULL,
+ sizeof (GnomePilotConduitSyncAbs),
+ 0,
+ (GInstanceInitFunc) gnome_pilot_conduit_sync_abs_init,
};
-
- pilot_conduit_sync_abs_type = gtk_type_unique (gnome_pilot_conduit_standard_get_type (), &pilot_conduit_sync_abs_info);
+ pilot_conduit_sync_abs_type = g_type_register_static (
+ gnome_pilot_conduit_standard_get_type (),
+ "GnomePilotConduitSyncAbs", &pilot_conduit_sync_abs_info, 0);
}
return pilot_conduit_sync_abs_type;
diff --git a/gpilotd/gnome-pilot-conduit-sync-abs.h b/gpilotd/gnome-pilot-conduit-sync-abs.h
index 548c0d4..cbb2113 100644
--- a/gpilotd/gnome-pilot-conduit-sync-abs.h
+++ b/gpilotd/gnome-pilot-conduit-sync-abs.h
@@ -141,7 +141,7 @@ struct _GnomePilotConduitSyncAbsClass
GnomePilotRecord *pr);
};
-GtkType gnome_pilot_conduit_sync_abs_get_type (void);
+GType gnome_pilot_conduit_sync_abs_get_type (void);
GtkObject *gnome_pilot_conduit_sync_abs_new (char *db_name,
guint32 creator_id);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]