pidgin: dd4914d9: Ignore token_status_account on account-s...
sadrul at pidgin.im
sadrul at pidgin.im
Tue Apr 22 01:35:45 EDT 2008
-----------------------------------------------------------------
Revision: dd4914d911799b6990814ac4de4180542e106d36
Ancestor: 0fb5c2a94109c3921d619c2149e12569e30116ee
Author: sadrul at pidgin.im
Date: 2008-04-22T05:32:08
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/dd4914d911799b6990814ac4de4180542e106d36
Modified files:
pidgin/gtkstatusbox.c
ChangeLog:
Ignore token_status_account on account-specific status boxes. This should
fix a plugin-pack bug (#501).
-------------- next part --------------
============================================================
--- pidgin/gtkstatusbox.c 672735550370d8d3aab4322b220a734e379fa31c
+++ pidgin/gtkstatusbox.c 2a9e605436b19b55b86144cd4841cd95c6084647
@@ -74,6 +74,7 @@ static gint get_statusbox_index(PidginSt
static void remove_typing_cb(PidginStatusBox *box);
static void update_size (PidginStatusBox *box);
static gint get_statusbox_index(PidginStatusBox *box, PurpleSavedStatus *saved_status);
+static PurpleAccount* check_active_accounts_for_identical_statuses(void);
static void pidgin_status_box_pulse_typing(PidginStatusBox *status_box);
static void pidgin_status_box_refresh(PidginStatusBox *status_box);
@@ -497,6 +498,10 @@ pidgin_status_box_set_property(GObject *
break;
case PROP_ACCOUNT:
statusbox->account = g_value_get_pointer(value);
+ if (statusbox->account)
+ statusbox->token_status_account = NULL;
+ else
+ statusbox->token_status_account = check_active_accounts_for_identical_statuses();
pidgin_status_box_regenerate(statusbox);
@@ -628,7 +633,7 @@ pidgin_status_box_refresh(PidginStatusBo
GdkPixbuf *pixbuf, *emblem = NULL;
GtkTreePath *path;
gboolean account_status = FALSE;
- PurpleAccount *acct = (status_box->token_status_account) ? status_box->token_status_account : status_box->account;
+ PurpleAccount *acct = (status_box->account) ? status_box->account : status_box->token_status_account;
icon_size = gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL);
@@ -1228,9 +1233,13 @@ cache_pixbufs(PidginStatusBox *status_bo
icon_size, "PidginStatusBox");
}
-static void account_enabled_cb(PurpleAccount *acct, PidginStatusBox *status_box) {
+static void account_enabled_cb(PurpleAccount *acct, PidginStatusBox *status_box)
+{
PurpleAccount *initial_token_acct = status_box->token_status_account;
+ if (status_box->account)
+ return;
+
status_box->token_status_account = check_active_accounts_for_identical_statuses();
/* Regenerate the list if it has changed */
More information about the Commits
mailing list