[gnome-pilot/GNOME_PILOT_2_32: 22/28] Fix #644319. Use g_type_from_name() to avoid registering settings object twice.



commit 354d83e9424ef563a7a5e50b2ff3549af3e6b6fe
Author: Matt Davey <mcdavey mrao cam ac uk>
Date:   Sun Mar 20 20:38:04 2011 +0000

    Fix #644319.  Use g_type_from_name() to avoid registering settings object twice.
    
    The evolution conduits were using a static variable to cache the g_type
    registered for the settings window.  This caused trouble if two different
    evolution conduits were configured, because they each had their own
    static variable.  Fix this by checking with g_type_from_name() whether
    the type has already been registered.

 conduits/evolution-data-server/e-pilot-settings.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/conduits/evolution-data-server/e-pilot-settings.c b/conduits/evolution-data-server/e-pilot-settings.c
index e2b9089..0ab0b58 100644
--- a/conduits/evolution-data-server/e-pilot-settings.c
+++ b/conduits/evolution-data-server/e-pilot-settings.c
@@ -45,7 +45,7 @@ static GObjectClass *parent_class = NULL;
 GType
 e_pilot_settings_get_type (void)
 {
-	static GType type = 0;
+	static GType type = g_type_from_name ("EPilotSettings");
 
 	if (!type) {
 		static GTypeInfo info = {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]