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



commit b5979aee286897c119d29646ed8e2cb00a0f57b2
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]