aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-08-31 22:49:38 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-08-31 23:40:15 +0800
commitffdee1a18641e764b04485417b96b0e21f50d9f0 (patch)
tree91ad94a50514195106f9e198288f1f11ed44b649
parente4bddb2bcc2376056c9d24c634f8a30d31c047c1 (diff)
downloadgsoc2013-empathy-ffdee1a18641e764b04485417b96b0e21f50d9f0.tar
gsoc2013-empathy-ffdee1a18641e764b04485417b96b0e21f50d9f0.tar.gz
gsoc2013-empathy-ffdee1a18641e764b04485417b96b0e21f50d9f0.tar.bz2
gsoc2013-empathy-ffdee1a18641e764b04485417b96b0e21f50d9f0.tar.lz
gsoc2013-empathy-ffdee1a18641e764b04485417b96b0e21f50d9f0.tar.xz
gsoc2013-empathy-ffdee1a18641e764b04485417b96b0e21f50d9f0.tar.zst
gsoc2013-empathy-ffdee1a18641e764b04485417b96b0e21f50d9f0.zip
Sort Gtalk after jabber
-rw-r--r--libempathy-gtk/empathy-protocol-chooser.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-protocol-chooser.c b/libempathy-gtk/empathy-protocol-chooser.c
index 7f2ca147f..62fedaf69 100644
--- a/libempathy-gtk/empathy-protocol-chooser.c
+++ b/libempathy-gtk/empathy-protocol-chooser.c
@@ -126,6 +126,17 @@ protocol_chooser_sort_func (GtkTreeModel *model,
if (cmp == 0)
{
cmp = strcmp (protocol_a->name, protocol_b->name);
+ /* only happens for jabber where there is one entry for gtalk and one for
+ * non-gtalk */
+ if (cmp == 0)
+ {
+ gboolean is_gtalk;
+ gtk_tree_model_get (model, iter_a,
+ COL_IS_GTALK, &is_gtalk,
+ -1);
+
+ cmp = is_gtalk ? 1 : -1;
+ }
}
return cmp;