gobjectification: b0668b8f: compile pidgin for the gobjectified Purp...
sadrul at pidgin.im
sadrul at pidgin.im
Thu Mar 13 08:10:56 EDT 2008
-----------------------------------------------------------------
Revision: b0668b8f2645d273af8b802f7f4c4c0a19188c9c
Ancestor: a0cc17280eb15c5e44ca24c1367d27b3cd476311
Author: sadrul at pidgin.im
Date: 2008-03-13T12:15:48
Branch: im.pidgin.gobjectification
URL: http://d.pidgin.im/viewmtn/revision/info/b0668b8f2645d273af8b802f7f4c4c0a19188c9c
Modified files:
pidgin/gtkaccount.c pidgin/gtkblist.c pidgin/gtkconn.c
pidgin/gtkconv.c pidgin/gtkdocklet.c pidgin/gtkimhtml.c
pidgin/gtkmain.c pidgin/gtknotify.c pidgin/gtkpounce.c
pidgin/gtkprefs.c pidgin/gtkroomlist.c pidgin/gtksound.c
pidgin/gtkutils.c
ChangeLog:
compile pidgin for the gobjectified PurpleConnection.
-------------- next part --------------
============================================================
--- pidgin/gtkaccount.c 1dfd22094c9f63c5773fde14dca26b14188ad206
+++ pidgin/gtkaccount.c 513f071001ee6a8a76eea3e4b32cffe5218e3e23
@@ -534,9 +534,9 @@ add_login_options(AccountPrefsDialog *di
/* Do not let the user change the protocol/screenname while connected. */
update_editable(NULL, dialog);
- purple_signal_connect(purple_connections_get_handle(), "signing-on", dialog,
+ purple_signal_connect(NULL, "signing-on", dialog,
G_CALLBACK(update_editable), dialog);
- purple_signal_connect(purple_connections_get_handle(), "signed-off", dialog,
+ purple_signal_connect(NULL, "signed-off", dialog,
G_CALLBACK(update_editable), dialog);
}
@@ -2564,10 +2564,10 @@ pidgin_account_init(void)
PURPLE_SUBTYPE_ACCOUNT));
/* Setup some purple signal handlers. */
- purple_signal_connect(purple_connections_get_handle(), "signed-on",
+ purple_signal_connect(NULL, "signed-on",
pidgin_account_get_handle(),
PURPLE_CALLBACK(signed_on_off_cb), NULL);
- purple_signal_connect(purple_connections_get_handle(), "signed-off",
+ purple_signal_connect(NULL, "signed-off",
pidgin_account_get_handle(),
PURPLE_CALLBACK(signed_on_off_cb), NULL);
#if 0
============================================================
--- pidgin/gtkblist.c 92dfab1ca6fc84185382e4df461a8205dacf242a
+++ pidgin/gtkblist.c c22c8d60763bfc1afb56a40eae454b94c4998de6
@@ -327,7 +327,7 @@ static void gtk_blist_menu_info_cb(GtkWi
static void gtk_blist_menu_info_cb(GtkWidget *w, PurpleBuddy *b)
{
- pidgin_retrieve_user_info(b->account->gc, purple_buddy_get_name(b));
+ pidgin_retrieve_user_info(purple_account_get_connection(b->account), purple_buddy_get_name(b));
}
static void gtk_blist_menu_im_cb(GtkWidget *w, PurpleBuddy *b)
@@ -337,7 +337,7 @@ static void gtk_blist_menu_send_file_cb(
static void gtk_blist_menu_send_file_cb(GtkWidget *w, PurpleBuddy *b)
{
- serv_send_file(b->account->gc, b->name, NULL);
+ serv_send_file(purple_account_get_connection(b->account), b->name, NULL);
}
static void gtk_blist_menu_move_to_cb(GtkWidget *w, PurpleBlistNode *node)
@@ -397,7 +397,7 @@ static void gtk_blist_join_chat(PurpleCh
purple_conversation_present(conv);
}
- serv_join_chat(chat->account->gc, chat->components);
+ serv_join_chat(purple_account_get_connection(chat->account), chat->components);
g_free(chat_name);
}
@@ -804,7 +804,7 @@ joinchat_set_sensitive_if_input_cb(GtkWi
gtk_dialog_set_response_sensitive(GTK_DIALOG(data->window), GTK_RESPONSE_OK, sensitive);
gc = purple_account_get_connection(data->account);
- prpl_info = (gc != NULL) ? PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl) : NULL;
+ prpl_info = (gc != NULL) ? PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc)) : NULL;
sensitive = (prpl_info != NULL && prpl_info->roomlist_get_list != NULL);
gtk_dialog_set_response_sensitive(GTK_DIALOG(data->window), 1, sensitive);
@@ -836,11 +836,11 @@ rebuild_joinchat_entries(PidginJoinChatD
g_list_free(data->entries);
data->entries = NULL;
- if (PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->chat_info != NULL)
- list = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->chat_info(gc);
+ if (PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc))->chat_info != NULL)
+ list = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc))->chat_info(gc);
- if (PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->chat_info_defaults != NULL)
- defaults = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->chat_info_defaults(gc, NULL);
+ if (PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc))->chat_info_defaults != NULL)
+ defaults = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc))->chat_info_defaults(gc, NULL);
for (tmp = list; tmp; tmp = tmp->next)
{
@@ -913,7 +913,7 @@ chat_account_filter_func(PurpleAccount *
PurpleConnection *gc = purple_account_get_connection(account);
PurplePluginProtocolInfo *prpl_info = NULL;
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
return (prpl_info->chat_info != NULL);
}
@@ -1270,7 +1270,7 @@ pidgin_append_blist_node_proto_menu(GtkW
PurpleBlistNode *node)
{
GList *l, *ll;
- PurplePluginProtocolInfo *prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ PurplePluginProtocolInfo *prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
if(!prpl_info || !prpl_info->blist_node_menu)
return;
@@ -1333,7 +1333,7 @@ pidgin_blist_make_buddy_menu(GtkWidget *
g_return_if_fail(menu);
g_return_if_fail(buddy);
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(buddy->account->gc->prpl);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(purple_account_get_connection(buddy->account)));
node = (PurpleBlistNode*)buddy;
@@ -1350,7 +1350,7 @@ pidgin_blist_make_buddy_menu(GtkWidget *
G_CALLBACK(gtk_blist_menu_im_cb), buddy, 0, 0, NULL);
if (prpl_info && prpl_info->send_file) {
if (!prpl_info->can_receive_file ||
- prpl_info->can_receive_file(buddy->account->gc, buddy->name))
+ prpl_info->can_receive_file(purple_account_get_connection(buddy->account), buddy->name))
{
pidgin_new_item_from_stock(menu, _("_Send File..."),
PIDGIN_STOCK_TOOLBAR_SEND_FILE,
@@ -1378,7 +1378,7 @@ pidgin_blist_make_buddy_menu(GtkWidget *
NULL, G_CALLBACK(gtk_blist_menu_showoffline_cb), node, 0, 0, NULL);
}
- pidgin_append_blist_node_proto_menu(menu, buddy->account->gc, node);
+ pidgin_append_blist_node_proto_menu(menu, purple_account_get_connection(buddy->account), node);
pidgin_append_blist_node_extended_menu(menu, node);
if (!contact_expanded && contact != NULL)
@@ -1434,7 +1434,7 @@ gtk_blist_key_press_cb(GtkWidget *tv, Gd
return FALSE;
}
if(buddy)
- pidgin_retrieve_user_info(buddy->account->gc, buddy->name);
+ pidgin_retrieve_user_info(purple_account_get_connection(buddy->account), buddy->name);
} else if (event->keyval == GDK_F2) {
gtk_blist_menu_alias_cb(tv, node);
}
@@ -1486,7 +1486,7 @@ create_chat_menu(PurpleBlistNode *node,
pidgin_new_item_from_stock(menu, _("View _Log"), NULL,
G_CALLBACK(gtk_blist_menu_showlog_cb), node, 0, 0, NULL);
- pidgin_append_blist_node_proto_menu(menu, c->account->gc, node);
+ pidgin_append_blist_node_proto_menu(menu, purple_account_get_connection(c->account), node);
pidgin_append_blist_node_extended_menu(menu, node);
pidgin_separator(menu);
@@ -1563,7 +1563,7 @@ create_buddy_menu(PurpleBlistNode *node,
if(buddy == b)
continue;
- if(!buddy->account->gc)
+ if(!purple_account_get_connection(buddy->account))
continue;
if(!show_offline && !PURPLE_BUDDY_IS_ONLINE(buddy))
continue;
@@ -1692,7 +1692,7 @@ static gboolean gtk_blist_button_press_c
prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl);
if (prpl && prpl_info->get_info)
- pidgin_retrieve_user_info(b->account->gc, b->name);
+ pidgin_retrieve_user_info(purple_account_get_connection(b->account), b->name);
handled = TRUE;
}
@@ -2038,7 +2038,7 @@ static void pidgin_blist_drag_data_get_c
}
protocol =
- PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->list_icon(buddy->account,
+ PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc))->list_icon(buddy->account,
buddy);
str = g_string_new(NULL);
@@ -2423,8 +2423,8 @@ static GdkPixbuf *pidgin_blist_get_buddy
account = purple_buddy_get_account(buddy);
- if(account && account->gc)
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(account->gc->prpl);
+ if(account && purple_account_get_connection(account))
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(purple_account_get_connection(account)));
#if 0
if (!purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_buddy_icons"))
@@ -3124,7 +3124,7 @@ static char *pidgin_get_tooltip_text(Pur
if (g_list_length(purple_connections_get_all()) > 1)
{
- tmp = g_markup_escape_text(chat->account->username, -1);
+ tmp = g_markup_escape_text(purple_account_get_username(chat->account), -1);
g_string_append_printf(str, _("<b>Account:</b> %s"), tmp);
g_free(tmp);
}
@@ -3137,7 +3137,7 @@ static char *pidgin_get_tooltip_text(Pur
}
if (prpl_info->chat_info != NULL)
- cur = prpl_info->chat_info(chat->account->gc);
+ cur = prpl_info->chat_info(purple_account_get_connection(chat->account));
else
cur = NULL;
@@ -3625,7 +3625,7 @@ gchar *pidgin_blist_get_name_markup(Purp
if (prpl != NULL)
prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl);
- if (prpl_info && prpl_info->status_text && b->account->gc) {
+ if (prpl_info && prpl_info->status_text && purple_account_get_connection(b->account)) {
char *tmp = prpl_info->status_text(b);
const char *end;
@@ -5435,7 +5435,7 @@ static void pidgin_blist_show(PurpleBudd
purple_signal_connect(handle, "account-modified", gtkblist,
PURPLE_CALLBACK(account_modified), gtkblist);
- handle = purple_connections_get_handle();
+ handle = NULL;
purple_signal_connect(handle, "signed-on", gtkblist,
PURPLE_CALLBACK(sign_on_off_cb), list);
purple_signal_connect(handle, "signed-off", gtkblist,
@@ -6524,7 +6524,7 @@ addchat_set_sensitive_if_input_cb(GtkWid
gtk_dialog_set_response_sensitive(GTK_DIALOG(data->window), GTK_RESPONSE_OK, sensitive);
gc = purple_account_get_connection(data->account);
- prpl_info = (gc != NULL) ? PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl) : NULL;
+ prpl_info = (gc != NULL) ? PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc)) : NULL;
sensitive = (prpl_info != NULL && prpl_info->roomlist_get_list != NULL);
gtk_dialog_set_response_sensitive(GTK_DIALOG(data->window), 1, sensitive);
@@ -6549,11 +6549,11 @@ rebuild_addchat_entries(PidginAddChatDat
data->entries = NULL;
- if (PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->chat_info != NULL)
- list = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->chat_info(gc);
+ if (PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc))->chat_info != NULL)
+ list = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc))->chat_info(gc);
- if (PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->chat_info_defaults != NULL)
- defaults = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->chat_info_defaults(gc, data->default_chat_name);
+ if (PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc))->chat_info_defaults != NULL)
+ defaults = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc))->chat_info_defaults(gc, data->default_chat_name);
for (tmp = list; tmp; tmp = tmp->next)
{
@@ -6644,7 +6644,7 @@ pidgin_blist_request_add_chat(PurpleAcco
if (account != NULL) {
gc = purple_account_get_connection(account);
- if (PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->join_chat == NULL) {
+ if (PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc))->join_chat == NULL) {
purple_notify_error(gc, NULL, _("This protocol does not support chat rooms."), NULL);
return;
}
@@ -6653,7 +6653,7 @@ pidgin_blist_request_add_chat(PurpleAcco
for (l = purple_connections_get_all(); l != NULL; l = l->next) {
gc = (PurpleConnection *)l->data;
- if (PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->join_chat != NULL) {
+ if (PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc))->join_chat != NULL) {
account = purple_connection_get_account(gc);
break;
}
@@ -6937,7 +6937,7 @@ void pidgin_blist_init(void)
cached_emblems = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL);
- purple_signal_connect(purple_connections_get_handle(), "signed-on",
+ purple_signal_connect(NULL, "signed-on",
gtk_blist_handle, PURPLE_CALLBACK(account_signon_cb),
NULL);
@@ -7453,7 +7453,7 @@ pidgin_blist_update_accounts_menu(void)
pidgin_separator(submenu);
gc = purple_account_get_connection(account);
- plugin = gc && PURPLE_CONNECTION_IS_CONNECTED(gc) ? gc->prpl : NULL;
+ plugin = gc && PURPLE_CONNECTION_IS_CONNECTED(gc) ? purple_connection_get_prpl(gc) : NULL;
if (plugin && PURPLE_PLUGIN_HAS_ACTIONS(plugin)) {
build_plugin_actions(submenu, plugin, gc);
} else {
============================================================
--- pidgin/gtkconn.c 365d788786f595979052395da69a7296580881de
+++ pidgin/gtkconn.c 3994de125aa49d4bcd195cd60925f7db3ac1ad77
@@ -63,8 +63,11 @@ pidgin_connection_connect_progress(Purpl
PidginBuddyList *gtkblist = pidgin_blist_get_default_gtk_blist();
if (!gtkblist)
return;
+#define FIXME: do something to check if some account is in _CONNECTING state
+#if 0
pidgin_status_box_set_connecting(PIDGIN_STATUS_BOX(gtkblist->statusbox),
(purple_connections_get_connecting() != NULL));
+#endif
pidgin_status_box_pulse_connecting(PIDGIN_STATUS_BOX(gtkblist->statusbox));
}
@@ -77,9 +80,12 @@ pidgin_connection_connected(PurpleConnec
account = purple_connection_get_account(gc);
gtkblist = pidgin_blist_get_default_gtk_blist();
+#define FIXME: do something to check if some account is in _CONNECTING state
+#if 0
if (gtkblist != NULL)
pidgin_status_box_set_connecting(PIDGIN_STATUS_BOX(gtkblist->statusbox),
(purple_connections_get_connecting() != NULL));
+#endif
g_hash_table_remove(auto_reconns, account);
}
@@ -90,8 +96,11 @@ pidgin_connection_disconnected(PurpleCon
PidginBuddyList *gtkblist = pidgin_blist_get_default_gtk_blist();
if (!gtkblist)
return;
+#define FIXME: do something to check if some account is in _CONNECTING state
+#if 0
pidgin_status_box_set_connecting(PIDGIN_STATUS_BOX(gtkblist->statusbox),
(purple_connections_get_connecting() != NULL));
+#endif
if (purple_connections_get_all() != NULL)
return;
@@ -211,8 +220,8 @@ static void pidgin_connection_network_di
PurpleAccount *a = (PurpleAccount*)l->data;
if (!purple_account_is_disconnected(a)) {
gc = purple_account_get_connection(a);
- if (gc && gc->prpl)
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ if (gc && purple_connection_get_prpl(gc))
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
if (prpl_info) {
if (prpl_info->keepalive)
prpl_info->keepalive(gc);
============================================================
--- pidgin/gtkconv.c 25483b5e36d0036da93930aa2ef90ae85a791e84
+++ pidgin/gtkconv.c a856a8bd7332aeb334b73e05d69f1c6471d68f86
@@ -468,7 +468,7 @@ check_for_and_do_command(PurpleConversat
PurpleConnection *gc;
if ((gc = purple_conversation_get_gc(conv)))
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
if ((prpl_info != NULL) && (prpl_info->options & OPT_PROTO_SLASH_COMMANDS_NATIVE)) {
char *firstspace;
@@ -565,7 +565,7 @@ send_cb(GtkWidget *widget, PidginConvers
flags |= PURPLE_MESSAGE_IMAGES;
gc = purple_account_get_connection(account);
- if (gc && (conv->features & PURPLE_CONNECTION_NO_NEWLINES)) {
+ if (gc && (conv->features & PURPLE_CONNECTION_FLAGS_NO_NEWLINES)) {
char **bufs;
int i;
@@ -1471,7 +1471,7 @@ chat_do_im(PidginConversation *gtkconv,
gc = purple_account_get_connection(account);
g_return_if_fail(gc != NULL);
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
if (prpl_info && prpl_info->get_cb_real_name)
real_who = prpl_info->get_cb_real_name(gc,
@@ -1550,7 +1550,7 @@ menu_chat_get_away_cb(GtkWidget *w, Pidg
who = g_object_get_data(G_OBJECT(w), "user_data");
if (gc != NULL) {
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
/*
* May want to expand this to work similarly to menu_info_cb?
@@ -1621,7 +1621,7 @@ create_chat_menu(PurpleConversation *con
PurpleBuddy *buddy = NULL;
if (gc != NULL)
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
/*
* If a menu already exists, destroy it before creating a new one,
@@ -1717,7 +1717,7 @@ create_chat_menu(PurpleConversation *con
if (buddy != NULL)
{
if (purple_account_is_connected(conv->account))
- pidgin_append_blist_node_proto_menu(menu, conv->account->gc,
+ pidgin_append_blist_node_proto_menu(menu, purple_account_get_connection(conv->account),
(PurpleBlistNode *)buddy);
pidgin_append_blist_node_extended_menu(menu, (PurpleBlistNode *)buddy);
gtk_widget_show_all(menu);
@@ -1743,7 +1743,7 @@ gtkconv_chat_popup_menu_cb(GtkWidget *wi
gtkconv = PIDGIN_CONVERSATION(conv);
gtkchat = gtkconv->u.chat;
account = purple_conversation_get_account(conv);
- gc = account->gc;
+ gc = purple_account_get_connection(account);
model = gtk_tree_view_get_model(GTK_TREE_VIEW(gtkchat->list));
@@ -1779,7 +1779,7 @@ right_click_chat_cb(GtkWidget *widget, G
gtkchat = gtkconv->u.chat;
account = purple_conversation_get_account(conv);
- gc = account->gc;
+ gc = purple_account_get_connection(account);
model = gtk_tree_view_get_model(GTK_TREE_VIEW(gtkchat->list));
@@ -2184,10 +2184,10 @@ pidgin_conv_switch_active_conversation(P
gtk_imhtml_set_protocol_name(entry, protocol_name);
gtk_imhtml_set_protocol_name(GTK_IMHTML(gtkconv->imhtml), protocol_name);
- if (!(conv->features & PURPLE_CONNECTION_HTML))
+ if (!(conv->features & PURPLE_CONNECTION_FLAGS_HTML))
gtk_imhtml_clear_formatting(GTK_IMHTML(gtkconv->entry));
- else if (conv->features & PURPLE_CONNECTION_FORMATTING_WBFO &&
- !(old_conv->features & PURPLE_CONNECTION_FORMATTING_WBFO))
+ else if (conv->features & PURPLE_CONNECTION_FLAGS_FORMATTING_WBFO &&
+ !(old_conv->features & PURPLE_CONNECTION_FLAGS_FORMATTING_WBFO))
{
/* The old conversation allowed formatting on parts of the
* buffer, but the new one only allows it on the whole
@@ -2227,12 +2227,12 @@ pidgin_conv_switch_active_conversation(P
gtk_imhtml_toggle_fontface(entry, fontface);
- if (!(conv->features & PURPLE_CONNECTION_NO_FONTSIZE))
+ if (!(conv->features & PURPLE_CONNECTION_FLAGS_NO_FONTSIZE))
gtk_imhtml_font_set_size(entry, fontsize);
gtk_imhtml_toggle_forecolor(entry, forecolor);
- if (!(conv->features & PURPLE_CONNECTION_NO_BGCOLOR))
+ if (!(conv->features & PURPLE_CONNECTION_FLAGS_NO_BGCOLOR))
{
gtk_imhtml_toggle_backcolor(entry, backcolor);
gtk_imhtml_toggle_background(entry, background);
@@ -2250,7 +2250,7 @@ pidgin_conv_switch_active_conversation(P
* here, we didn't call gtk_imhtml_clear_formatting() (because we want to
* preserve the formatting exactly as it is), so we have to do this now. */
gtk_imhtml_set_whole_buffer_formatting_only(entry,
- (conv->features & PURPLE_CONNECTION_FORMATTING_WBFO));
+ (conv->features & PURPLE_CONNECTION_FLAGS_FORMATTING_WBFO));
}
purple_signal_emit(pidgin_conversations_get_handle(), "conversation-switched", conv);
@@ -2549,8 +2549,8 @@ redraw_icon(gpointer data)
gtkconv = PIDGIN_CONVERSATION(conv);
account = purple_conversation_get_account(conv);
- if(account && account->gc) {
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(account->gc->prpl);
+ if(account && purple_account_get_connection(account)) {
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(purple_account_get_connection(account)));
} else {
gtkconv->u.im->icon_timer = 0;
return FALSE;
@@ -3096,7 +3096,7 @@ populate_menu_with_options(GtkWidget *me
}
} else if (node) {
if (purple_account_is_connected(conv->account))
- pidgin_append_blist_node_proto_menu(menu, conv->account->gc, node);
+ pidgin_append_blist_node_proto_menu(menu, purple_account_get_connection(conv->account), node);
pidgin_append_blist_node_extended_menu(menu, node);
}
@@ -3732,7 +3732,7 @@ generate_invite_user_names(PurpleConnect
buddy = (PurpleBuddy *)bnode;
- if (buddy->account == gc->account &&
+ if (buddy->account == purple_connection_get_account(gc) &&
PURPLE_BUDDY_IS_ONLINE(buddy))
tmp = g_list_insert_sorted(tmp, buddy->name,
(GCompareFunc)g_utf8_collate);
@@ -3814,7 +3814,7 @@ add_chat_buddy_common(PurpleConversation
gtkchat = gtkconv->u.chat;
gc = purple_conversation_get_gc(conv);
- if (!gc || !(prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)))
+ if (!gc || !(prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc))))
return;
ls = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(gtkchat->list)));
@@ -4116,7 +4116,7 @@ static void topic_callback(GtkWidget *w,
gc = purple_conversation_get_gc(conv);
- if(!gc || !(prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)))
+ if(!gc || !(prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc))))
return;
if(prpl_info->set_chat_topic == NULL)
@@ -4248,8 +4248,8 @@ blist_node_aliased_cb(PurpleBlistNode *n
gc = purple_conversation_get_gc(conv);
g_return_if_fail(gc != NULL);
- g_return_if_fail(gc->prpl != NULL);
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ g_return_if_fail(purple_connection_get_prpl(gc) != NULL);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
if (prpl_info->options & OPT_PROTO_UNIQUE_CHATNAME)
return;
@@ -4414,7 +4414,7 @@ setup_chat_topic(PidginConversation *gtk
{
PurpleConversation *conv = gtkconv->active_conv;
PurpleConnection *gc = purple_conversation_get_gc(conv);
- PurplePluginProtocolInfo *prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ PurplePluginProtocolInfo *prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
if (prpl_info->options & OPT_PROTO_CHAT_TOPIC)
{
GtkWidget *hbox, *label;
@@ -4454,7 +4454,7 @@ pidgin_conv_userlist_create_tooltip(GtkW
PurpleAccount *account = purple_conversation_get_account(conv);
char *who = NULL;
- if (account->gc == NULL)
+ if (purple_account_get_connection(account) == NULL)
return FALSE;
if (!gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, path))
@@ -4462,7 +4462,7 @@ pidgin_conv_userlist_create_tooltip(GtkW
gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, CHAT_USERS_NAME_COLUMN, &who, -1);
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(account->gc->prpl);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(purple_account_get_connection(account)));
node = (PurpleBlistNode*)(purple_find_buddy(conv->account, who));
if (node && prpl_info && (prpl_info->options & OPT_PROTO_UNIQUE_CHATNAME))
pidgin_blist_draw_tooltip(node, gtkconv->infopane);
@@ -5418,7 +5418,7 @@ pidgin_conv_write_conv(PurpleConversatio
}
win = gtkconv->win;
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
line_count = gtk_text_buffer_get_line_count(
gtk_text_view_get_buffer(GTK_TEXT_VIEW(
@@ -6225,7 +6225,7 @@ gray_stuff_out(PidginConversation *gtkco
account = purple_conversation_get_account(conv);
if (gc != NULL)
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
if (win->menu.send_to != NULL)
update_send_to_selection(win);
@@ -6303,26 +6303,26 @@ gray_stuff_out(PidginConversation *gtkco
{
/* Account is online */
/* Deal with the toolbar */
- if (conv->features & PURPLE_CONNECTION_HTML)
+ if (conv->features & PURPLE_CONNECTION_FLAGS_HTML)
{
buttons = GTK_IMHTML_ALL; /* Everything on */
- if (conv->features & PURPLE_CONNECTION_NO_BGCOLOR)
+ if (conv->features & PURPLE_CONNECTION_FLAGS_NO_BGCOLOR)
buttons &= ~GTK_IMHTML_BACKCOLOR;
- if (conv->features & PURPLE_CONNECTION_NO_FONTSIZE)
+ if (conv->features & PURPLE_CONNECTION_FLAGS_NO_FONTSIZE)
{
buttons &= ~GTK_IMHTML_GROW;
buttons &= ~GTK_IMHTML_SHRINK;
}
- if (conv->features & PURPLE_CONNECTION_NO_URLDESC)
+ if (conv->features & PURPLE_CONNECTION_FLAGS_NO_URLDESC)
buttons &= ~GTK_IMHTML_LINKDESC;
} else {
buttons = GTK_IMHTML_SMILEY | GTK_IMHTML_IMAGE;
}
if (!(prpl_info->options & OPT_PROTO_IM_IMAGE))
- conv->features |= PURPLE_CONNECTION_NO_IMAGES;
+ conv->features |= PURPLE_CONNECTION_FLAGS_NO_IMAGES;
- if(conv->features & PURPLE_CONNECTION_NO_IMAGES)
+ if(conv->features & PURPLE_CONNECTION_FLAGS_NO_IMAGES)
buttons &= ~GTK_IMHTML_IMAGE;
gtk_imhtml_set_format_functions(GTK_IMHTML(gtkconv->entry), buttons);
@@ -6334,8 +6334,8 @@ gray_stuff_out(PidginConversation *gtkco
gtk_widget_set_sensitive(win->menu.add_pounce, TRUE);
gtk_widget_set_sensitive(win->menu.get_info, (prpl_info->get_info != NULL));
gtk_widget_set_sensitive(win->menu.invite, (prpl_info->chat_invite != NULL));
- gtk_widget_set_sensitive(win->menu.insert_link, (conv->features & PURPLE_CONNECTION_HTML));
- gtk_widget_set_sensitive(win->menu.insert_image, !(conv->features & PURPLE_CONNECTION_NO_IMAGES));
+ gtk_widget_set_sensitive(win->menu.insert_link, (conv->features & PURPLE_CONNECTION_FLAGS_HTML));
+ gtk_widget_set_sensitive(win->menu.insert_image, !(conv->features & PURPLE_CONNECTION_FLAGS_NO_IMAGES));
if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM)
{
@@ -6730,8 +6730,8 @@ pidgin_conv_update_buddy_icon(PurpleConv
return;
account = purple_conversation_get_account(conv);
- if(account && account->gc)
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(account->gc->prpl);
+ if(account && purple_account_get_connection(account))
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(purple_account_get_connection(account)));
/* Remove the current icon stuff */
if (gtkconv->u.im->icon_container != NULL)
@@ -7293,13 +7293,13 @@ account_signed_off_cb(PurpleConnection *
if (PURPLE_CONNECTION_IS_CONNECTED(gc) &&
conv->type == PURPLE_CONV_TYPE_CHAT &&
- conv->account == gc->account &&
+ conv->account == purple_connection_get_account(gc) &&
purple_conversation_get_data(conv, "want-to-rejoin")) {
GHashTable *comps = NULL;
PurpleChat *chat = purple_blist_find_chat(conv->account, conv->name);
if (chat == NULL) {
- if (PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->chat_info_defaults != NULL)
- comps = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->chat_info_defaults(gc, conv->name);
+ if (PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc))->chat_info_defaults != NULL)
+ comps = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc))->chat_info_defaults(gc, conv->name);
} else {
comps = chat->components;
}
@@ -7792,10 +7792,10 @@ pidgin_conversations_init(void)
* UI operations
**********************************************************************/
- purple_signal_connect(purple_connections_get_handle(), "signed-on", handle,
+ purple_signal_connect(NULL, "signed-on", handle,
G_CALLBACK(account_signed_off_cb),
GINT_TO_POINTER(PURPLE_CONV_ACCOUNT_ONLINE));
- purple_signal_connect(purple_connections_get_handle(), "signed-off", handle,
+ purple_signal_connect(NULL, "signed-off", handle,
G_CALLBACK(account_signed_off_cb),
GINT_TO_POINTER(PURPLE_CONV_ACCOUNT_OFFLINE));
@@ -8769,7 +8769,7 @@ infopane_entry_activate(PidginConversati
gc = purple_conversation_get_gc(conv);
if (gc != NULL)
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
if (prpl_info && prpl_info->set_chat_topic == NULL)
/* This protocol doesn't support setting the chat room topic */
return FALSE;
============================================================
--- pidgin/gtkdocklet.c 82e87fdb2ff470cebc11fde5092c84805ea2e975
+++ pidgin/gtkdocklet.c a4aef94a2a248a3e9fe796ea4e4a720b8a0c25c6
@@ -226,7 +226,7 @@ online_account_supports_chat(void)
while(c != NULL) {
PurpleConnection *gc = c->data;
- PurplePluginProtocolInfo *prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ PurplePluginProtocolInfo *prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
if (prpl_info != NULL && prpl_info->chat_info != NULL)
return TRUE;
c = c->next;
@@ -263,7 +263,7 @@ docklet_signed_on_cb(PurpleConnection *g
docklet_signed_on_cb(PurpleConnection *gc)
{
if (!enable_join_chat) {
- if (PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->chat_info != NULL)
+ if (PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc))->chat_info != NULL)
enable_join_chat = TRUE;
}
docklet_update_status();
@@ -273,7 +273,7 @@ docklet_signed_off_cb(PurpleConnection *
docklet_signed_off_cb(PurpleConnection *gc)
{
if (enable_join_chat) {
- if (PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->chat_info != NULL)
+ if (PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc))->chat_info != NULL)
enable_join_chat = online_account_supports_chat();
}
docklet_update_status();
@@ -825,7 +825,7 @@ pidgin_docklet_init()
void
pidgin_docklet_init()
{
- void *conn_handle = purple_connections_get_handle();
+ void *conn_handle = NULL;
void *conv_handle = purple_conversations_get_handle();
void *accounts_handle = purple_accounts_get_handle();
void *status_handle = purple_savedstatuses_get_handle();
============================================================
--- pidgin/gtkimhtml.c 6ddec5d16cea88e2bbb7d511384fd9e616da527b
+++ pidgin/gtkimhtml.c 5077b8d3aaa0ddfe285df64b1e0cd7f187b8b0ba
@@ -5120,20 +5120,20 @@ void gtk_imhtml_setup_entry(GtkIMHtml *i
{
GtkIMHtmlButtons buttons;
- if (flags & PURPLE_CONNECTION_HTML) {
+ if (flags & PURPLE_CONNECTION_FLAGS_HTML) {
char color[8];
GdkColor fg_color, bg_color;
buttons = GTK_IMHTML_ALL;
- if (flags & PURPLE_CONNECTION_NO_BGCOLOR)
+ if (flags & PURPLE_CONNECTION_FLAGS_NO_BGCOLOR)
buttons &= ~GTK_IMHTML_BACKCOLOR;
- if (flags & PURPLE_CONNECTION_NO_FONTSIZE)
+ if (flags & PURPLE_CONNECTION_FLAGS_NO_FONTSIZE)
{
buttons &= ~GTK_IMHTML_GROW;
buttons &= ~GTK_IMHTML_SHRINK;
}
- if (flags & PURPLE_CONNECTION_NO_URLDESC)
+ if (flags & PURPLE_CONNECTION_FLAGS_NO_URLDESC)
buttons &= ~GTK_IMHTML_LINKDESC;
gtk_imhtml_set_format_functions(imhtml, GTK_IMHTML_ALL);
@@ -5149,7 +5149,7 @@ void gtk_imhtml_setup_entry(GtkIMHtml *i
gtk_imhtml_toggle_fontface(imhtml,
purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/font_face"));
- if (!(flags & PURPLE_CONNECTION_NO_FONTSIZE))
+ if (!(flags & PURPLE_CONNECTION_FLAGS_NO_FONTSIZE))
{
int size = purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/font_size");
@@ -5171,7 +5171,7 @@ void gtk_imhtml_setup_entry(GtkIMHtml *i
gtk_imhtml_toggle_forecolor(imhtml, color);
- if(!(flags & PURPLE_CONNECTION_NO_BGCOLOR) &&
+ if(!(flags & PURPLE_CONNECTION_FLAGS_NO_BGCOLOR) &&
strcmp(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/bgcolor"), "") != 0)
{
gdk_color_parse(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/bgcolor"),
@@ -5185,7 +5185,7 @@ void gtk_imhtml_setup_entry(GtkIMHtml *i
gtk_imhtml_toggle_background(imhtml, color);
- if (flags & PURPLE_CONNECTION_FORMATTING_WBFO)
+ if (flags & PURPLE_CONNECTION_FLAGS_FORMATTING_WBFO)
gtk_imhtml_set_whole_buffer_formatting_only(imhtml, TRUE);
else
gtk_imhtml_set_whole_buffer_formatting_only(imhtml, FALSE);
@@ -5194,7 +5194,7 @@ void gtk_imhtml_setup_entry(GtkIMHtml *i
imhtml_clear_formatting(imhtml);
}
- if (flags & PURPLE_CONNECTION_NO_IMAGES)
+ if (flags & PURPLE_CONNECTION_FLAGS_NO_IMAGES)
buttons &= ~GTK_IMHTML_IMAGE;
gtk_imhtml_set_format_functions(imhtml, buttons);
============================================================
--- pidgin/gtkmain.c 84c6d474edfca274f1a6b7900674454bc93858bc
+++ pidgin/gtkmain.c bbb8df68efbf9cc91f788eea57f7b4e2a57853f7
@@ -182,7 +182,10 @@ sighandler(int sig)
switch (sig) {
case SIGHUP:
purple_debug_warning("sighandler", "Caught signal %d\n", sig);
+#warning FIXME: use the connection-manager
+#if 0
purple_connections_disconnect_all();
+#endif
break;
case SIGSEGV:
fprintf(stderr, "%s", segfault_message);
@@ -194,7 +197,10 @@ sighandler(int sig)
break;
default:
purple_debug_warning("sighandler", "Caught signal %d\n", sig);
+#warning FIXME: use the connection-manager
+#if 0
purple_connections_disconnect_all();
+#endif
purple_plugins_unload_all();
@@ -276,7 +282,9 @@ pidgin_ui_init(void)
purple_privacy_set_ui_ops(pidgin_privacy_get_ui_ops());
purple_request_set_ui_ops(pidgin_request_get_ui_ops());
purple_sound_set_ui_ops(pidgin_sound_get_ui_ops());
+#if 0
purple_connections_set_ui_ops(pidgin_connections_get_ui_ops());
+#endif
purple_whiteboard_set_ui_ops(pidgin_whiteboard_get_ui_ops());
#ifdef USE_SCREENSAVER
purple_idle_set_ui_ops(pidgin_idle_get_ui_ops());
============================================================
--- pidgin/gtknotify.c 55046385edbfead330c3650539c8c50ad6fa9ca7
+++ pidgin/gtknotify.c 9a478b4a3052bb54a8e89cd526f4f478094709a0
@@ -893,7 +893,7 @@ pidgin_notify_searchresults(PurpleConnec
g_signal_connect_swapped(G_OBJECT(close_button), "clicked",
G_CALLBACK(searchresults_close_cb), data);
- data->account = gc->account;
+ data->account = purple_connection_get_account(gc);
data->model = model;
data->treeview = treeview;
data->window = window;
============================================================
--- pidgin/gtkpounce.c ff2f34b63f822c3e191e457237abd474891aa099
+++ pidgin/gtkpounce.c de840c419642bc944d3a515648adff913ed95da7
@@ -464,8 +464,9 @@ reset_send_msg_entry(PidginPounceDialog
reset_send_msg_entry(PidginPounceDialog *dialog, GtkWidget *dontcare)
{
PurpleAccount *account = pidgin_account_option_menu_get_selected(dialog->account_menu);
+ PurpleConnection *conn = account ? purple_account_get_connection(account) : NULL;
gtk_imhtml_setup_entry(GTK_IMHTML(dialog->send_msg_entry),
- (account && account->gc) ? account->gc->flags : PURPLE_CONNECTION_HTML);
+ conn ? purple_connection_get_flags(conn) : PURPLE_CONNECTION_FLAGS_HTML);
}
void
@@ -1353,9 +1354,9 @@ pidgin_pounces_manager_show(void)
button = pidgin_dialog_add_button(GTK_DIALOG(win), GTK_STOCK_ADD, G_CALLBACK(pounces_manager_add_cb), dialog);
gtk_widget_set_sensitive(button, (purple_accounts_get_all() != NULL));
- purple_signal_connect(purple_connections_get_handle(), "signed-on",
+ purple_signal_connect(NULL, "signed-on",
pounces_manager, PURPLE_CALLBACK(pounces_manager_connection_cb), button);
- purple_signal_connect(purple_connections_get_handle(), "signed-off",
+ purple_signal_connect(NULL, "signed-off",
pounces_manager, PURPLE_CALLBACK(pounces_manager_connection_cb), button);
/* Modify button */
@@ -1493,7 +1494,7 @@ pounce_cb(PurplePounce *pounce, PurplePo
purple_conversation_write(conv, NULL, message,
PURPLE_MESSAGE_SEND, time(NULL));
- serv_send_im(account->gc, (char *)pouncee, (char *)message, 0);
+ serv_send_im(purple_account_get_connection(account), (char *)pouncee, (char *)message, 0);
}
}
@@ -1641,10 +1642,10 @@ pidgin_pounces_init(void)
purple_prefs_add_int(PIDGIN_PREFS_ROOT "/pounces/dialog/width", 520);
purple_prefs_add_int(PIDGIN_PREFS_ROOT "/pounces/dialog/height", 321);
- purple_signal_connect(purple_connections_get_handle(), "signed-on",
+ purple_signal_connect(NULL, "signed-on",
pidgin_pounces_get_handle(),
PURPLE_CALLBACK(signed_on_off_cb), NULL);
- purple_signal_connect(purple_connections_get_handle(), "signed-off",
+ purple_signal_connect(NULL, "signed-off",
pidgin_pounces_get_handle(),
PURPLE_CALLBACK(signed_on_off_cb), NULL);
}
============================================================
--- pidgin/gtkprefs.c 9e5b577d41296d852cc46d3cc26232a4d09b9e1d
+++ pidgin/gtkprefs.c 97be637cb2f4c5cedccebc1e5db2b99e6ecc0569
@@ -1011,7 +1011,7 @@ conv_page(void)
gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0);
- gtk_imhtml_setup_entry(GTK_IMHTML(imhtml), PURPLE_CONNECTION_HTML | PURPLE_CONNECTION_FORMATTING_WBFO);
+ gtk_imhtml_setup_entry(GTK_IMHTML(imhtml), PURPLE_CONNECTION_FLAGS_HTML | PURPLE_CONNECTION_FLAGS_FORMATTING_WBFO);
g_signal_connect_after(G_OBJECT(imhtml), "format_function_toggle",
G_CALLBACK(formatting_toggle_cb), toolbar);
============================================================
--- pidgin/gtkroomlist.c c93305e14b0798bee63d6ebf7563d294ba0da3b9
+++ pidgin/gtkroomlist.c 5ad2cd2bf55b5a30853774c8d426753052db2a90
@@ -223,7 +223,7 @@ static void do_add_room_cb(GtkWidget *w,
PurplePluginProtocolInfo *prpl_info = NULL;
if(gc != NULL)
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
if(prpl_info != NULL && prpl_info->roomlist_room_serialize)
name = prpl_info->roomlist_room_serialize(info->room);
@@ -493,7 +493,7 @@ static gboolean account_filter_func(Purp
PurpleConnection *gc = purple_account_get_connection(account);
PurplePluginProtocolInfo *prpl_info = NULL;
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
return (prpl_info->roomlist_get_list != NULL);
}
============================================================
--- pidgin/gtksound.c dfc2a2429ae9e08398e5b65bb84d049d5d7f5f8e
+++ pidgin/gtksound.c 02f1956c630056f502490a64009682510222ba4a
@@ -265,7 +265,7 @@ pidgin_sound_init(void)
GError *error = NULL;
#endif
- purple_signal_connect(purple_connections_get_handle(), "signed-on",
+ purple_signal_connect(NULL, "signed-on",
gtk_sound_handle, PURPLE_CALLBACK(account_signon_cb),
NULL);
============================================================
--- pidgin/gtkutils.c c1df08bf1cb4ced8761c4b0dd18fdabcb0d60755
+++ pidgin/gtkutils.c 34e6f624cc5a126eb5b7cdeb8d85f30a2d73ecf8
@@ -877,10 +877,10 @@ pidgin_account_option_menu_new(PurpleAcc
G_CALLBACK(account_menu_destroyed_cb), NULL);
/* Register the purple sign on/off event callbacks. */
- purple_signal_connect(purple_connections_get_handle(), "signed-on",
+ purple_signal_connect(NULL, "signed-on",
optmenu, PURPLE_CALLBACK(account_menu_sign_on_off_cb),
optmenu);
- purple_signal_connect(purple_connections_get_handle(), "signed-off",
+ purple_signal_connect(NULL, "signed-off",
optmenu, PURPLE_CALLBACK(account_menu_sign_on_off_cb),
optmenu);
#if 0
@@ -1013,7 +1013,7 @@ void pidgin_retrieve_user_info_in_chat(P
return;
}
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(conn->prpl);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(conn));
if (prpl_info == NULL || prpl_info->get_cb_info == NULL) {
pidgin_retrieve_user_info(conn, name);
return;
@@ -1138,7 +1138,7 @@ pidgin_parse_x_im_contact(const char *ms
gc = (PurpleConnection *)l->data;
account = purple_connection_get_account(gc);
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
}
protoname = prpl_info->list_icon(account, NULL);
@@ -1180,7 +1180,7 @@ pidgin_parse_x_im_contact(const char *ms
gc = (PurpleConnection *)l->data;
account = purple_connection_get_account(gc);
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
}
protoname = prpl_info->list_icon(account, NULL);
@@ -1584,7 +1584,7 @@ pidgin_dnd_file_manage(GtkSelectionData
data->account = account;
if (gc)
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
if (prpl_info && prpl_info->options & OPT_PROTO_IM_IMAGE)
im = TRUE;
@@ -2241,9 +2241,9 @@ pidgin_setup_screenname_autocomplete_wit
#endif /* !NEW_STYLE_COMPLETION */
#if 0
- purple_signal_connect(purple_connections_get_handle(), "signed-on", entry,
+ purple_signal_connect(NULL, "signed-on", entry,
PURPLE_CALLBACK(repopulate_autocomplete), data);
- purple_signal_connect(purple_connections_get_handle(), "signed-off", entry,
+ purple_signal_connect(NULL, "signed-off", entry,
PURPLE_CALLBACK(repopulate_autocomplete), data);
purple_signal_connect(purple_accounts_get_handle(), "account-added", entry,
@@ -3036,7 +3036,7 @@ pidgin_make_mini_dialog(PurpleConnection
if (first_call) {
first_call = FALSE;
- purple_signal_connect(purple_connections_get_handle(), "signed-off",
+ purple_signal_connect(NULL, "signed-off",
pidgin_utils_get_handle(),
PURPLE_CALLBACK(connection_signed_off_cb), NULL);
}
More information about the Commits
mailing list