[pkg-otr-team] [irssi-plugin-otr] 97/167: switch_active on select_meta.
Holger Levsen
holger at moszumanska.debian.org
Mon Mar 3 21:55:36 UTC 2014
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to tag 4.0.0
in repository irssi-plugin-otr.
commit 0741458bfb15e5be63fd2a0b59f361b73ba23bbd
Author: Rob Smits <rdfsmits at cs.uwaterloo.ca>
Date: Thu Jun 7 01:55:46 2012 -0400
switch_active on select_meta.
---
gtk-dialog.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/gtk-dialog.c b/gtk-dialog.c
index 21d9a3d..f85500a 100644
--- a/gtk-dialog.c
+++ b/gtk-dialog.c
@@ -2120,7 +2120,8 @@ static GList* otr_get_full_buddy_list(PurpleConversation *conv) {
buds = purple_find_buddies ( gtkconv->active_conv->account,
gtkconv->active_conv->name );
- if ( buds == NULL) { /* buddy not on list */
+ if ( buds == NULL
+ && !g_list_find(conv_list, conv)) { /* buddy not on list */
conv_list = g_list_prepend ( conv_list, conv);
} else {
for ( l = buds; l != NULL; l = l->next ) {
@@ -2149,7 +2150,8 @@ static GList* otr_get_full_buddy_list(PurpleConversation *conv) {
pres_list = g_list_prepend ( pres_list, presence );
- if (currentConv != NULL) {
+ if (currentConv != NULL &&
+ !g_list_find(conv_list, currentConv)) {
conv_list = g_list_prepend ( conv_list,
currentConv );
}
@@ -2183,13 +2185,14 @@ static void select_meta_ctx(GtkWidget *widget, gpointer data) {
"otr-select_best");
GtkWidget *select_recent = (GtkWidget *) purple_conversation_get_data(conv,
"otr-select_recent");
- gboolean value = gtk_check_menu_item_get_active(
- GTK_CHECK_MENU_ITEM(widget));
+ gboolean value = FALSE;
otrl_instag_t * selected_instance = (otrl_instag_t *)
purple_conversation_get_data(conv, "otr-ui_selected_ctx");
ConnContext * context = NULL;
ConnContext * recent_context = NULL;
+ value = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget));
+
if (widget == select_best) {
GTK_CHECK_MENU_ITEM(select_recent)->active = !value;
@@ -2226,6 +2229,7 @@ static void select_meta_ctx(GtkWidget *widget, gpointer data) {
if (!context) context = (ConnContext *)
otrg_plugin_conv_to_selected_context(conv, 1);
+ pidgin_conv_switch_active_conversation(conv);
dialog_update_label(context);
}
@@ -2557,6 +2561,7 @@ static void otr_add_buddy_top_menus(PurpleConversation *conv) {
PurpleAccount *account;
char *username;
const char *accountname, *proto;
+ GList * contexts = NULL;
currentConv = list_iter->data;
@@ -2573,7 +2578,6 @@ static void otr_add_buddy_top_menus(PurpleConversation *conv) {
proto = purple_account_get_protocol_id(account);
username = g_strdup(purple_normalize(account,
purple_conversation_get_name(currentConv)));
- GList * contexts = NULL;
for (currentContext = otrg_plugin_userstate->context_root;
currentContext != NULL;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-otr/packages/irssi-plugin-otr.git
More information about the Pkg-otr-team
mailing list