Roster appearance patches

1 view
Skip to first unread message

Astro

unread,
Nov 9, 2007, 11:41:17 PM11/9/07
to icalk
Hi there

Geekr/Icalk looks promising. Gloox + Gtkmm was exactly was I had in
mind before I found your project. However, the road will be long &
hard. :-) I don't mean it personal, but documenting in chinese instead
of simple english may prevent potential contributors.

This patch removes the expanders from the roster treeview and sorts
buddies with equal status and groups alphabetically. I prefer a
compact roster, just like Gajim has. What do you think?


Stephan


Index: src/BuddyView.cpp
===================================================================
--- src/BuddyView.cpp (revision 220)
+++ src/BuddyView.cpp (working copy)
@@ -45,6 +45,7 @@
append_column("ICON", buddyColumns.icon);
//append_column("ID", buddyColumns.id);
//append_column("Name", buddyColumns.nickname);
+ set_show_expanders(false);

/*
Gtk::TreeView::Column * col =
Index: src/BuddyView.h
===================================================================
--- src/BuddyView.h (revision 220)
+++ src/BuddyView.h (working copy)
@@ -195,8 +195,14 @@
/** TreeView的排序函数*/
int on_sort_compare(const Gtk::TreeModel::iterator & a,
const Gtk::TreeModel::iterator & b) {
- int result =
- (*a)[buddyColumns.status] - (*b)[buddyColumns.status];
+ int result;
+ if ((result =
+ (*a)[buddyColumns.status] - (*b)[buddyColumns.status])
== 0);
+ {
+ Glib::ustring an = (*a)[buddyColumns.nickname];
+ Glib::ustring bn = (*b)[buddyColumns.nickname];
+ result = an.compare(bn);
+ }
// if( 0 == result)
// return (*a)[buddyColumns.id] - (*b)
[buddyColumns.id] ;
return result;

lerosua

unread,
Nov 10, 2007, 1:16:38 AM11/10/07
to ic...@googlegroups.com
thanks Astro, 

i had put  you patch into code.

the project  "icalk"   is my first programing soft.
originally ,  i hope do it as a chinese project, and work with
some chinese people. and my english not very good, so i write
document with chinese.
but no many people interest in jabber/xmpp in china.
now,  my job become a little busy. and my program skill is up to  litmited,
so i hope someone can join to the developer team.

the document is in chinese do really prevent someone who not speak chinese
, that is no my hope.  if someone speak english  join our develop , i will change
the document language.

the last.  if you are interest in it and have times. i hope you can join to us.


                                   lerosua

        

在07-11-10,Astro <as...@spaceboyz.net > 写道:
Reply all
Reply to author
Forward
0 new messages