[empathy] Sort Gtalk after jabber
- From: Sjoerd Simons <sjoerds src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [empathy] Sort Gtalk after jabber
- Date: Mon, 31 Aug 2009 15:45:46 +0000 (UTC)
commit ffdee1a18641e764b04485417b96b0e21f50d9f0
Author: Sjoerd Simons <sjoerd simons collabora co uk>
Date: Mon Aug 31 15:49:38 2009 +0100
Sort Gtalk after jabber
libempathy-gtk/empathy-protocol-chooser.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/libempathy-gtk/empathy-protocol-chooser.c b/libempathy-gtk/empathy-protocol-chooser.c
index 7f2ca14..62fedaf 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]