comparison src/gtkblist.h @ 5422:af62169c74fd

[gaim-migrate @ 5801] Not to be too LSchieresque, but: <SeanEgan> Which should I do? Finish writing sorting code or commit sorting code? <Robot101> the latter, then the former. This is my incomplete buddy list sorting code. Sorting methods are modular, a plugin can add its own if it wanted to. Included are four sorting methods: None - this will be perceived as no sorting. It sorts the list in the order specified in blist.xml Alphabetical - duh. By status - this isn't really written yet, but I'm going to fix it right now. This will sort using idle time, away status, and online status when it's written By log file size - this puts the people you talk to the most at the top of your list. Pretty keen, eh? Of course this is replete with Sean Egan Hacks (TM). Now I'm going to go eat some weird "golden crunch" cereal from nestle. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Sun, 18 May 2003 03:41:31 +0000
parents 2c4188300aba
children 04e1e40b99b0
comparison
equal deleted inserted replaced
5421:7955274fa92b 5422:af62169c74fd
75 #define GAIM_GTK_BLIST(list) ((struct gaim_gtk_buddy_list *)(list)->ui_data) 75 #define GAIM_GTK_BLIST(list) ((struct gaim_gtk_buddy_list *)(list)->ui_data)
76 #define GAIM_IS_GTK_BLIST(list) \ 76 #define GAIM_IS_GTK_BLIST(list) \
77 ((list)->ui_ops == gaim_get_gtk_blist_ui_ops()) 77 ((list)->ui_ops == gaim_get_gtk_blist_ui_ops())
78 78
79 /************************************************************************** 79 /**************************************************************************
80 * @name GTK+ Conversation API 80 * @name GTK+ Buddy List API
81 **************************************************************************/ 81 **************************************************************************/
82 /** 82 /**
83 * Returns the UI operations structure for the buddy list. 83 * Returns the UI operations structure for the buddy list.
84 * 84 *
85 * @return The GTK list operations structure. 85 * @return The GTK list operations structure.
124 * Useful for the buddy ticker 124 * Useful for the buddy ticker
125 */ 125 */
126 GdkPixbuf *gaim_gtk_blist_get_status_icon(GaimBlistNode *node, 126 GdkPixbuf *gaim_gtk_blist_get_status_icon(GaimBlistNode *node,
127 GaimStatusIconSize size); 127 GaimStatusIconSize size);
128 128
129 /**************************************************************************
130 * @name GTK+ Buddy List sorting functions
131 **************************************************************************/
132
133 typedef GtkTreeIter (*gaim_gtk_blist_sort_function)(GaimBlistNode *new, struct gaim_buddy_list *blist, GtkTreeIter group, GtkTreeIter *cur);
134
135 extern GSList *gaim_gtk_blist_sort_methods;
136
137 struct gaim_gtk_blist_sort_method {
138 char *name;
139 gaim_gtk_blist_sort_function func;
140 };
141
142 /**
143 * Registers a buddy list sorting method.
144 *
145 * @param name The method's name.
146 * @param func A pointer to the function.
147 *
148 */
149 void gaim_gtk_blist_sort_method_reg(const char *name, gaim_gtk_blist_sort_function func);
150
151 /**
152 * Unregisters a buddy list sorting method.
153 *
154 * @param name The method's name
155 */
156 void gaim_gtk_blist_sort_method_unreg(const char *name);
157
158 /**
159 * Sets a buddy list sorting method.
160 *
161 * @param name The method's name.
162 */
163 void gaim_gtk_blist_sort_method_set(const char *name);
164
165 /**
166 * Sets up the programs default sort methods
167 */
168 void gaim_gtk_blist_setup_sort_methods();
169
170
171
129 #endif /* _GAIM_GTK_LIST_H_ */ 172 #endif /* _GAIM_GTK_LIST_H_ */