--- a/src/gf_action.c Sun Nov 28 03:14:55 2010 -0600
+++ b/src/gf_action.c Sat Dec 03 23:16:33 2011 -0600
@@ -289,29 +289,26 @@
gf_action_execute_open_conv(GfDisplay *display, GdkEventButton *gdk_event) {
PurpleAccount *account = NULL;
PurpleBuddy *buddy = NULL;
PurpleConversation *conv = NULL;
const GHashTable *components = NULL;
- const gchar *n_type, *target;
g_return_if_fail(display);
info = gf_display_get_event_info(display);
- event = gf_event_info_get_event(info);
- n_type = gf_event_get_notification_type(event);
account = gf_event_info_get_account(info);
buddy = gf_event_info_get_buddy(info);
conv = gf_event_info_get_conversation(info);
components = gf_event_info_get_components(info);
target = gf_event_info_get_target(info);
if(conv) { /* we have a conv */
if(!conversation_exists(conv)) {
- /* the conv we have doesn't exist anymore.. */
+ /* the conv we have doesn't exist anymore.. */ target = gf_event_info_get_target(info);
@@ -376,29 +373,31 @@
gf_action_execute_log(GfDisplay *display, GdkEventButton *gdk_event) {
PurpleConversation *conv;
- const gchar *n_type, *target;
g_return_if_fail(display);
info = gf_display_get_event_info(display);
account = gf_event_info_get_account(info);
- event = gf_event_info_get_event(info);
conv = gf_event_info_get_conversation(info);
target = gf_event_info_get_target(info);
- n_type = gf_event_get_notification_type(event);
PurpleConversationType type;
type = purple_conversation_get_type(conv);
if(type == PURPLE_CONV_TYPE_IM || type == PURPLE_CONV_TYPE_CHAT) {
- pidgin_log_show(type, (type == PURPLE_CONV_TYPE_IM) ? target : conv->name, account);
+ if(type == PURPLE_CONV_TYPE_IM) { + pidgin_log_show(type, target, account); + const gchar *name = purple_conversation_get_name(conv); + pidgin_log_show(type, name, account); gf_display_destroy(display);
@@ -535,6 +534,7 @@
GfEventInfo *info = NULL;
PurpleAccount *account = NULL;
PurpleConversation *conv = NULL;
+ const gchar *name = NULL; info = gf_display_get_event_info(display);
@@ -545,7 +545,8 @@
conv = gf_event_info_get_conversation(info);
- pidgin_log_show(PURPLE_LOG_CHAT, conv->name, account);
+ name = purple_conversation_get_name(conv); + pidgin_log_show(PURPLE_LOG_CHAT, name, account); @@ -568,6 +569,7 @@
PurpleAccount *account = NULL;
PurpleConversation *conv = NULL;
+ const gchar *name = NULL; info = gf_display_get_event_info(display);
@@ -578,7 +580,8 @@
conv = gf_event_info_get_conversation(info);
- chat = purple_blist_find_chat(account, conv->name);
+ name = purple_conversation_get_name(conv); + chat = purple_blist_find_chat(account, name); pidgin_dialogs_alias_chat(chat);
@@ -607,6 +610,7 @@
GfEventInfo *info = NULL;
PurpleAccount *account = NULL;
PurpleConversation *conv = NULL;
+ const gchar *name = NULL; info = gf_display_get_event_info(display);
@@ -617,7 +621,8 @@
conv = gf_event_info_get_conversation(info);
- purple_blist_request_add_chat(account, NULL, NULL, conv->name);
+ name = purple_conversation_get_name(conv); + purple_blist_request_add_chat(account, NULL, NULL, name); @@ -640,6 +645,7 @@
PurpleAccount *account = NULL;
PurpleConversation *conv = NULL;
+ const gchar *name = NULL; info = gf_display_get_event_info(display);
@@ -650,7 +656,8 @@
conv = gf_event_info_get_conversation(info);
- chat = purple_blist_find_chat(account, conv->name);
+ name = purple_conversation_get_name(conv); + chat = purple_blist_find_chat(account, name); pidgin_dialogs_remove_chat(chat);
@@ -680,6 +687,7 @@
PurpleAccount *account = NULL;
PurpleConversation *conv = NULL;
+ const gchar *name = NULL; info = gf_display_get_event_info(display);
@@ -690,7 +698,8 @@
conv = gf_event_info_get_conversation(info);
- chat = purple_blist_find_chat(account, conv->name);
+ name = purple_conversation_get_name(conv); + chat = purple_blist_find_chat(account, name); purple_blist_node_set_bool((PurpleBlistNode *)chat, "gtk-autojoin",
@@ -707,10 +716,11 @@
PurpleBuddy *buddy = NULL;
PurpleConversation *conv = NULL;
+ PurpleConversationType type = 0; PurplePlugin *prpl = NULL;
PurplePluginProtocolInfo *prpl_info = NULL;
- const gchar *target = NULL;
+ const gchar *target = NULL, *name = NULL; gboolean chat_sep_added = FALSE;
@@ -735,8 +745,13 @@
conv = gf_event_info_get_conversation(info);
target = gf_event_info_get_target(info);
+ type = purple_conversation_get_type(conv); + name = purple_conversation_get_name(conv); - chat = purple_blist_find_chat(account, conv->name);
+ chat = purple_blist_find_chat(account, name); /* find the prpl and it's info */
prpl = purple_find_prpl(purple_account_get_protocol_id(account));
@@ -776,7 +791,7 @@
buddy = purple_find_buddy(account, target);
pidgin_new_item_from_stock(menu, _("View IM log"), NULL,
G_CALLBACK(gf_action_context_log_buddy_cb),
@@ -832,14 +847,13 @@
G_CALLBACK(gf_action_context_autojoin_cb),
/* if we have a conversation and it's a chat, we show the view log for it.
* if we don't do this check we end up with two menu items to view the
- if(conv && conv->type == PURPLE_CONV_TYPE_CHAT) {
+ if(conv && type == PURPLE_CONV_TYPE_CHAT) { @@ -869,7 +883,7 @@
/* add the add chat item if it's not on our blist.. */
- if(!chat && conv && conv->type == PURPLE_CONV_TYPE_CHAT) {
+ if(!chat && conv && type == PURPLE_CONV_TYPE_CHAT) { pidgin_new_item_from_stock(menu, _("Add Chat"), GTK_STOCK_ADD,
G_CALLBACK(gf_action_context_add_chat_cb),