]> git.0d.be Git - empathy.git/commitdiff
Sort Gtalk after jabber
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>
Mon, 31 Aug 2009 14:49:38 +0000 (15:49 +0100)
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>
Mon, 31 Aug 2009 15:40:15 +0000 (16:40 +0100)
libempathy-gtk/empathy-protocol-chooser.c

index 7f2ca147f95ec245a040ed1df7faab0ccf281561..62fedaf69139ce93c992141a2697b133f4e98791 100644 (file)
@@ -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;