Mercurial > pidgin.yaz
comparison pidgin/gtkconv.c @ 18114:873ee0038752
merge of 'd8c7c08339ae468cb4298f6850eb7d3b760ad7b5'
and 'ed8b5b74cff83943994bc055c40b107e04e87249'
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sat, 16 Jun 2007 19:00:52 +0000 |
parents | 0b3d6ea61760 926ccb104da0 |
children | 59aec2d6ec43 |
comparison
equal
deleted
inserted
replaced
18104:e4d21d4dfcca | 18114:873ee0038752 |
---|---|
2674 pidgin_conversations_find_unseen_list(PurpleConversationType type, | 2674 pidgin_conversations_find_unseen_list(PurpleConversationType type, |
2675 PidginUnseenState min_state, | 2675 PidginUnseenState min_state, |
2676 gboolean hidden_only, | 2676 gboolean hidden_only, |
2677 guint max_count) | 2677 guint max_count) |
2678 { | 2678 { |
2679 const GList *l; | 2679 GList *l; |
2680 GList *r = NULL; | 2680 GList *r = NULL; |
2681 guint c = 0; | 2681 guint c = 0; |
2682 | 2682 |
2683 if (type == PURPLE_CONV_TYPE_IM) { | 2683 if (type == PURPLE_CONV_TYPE_IM) { |
2684 l = purple_get_ims(); | 2684 l = purple_get_ims(); |
3800 &matches, TRUE, l->data); | 3800 &matches, TRUE, l->data); |
3801 } | 3801 } |
3802 g_list_free(list); | 3802 g_list_free(list); |
3803 } else if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT) { | 3803 } else if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT) { |
3804 PurpleConvChat *chat = PURPLE_CONV_CHAT(conv); | 3804 PurpleConvChat *chat = PURPLE_CONV_CHAT(conv); |
3805 const GList *l = purple_conv_chat_get_users(chat); | 3805 GList *l = purple_conv_chat_get_users(chat); |
3806 GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(PIDGIN_CONVERSATION(conv)->u.chat->list)); | 3806 GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(PIDGIN_CONVERSATION(conv)->u.chat->list)); |
3807 GtkTreeIter iter; | 3807 GtkTreeIter iter; |
3808 int f; | 3808 int f; |
3809 | 3809 |
3810 /* Users */ | 3810 /* Users */ |
5394 | 5394 |
5395 chat = PURPLE_CONV_CHAT(conv); | 5395 chat = PURPLE_CONV_CHAT(conv); |
5396 gtkconv = PIDGIN_CONVERSATION(conv); | 5396 gtkconv = PIDGIN_CONVERSATION(conv); |
5397 gtkchat = gtkconv->u.chat; | 5397 gtkchat = gtkconv->u.chat; |
5398 | 5398 |
5399 num_users = g_list_length((GList *)purple_conv_chat_get_users(chat)); | 5399 num_users = g_list_length(purple_conv_chat_get_users(chat)); |
5400 | 5400 |
5401 g_snprintf(tmp, sizeof(tmp), | 5401 g_snprintf(tmp, sizeof(tmp), |
5402 ngettext("%d person in room", "%d people in room", | 5402 ngettext("%d person in room", "%d people in room", |
5403 num_users), | 5403 num_users), |
5404 num_users); | 5404 num_users); |
5488 | 5488 |
5489 chat = PURPLE_CONV_CHAT(conv); | 5489 chat = PURPLE_CONV_CHAT(conv); |
5490 gtkconv = PIDGIN_CONVERSATION(conv); | 5490 gtkconv = PIDGIN_CONVERSATION(conv); |
5491 gtkchat = gtkconv->u.chat; | 5491 gtkchat = gtkconv->u.chat; |
5492 | 5492 |
5493 num_users = g_list_length((GList *)purple_conv_chat_get_users(chat)); | 5493 num_users = g_list_length(purple_conv_chat_get_users(chat)); |
5494 | 5494 |
5495 for (l = users; l != NULL; l = l->next) { | 5495 for (l = users; l != NULL; l = l->next) { |
5496 model = gtk_tree_view_get_model(GTK_TREE_VIEW(gtkchat->list)); | 5496 model = gtk_tree_view_get_model(GTK_TREE_VIEW(gtkchat->list)); |
5497 | 5497 |
5498 if (!gtk_tree_model_get_iter_first(GTK_TREE_MODEL(model), &iter)) | 5498 if (!gtk_tree_model_get_iter_first(GTK_TREE_MODEL(model), &iter)) |
6485 | 6485 |
6486 static void | 6486 static void |
6487 close_on_tabs_pref_cb(const char *name, PurplePrefType type, | 6487 close_on_tabs_pref_cb(const char *name, PurplePrefType type, |
6488 gconstpointer value, gpointer data) | 6488 gconstpointer value, gpointer data) |
6489 { | 6489 { |
6490 const GList *l; | 6490 GList *l; |
6491 PurpleConversation *conv; | 6491 PurpleConversation *conv; |
6492 PidginConversation *gtkconv; | 6492 PidginConversation *gtkconv; |
6493 | 6493 |
6494 for (l = purple_get_conversations(); l != NULL; l = l->next) { | 6494 for (l = purple_get_conversations(); l != NULL; l = l->next) { |
6495 conv = (PurpleConversation *)l->data; | 6495 conv = (PurpleConversation *)l->data; |
6509 static void | 6509 static void |
6510 spellcheck_pref_cb(const char *name, PurplePrefType type, | 6510 spellcheck_pref_cb(const char *name, PurplePrefType type, |
6511 gconstpointer value, gpointer data) | 6511 gconstpointer value, gpointer data) |
6512 { | 6512 { |
6513 #ifdef USE_GTKSPELL | 6513 #ifdef USE_GTKSPELL |
6514 const GList *cl; | 6514 GList *cl; |
6515 PurpleConversation *conv; | 6515 PurpleConversation *conv; |
6516 PidginConversation *gtkconv; | 6516 PidginConversation *gtkconv; |
6517 GtkSpell *spell; | 6517 GtkSpell *spell; |
6518 | 6518 |
6519 for (cl = purple_get_conversations(); cl != NULL; cl = cl->next) { | 6519 for (cl = purple_get_conversations(); cl != NULL; cl = cl->next) { |
6556 | 6556 |
6557 static void | 6557 static void |
6558 show_timestamps_pref_cb(const char *name, PurplePrefType type, | 6558 show_timestamps_pref_cb(const char *name, PurplePrefType type, |
6559 gconstpointer value, gpointer data) | 6559 gconstpointer value, gpointer data) |
6560 { | 6560 { |
6561 const GList *l; | 6561 GList *l; |
6562 PurpleConversation *conv; | 6562 PurpleConversation *conv; |
6563 PidginConversation *gtkconv; | 6563 PidginConversation *gtkconv; |
6564 PidginWindow *win; | 6564 PidginWindow *win; |
6565 | 6565 |
6566 for (l = purple_get_conversations(); l != NULL; l = l->next) | 6566 for (l = purple_get_conversations(); l != NULL; l = l->next) |
6584 | 6584 |
6585 static void | 6585 static void |
6586 show_formatting_toolbar_pref_cb(const char *name, PurplePrefType type, | 6586 show_formatting_toolbar_pref_cb(const char *name, PurplePrefType type, |
6587 gconstpointer value, gpointer data) | 6587 gconstpointer value, gpointer data) |
6588 { | 6588 { |
6589 const GList *l; | 6589 GList *l; |
6590 PurpleConversation *conv; | 6590 PurpleConversation *conv; |
6591 PidginConversation *gtkconv; | 6591 PidginConversation *gtkconv; |
6592 PidginWindow *win; | 6592 PidginWindow *win; |
6593 | 6593 |
6594 for (l = purple_get_conversations(); l != NULL; l = l->next) | 6594 for (l = purple_get_conversations(); l != NULL; l = l->next) |
6614 | 6614 |
6615 static void | 6615 static void |
6616 animate_buddy_icons_pref_cb(const char *name, PurplePrefType type, | 6616 animate_buddy_icons_pref_cb(const char *name, PurplePrefType type, |
6617 gconstpointer value, gpointer data) | 6617 gconstpointer value, gpointer data) |
6618 { | 6618 { |
6619 const GList *l; | 6619 GList *l; |
6620 PurpleConversation *conv; | 6620 PurpleConversation *conv; |
6621 PidginConversation *gtkconv; | 6621 PidginConversation *gtkconv; |
6622 PidginWindow *win; | 6622 PidginWindow *win; |
6623 | 6623 |
6624 if (!purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/im/show_buddy_icons")) | 6624 if (!purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/im/show_buddy_icons")) |
6641 | 6641 |
6642 static void | 6642 static void |
6643 show_buddy_icons_pref_cb(const char *name, PurplePrefType type, | 6643 show_buddy_icons_pref_cb(const char *name, PurplePrefType type, |
6644 gconstpointer value, gpointer data) | 6644 gconstpointer value, gpointer data) |
6645 { | 6645 { |
6646 const GList *l; | 6646 GList *l; |
6647 | 6647 |
6648 for (l = purple_get_conversations(); l != NULL; l = l->next) { | 6648 for (l = purple_get_conversations(); l != NULL; l = l->next) { |
6649 PurpleConversation *conv = l->data; | 6649 PurpleConversation *conv = l->data; |
6650 | 6650 |
6651 if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM) | 6651 if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM) |
6767 } | 6767 } |
6768 | 6768 |
6769 static void | 6769 static void |
6770 account_signed_off_cb(PurpleConnection *gc, gpointer event) | 6770 account_signed_off_cb(PurpleConnection *gc, gpointer event) |
6771 { | 6771 { |
6772 const GList *iter; | 6772 GList *iter; |
6773 | 6773 |
6774 for (iter = purple_get_conversations(); iter; iter = iter->next) | 6774 for (iter = purple_get_conversations(); iter; iter = iter->next) |
6775 { | 6775 { |
6776 PurpleConversation *conv = iter->data; | 6776 PurpleConversation *conv = iter->data; |
6777 | 6777 |