aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-profile-chooser.c
diff options
context:
space:
mode:
authorxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2007-07-29 05:18:38 +0800
committerxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2007-07-29 05:18:38 +0800
commit662ceba82a0c6585da90db6b49ab420f1fe6d872 (patch)
treed823000d835a909c2b3148ccbb878f1801ea0c65 /libempathy-gtk/empathy-profile-chooser.c
parentb6eacea820d31caf9d7604229bee7a0ddcdc9a70 (diff)
downloadgsoc2013-empathy-662ceba82a0c6585da90db6b49ab420f1fe6d872.tar
gsoc2013-empathy-662ceba82a0c6585da90db6b49ab420f1fe6d872.tar.gz
gsoc2013-empathy-662ceba82a0c6585da90db6b49ab420f1fe6d872.tar.bz2
gsoc2013-empathy-662ceba82a0c6585da90db6b49ab420f1fe6d872.tar.lz
gsoc2013-empathy-662ceba82a0c6585da90db6b49ab420f1fe6d872.tar.xz
gsoc2013-empathy-662ceba82a0c6585da90db6b49ab420f1fe6d872.tar.zst
gsoc2013-empathy-662ceba82a0c6585da90db6b49ab420f1fe6d872.zip
2007-07-28 Xavier Claessens <xclaesse@gmail.com>
* libempathy-gtk/empathy-profile-chooser.c: Makes easier to change to profile order. git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@210 4ee84921-47dd-4033-b63a-18d7a039a3e4
Diffstat (limited to 'libempathy-gtk/empathy-profile-chooser.c')
-rw-r--r--libempathy-gtk/empathy-profile-chooser.c31
1 files changed, 13 insertions, 18 deletions
diff --git a/libempathy-gtk/empathy-profile-chooser.c b/libempathy-gtk/empathy-profile-chooser.c
index a03da1750..f1d508ffc 100644
--- a/libempathy-gtk/empathy-profile-chooser.c
+++ b/libempathy-gtk/empathy-profile-chooser.c
@@ -55,26 +55,21 @@ empathy_profile_chooser_get_selected (GtkWidget *widget)
static gint
profile_chooser_sort_profile_value (McProfile *profile)
{
- const gchar *name;
-
- name = mc_profile_get_unique_name (profile);
-
- /* Jabber is the prefered protocol, salut is a free protocol so it
- * should be at the begining of the list, and google talk uses the
- * free jabber protocol so it gets the 3rd place.
- * FIXME: Add other free protocols in this list.
- */
- if (strcmp (name, "jabber") == 0) {
- return 0;
- }
- else if (strcmp (name, "salut") == 0) {
- return 1;
- }
- else if (strcmp (name, "gtalk") == 0) {
- return 2;
+ guint i;
+ const gchar *profile_name;
+ const gchar *names[] = {"jabber",
+ "salut",
+ "gtalk"};
+
+ profile_name = mc_profile_get_unique_name (profile);
+
+ for (i = 0 ; i < G_N_ELEMENTS (names); i++) {
+ if (strcmp (profile_name, names[i]) == 0) {
+ return i;
+ }
}
- return 3;
+ return i;
}
static gint