comparison src/conversation.h @ 11454:201617d49573

[gaim-migrate @ 13693] This commit includes a number of changes: 1. Aliases are now used consistently in chats. If the prpl uses unique screen names for chats (e.g. Jabber), then aliases are not used at all. 2. The chat list is now colorized to match the colors used in the chat itself. 3. Buddies are bolded in the chat user list. 4. Buddies are sorted above non-buddies in the chat user list. 5. The chat user list is ellipsized when possible (i.e. on GTK+ 2.6.0 or above). 6. I've accepted patch #1178248, by Matt Amato to add "buddy-added" and "buddy-removed" signals. These were used in my implementation of #3 and #4, to update the GUI when users are added or removed from the buddy list. 7. I've added a "blist-node-aliased" signal that is emitted when a buddy, contact, or chat is aliased. 8. Since it was hard to separate and I need it at some point, I'm letting it slip in... I've changed GaimConversation.log to be a GList named logs. This way, we can have multiple logs for a single conversation. This will be necessary to implement unnamed chat logging in some reasonable fasion (see my notes in the TODO file). committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Tue, 06 Sep 2005 03:04:07 +0000
parents 17142948653e
children 16b0da1f376f
comparison
equal deleted inserted replaced
11453:d446fcc2c63b 11454:201617d49573
182 const char *message, GaimMessageFlags flags, 182 const char *message, GaimMessageFlags flags,
183 time_t mtime); 183 time_t mtime);
184 void (*write_im)(GaimConversation *conv, const char *who, 184 void (*write_im)(GaimConversation *conv, const char *who,
185 const char *message, GaimMessageFlags flags, 185 const char *message, GaimMessageFlags flags,
186 time_t mtime); 186 time_t mtime);
187 void (*write_conv)(GaimConversation *conv, const char *who, 187 void (*write_conv)(GaimConversation *conv, const char *name, const char *alias,
188 const char *message, GaimMessageFlags flags, 188 const char *message, GaimMessageFlags flags,
189 time_t mtime); 189 time_t mtime);
190 190
191 void (*chat_add_user)(GaimConversation *conv, const char *user, gboolean new_arrival); 191 void (*chat_add_users)(GaimConversation *conv, GList *users, GList *aliases);
192 void (*chat_add_users)(GaimConversation *conv, GList *users);
193 void (*chat_rename_user)(GaimConversation *conv, 192 void (*chat_rename_user)(GaimConversation *conv,
194 const char *old_name, const char *new_name); 193 const char *old_name, const char *new_name);
195 void (*chat_remove_user)(GaimConversation *conv, const char *user); 194 void (*chat_remove_user)(GaimConversation *conv, const char *user);
196 void (*chat_remove_users)(GaimConversation *conv, GList *users); 195 void (*chat_remove_users)(GaimConversation *conv, GList *users);
197 void (*chat_update_user)(GaimConversation *conv, const char *user); 196 void (*chat_update_user)(GaimConversation *conv, const char *user);
203 /* Custom Smileys */ 202 /* Custom Smileys */
204 gboolean (*custom_smiley_add)(GaimConversation *conv, const char *smile); 203 gboolean (*custom_smiley_add)(GaimConversation *conv, const char *smile);
205 void (*custom_smiley_write)(GaimConversation *conv, const char *smile, 204 void (*custom_smiley_write)(GaimConversation *conv, const char *smile,
206 const guchar *data, gsize size); 205 const guchar *data, gsize size);
207 void (*custom_smiley_close)(GaimConversation *conv, const char *smile); 206 void (*custom_smiley_close)(GaimConversation *conv, const char *smile);
208
209
210 207
211 /* Events */ 208 /* Events */
212 void (*updated)(GaimConversation *conv, GaimConvUpdateType type); 209 void (*updated)(GaimConversation *conv, GaimConvUpdateType type);
213 210
214 }; 211 };
285 char *name; /**< The name of the conversation. */ 282 char *name; /**< The name of the conversation. */
286 char *title; /**< The window title. */ 283 char *title; /**< The window title. */
287 284
288 gboolean logging; /**< The status of logging. */ 285 gboolean logging; /**< The status of logging. */
289 286
290 GaimLog *log; /**< This conversation's log */ 287 GList *logs; /**< This conversation's logs */
291 288
292 GList *send_history; /**< The send history. */ 289 GList *send_history; /**< The send history. */
293 290
294 GaimUnseenState unseen; /**< The unseen tab state. */ 291 GaimUnseenState unseen; /**< The unseen tab state. */
295 292
1206 gboolean new_arrival); 1203 gboolean new_arrival);
1207 1204
1208 /** 1205 /**
1209 * Adds a list of users to a chat. 1206 * Adds a list of users to a chat.
1210 * 1207 *
1211 * The data is copied from @a users, so it is up to the developer to 1208 * The data is copied from @a users, @a extra_msgs, and @a flags, so it is up to
1212 * free this list after calling this function. 1209 * the caller to free this list after calling this function.
1213 * 1210 *
1214 * @param chat The chat. 1211 * @param chat The chat.
1215 * @param users The list of users to add. 1212 * @param users The list of users to add.
1216 * @param flags The list of flags for each user. 1213 * @param extra_msgs An extra message to display with the join message for each
1217 */ 1214 * user. This list may be shorter than @a users, in which
1218 void gaim_conv_chat_add_users(GaimConvChat *chat, GList *users, GList *flags); 1215 * case, the users after the end of extra_msgs will not have
1216 * an extra message. By extension, this means that extra_msgs
1217 * can simply be @c NULL and none of the users will have an
1218 * extra message.
1219 * @param flags The list of flags for each user.
1220 * @param new_arrivals Decides whether or not to show join notices.
1221 */
1222 void gaim_conv_chat_add_users(GaimConvChat *chat, GList *users, GList *extra_msgs,
1223 GList *flags, gboolean new_arrivals);
1219 1224
1220 /** 1225 /**
1221 * Renames a user in a chat. 1226 * Renames a user in a chat.
1222 * 1227 *
1223 * @param chat The chat. 1228 * @param chat The chat.