empathy r1350 - trunk/libempathy-gtk



Author: xclaesse
Date: Mon Aug 18 21:36:54 2008
New Revision: 1350
URL: http://svn.gnome.org/viewvc/empathy?rev=1350&view=rev

Log:
Do not display MSN Haze if butterfly is installed


Modified:
   trunk/libempathy-gtk/empathy-profile-chooser.c

Modified: trunk/libempathy-gtk/empathy-profile-chooser.c
==============================================================================
--- trunk/libempathy-gtk/empathy-profile-chooser.c	(original)
+++ trunk/libempathy-gtk/empathy-profile-chooser.c	Mon Aug 18 21:36:54 2008
@@ -124,6 +124,7 @@
 	GtkWidget       *combo_box;
 	GtkTreeIter      iter;
 	gboolean         iter_set = FALSE;
+	McManager       *btf_cm;
 
 	/* set up combo box with new store */
 	store = gtk_list_store_new (COL_COUNT,
@@ -146,10 +147,12 @@
 					"text", COL_LABEL,
 					NULL);
 
+	btf_cm = mc_manager_lookup ("butterfly");
 	profiles = mc_profiles_list ();
 	for (l = profiles; l; l = l->next) {
-		McProfile  *profile;
-		McProtocol *protocol;
+		McProfile   *profile;
+		McProtocol  *protocol;
+		const gchar *unique_name;
 
 		profile = l->data;
 
@@ -161,6 +164,12 @@
 		}
 		g_object_unref (protocol);
 
+		/* Skip MSN-Haze if we have butterfly */
+		unique_name = mc_profile_get_unique_name (profile);
+		if (btf_cm && strcmp (unique_name, "msn-haze") == 0) {
+			continue;
+		}
+
 		gtk_list_store_insert_with_values (store, &iter, 0,
 						   COL_ICON, mc_profile_get_icon_name (profile),
 						   COL_LABEL, mc_profile_get_display_name (profile),
@@ -168,6 +177,9 @@
 						   -1);
                 iter_set = TRUE;
 	}
+	if (btf_cm) {
+		g_object_unref (btf_cm);
+	}
 
 	/* Set the profile sort function */
 	gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE (store),



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