diff finch/gntblist.c @ 25468:bf77cf06b082

propagate from branch 'im.pidgin.pidgin' (head e9234bfbd01e96e8cc032fe7d850d4108f40b82a) to branch 'im.pidgin.pidgin.yaz' (head 9314d025b5c8c2c689ae540bf6f487ed12b44e7a)
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Thu, 26 Apr 2007 21:15:41 +0000
parents 08db93bbd798
children 0b97b224a829
line wrap: on
line diff
--- a/finch/gntblist.c	Wed Apr 25 07:57:26 2007 +0000
+++ b/finch/gntblist.c	Thu Apr 26 21:15:41 2007 +0000
@@ -53,7 +53,7 @@
 #include "gntstatus.h"
 #include <string.h>
 
-#define PREF_ROOT "/purple/gnt/blist"
+#define PREF_ROOT "/finch/blist"
 #define TYPING_TIMEOUT 4000
 
 typedef struct
@@ -313,7 +313,11 @@
 	purple_request_field_group_add_field(group, field);
 
 	purple_request_fields(NULL, _("Add Buddy"), NULL, _("Please enter buddy information."),
-			fields, _("Add"), G_CALLBACK(add_buddy_cb), _("Cancel"), NULL, NULL);
+			fields,
+			_("Add"), G_CALLBACK(add_buddy_cb),
+			_("Cancel"), NULL,
+			account, NULL, NULL,
+			NULL);
 }
 
 static void
@@ -380,7 +384,9 @@
 
 	purple_request_fields(NULL, _("Add Chat"), NULL,
 			_("You can edit more information from the context menu later."),
-			fields, _("Add"), G_CALLBACK(add_chat_cb), _("Cancel"), NULL, NULL);
+			fields, _("Add"), G_CALLBACK(add_chat_cb), _("Cancel"), NULL,
+			NULL, NULL, NULL,
+			NULL);
 }
 
 static void
@@ -413,7 +419,9 @@
 {
 	purple_request_input(NULL, _("Add Group"), NULL, _("Enter the name of the group"),
 			NULL, FALSE, FALSE, NULL,
-			_("Add"), G_CALLBACK(add_group_cb), _("Cancel"), NULL, NULL);
+			_("Add"), G_CALLBACK(add_group_cb), _("Cancel"), NULL,
+			NULL, NULL, NULL,
+			NULL);
 }
 
 static PurpleBlistUiOps blist_ui_ops =
@@ -739,7 +747,9 @@
 	g_list_free(parts);
 
 	purple_request_fields(NULL, _("Edit Chat"), NULL, _("Please Update the necessary fields."),
-			fields, _("Edit"), G_CALLBACK(chat_components_edit_ok), _("Cancel"), NULL, chat);
+			fields, _("Edit"), G_CALLBACK(chat_components_edit_ok), _("Cancel"), NULL,
+			NULL, NULL, NULL,
+			chat);
 }
 
 static void
@@ -927,7 +937,9 @@
 	text = PURPLE_BLIST_NODE_IS_GROUP(node) ? _("Rename") : _("Alias");
 	purple_request_input(node, text, prompt, _("Enter empty string to reset the name."),
 			name, FALSE, FALSE, NULL, text, G_CALLBACK(rename_blist_node),
-			_("Cancel"), NULL, node);
+			_("Cancel"), NULL,
+			NULL, NULL, NULL,
+			node);
 
 	g_free(prompt);
 }
@@ -990,6 +1002,7 @@
 static void
 finch_blist_remove_node_cb(PurpleBlistNode *node, PurpleBlistNode *selected)
 {
+	PurpleAccount *account = NULL;
 	char *primary;
 	const char *name, *sec = NULL;
 
@@ -999,12 +1012,12 @@
 		name = purple_contact_get_alias(c);
 		if (c->totalsize > 1)
 			sec = _("Removing this contact will also remove all the buddies in the contact");
-	} else if (PURPLE_BLIST_NODE_IS_BUDDY(node))
+	} else if (PURPLE_BLIST_NODE_IS_BUDDY(node)) {
 		name = purple_buddy_get_name((PurpleBuddy*)node);
-	else if (PURPLE_BLIST_NODE_IS_CHAT(node))
+		account = purple_buddy_get_account((PurpleBuddy*)node);
+	} else if (PURPLE_BLIST_NODE_IS_CHAT(node)) {
 		name = purple_chat_get_name((PurpleChat*)node);
-	else if (PURPLE_BLIST_NODE_IS_GROUP(node))
-	{
+	} else if (PURPLE_BLIST_NODE_IS_GROUP(node)) {
 		name = ((PurpleGroup*)node)->name;
 		sec = _("Removing this group will also remove all the buddies in the group");
 	}
@@ -1016,7 +1029,9 @@
 	/* XXX: anything to do with the returned ui-handle? */
 	purple_request_action(node, _("Confirm Remove"),
 			primary, sec,
-			1, node, 2,
+			1,
+			account, name, NULL,
+			node, 2,
 			_("Remove"), finch_blist_remove_node,
 			_("Cancel"), NULL);
 	g_free(primary);
@@ -1197,7 +1212,7 @@
 		prpl_info->tooltip_text(buddy, user_info, TRUE);
 	}
 
-	if (purple_prefs_get_bool("/purple/gnt/blist/idletime")) {
+	if (purple_prefs_get_bool("/finch/blist/idletime")) {
 		PurplePresence *pre = purple_buddy_get_presence(buddy);
 		if (purple_presence_is_idle(pre)) {
 			time_t idle = purple_presence_get_idle_time(pre);
@@ -2052,6 +2067,7 @@
 						fields,
 						_("OK"), G_CALLBACK(send_im_select_cb),
 						_("Cancel"), NULL,
+						NULL, NULL, NULL,
 						NULL);
 }