# HG changeset patch
# Node ID 3634aef0f9c3
# Parent  04a97e6730d2
diff --git a/ChangeLog.API b/ChangeLog.API
--- a/ChangeLog.API
+++ b/ChangeLog.API
@@ -1057,6 +1057,8 @@
 		* pidgin_dialog_get_action_area
 		* pidgin_dialog_get_vbox
 		* pidgin_dialog_get_vbox_with_properties
+		* pidgin_dialogs_alias_buddy
+		* pidgin_dialogs_alias_chat
 		* pidgin_dialogs_alias_contact
 		* pidgin_dialogs_destroy_all
 		* pidgin_dialogs_log
diff --git a/pidgin/gtkdialogs.h b/pidgin/gtkdialogs.h
--- a/pidgin/gtkdialogs.h
+++ b/pidgin/gtkdialogs.h
@@ -41,12 +41,6 @@
 PIDGIN_AVAILABLE_IN_ALL
 void pidgin_dialogs_info(void);
 
-PIDGIN_AVAILABLE_IN_ALL
-void pidgin_dialogs_alias_buddy(PurpleBuddy *buddy);
-
-PIDGIN_AVAILABLE_IN_ALL
-void pidgin_dialogs_alias_chat(PurpleChat *chat);
-
 G_END_DECLS
 
 #endif /* _PIDGINDIALOGS_H_ */
diff --git a/pidgin/gtkdialogs.c b/pidgin/gtkdialogs.c
--- a/pidgin/gtkdialogs.c
+++ b/pidgin/gtkdialogs.c
@@ -179,56 +179,3 @@
 	        page, _("OK"), G_CALLBACK(pidgin_dialogs_info_cb),
 	        _("Cancel"), NULL, NULL, NULL);
 }
-
-static void
-pidgin_dialogs_alias_buddy_cb(PurpleBuddy *buddy, const char *new_alias)
-{
-	purple_buddy_set_local_alias(buddy, new_alias);
-	purple_serv_alias_buddy(buddy);
-}
-
-void
-pidgin_dialogs_alias_buddy(PurpleBuddy *buddy)
-{
-	gchar *secondary;
-
-	g_return_if_fail(buddy != NULL);
-
-	secondary = g_strdup_printf(_("Enter an alias for %s."), purple_buddy_get_name(buddy));
-
-	purple_request_input(NULL, _("Alias Buddy"), NULL,
-					   secondary, purple_buddy_get_local_alias(buddy), FALSE, FALSE, NULL,
-					   _("Alias"), G_CALLBACK(pidgin_dialogs_alias_buddy_cb),
-					   _("Cancel"), NULL,
-					   purple_request_cpar_from_account(purple_buddy_get_account(buddy)),
-					   buddy);
-
-	g_free(secondary);
-}
-
-static void
-pidgin_dialogs_alias_chat_cb(PurpleChat *chat, const char *new_alias)
-{
-	purple_chat_set_alias(chat, new_alias);
-}
-
-void
-pidgin_dialogs_alias_chat(PurpleChat *chat)
-{
-	gchar *alias;
-
-	g_return_if_fail(chat != NULL);
-
-	g_object_get(chat, "alias", &alias, NULL);
-
-	purple_request_input(NULL, _("Alias Chat"), NULL,
-					   _("Enter an alias for this chat."),
-					   alias, FALSE, FALSE, NULL,
-					   _("Alias"), G_CALLBACK(pidgin_dialogs_alias_chat_cb),
-					   _("Cancel"), NULL,
-					   purple_request_cpar_from_account(purple_chat_get_account(chat)),
-					   chat);
-
-	g_free(alias);
-}
-
diff --git a/pidgin/pidgindisplaywindow.c b/pidgin/pidgindisplaywindow.c
--- a/pidgin/pidgindisplaywindow.c
+++ b/pidgin/pidgindisplaywindow.c
@@ -103,74 +103,9 @@
 }
 
 /******************************************************************************
- * Callbacks
- *****************************************************************************/
-static void
-pidgin_display_window_invite_cb(GtkDialog *dialog, gint response_id,
-                                G_GNUC_UNUSED gpointer data)
-{
-	PidginInviteDialog *invite_dialog = PIDGIN_INVITE_DIALOG(dialog);
-	PurpleChatConversation *chat = NULL;
-
-	chat = pidgin_invite_dialog_get_conversation(invite_dialog);
-
-	g_object_set_data(G_OBJECT(chat), "pidgin-invite-dialog", NULL);
-
-	if(response_id == GTK_RESPONSE_ACCEPT) {
-		const gchar *contact = NULL, *message = NULL;
-
-		contact = pidgin_invite_dialog_get_contact(invite_dialog);
-		message = pidgin_invite_dialog_get_message(invite_dialog);
-
-		if(!purple_strequal(contact, "")) {
-			PurpleConnection *connection = NULL;
-
-			connection = purple_conversation_get_connection(PURPLE_CONVERSATION(chat));
-			purple_serv_chat_invite(connection,
-			                        purple_chat_conversation_get_id(chat),
-			                        message, contact);
-		}
-	}
-
-	gtk_window_destroy(GTK_WINDOW(invite_dialog));
-}
-
-/******************************************************************************
  * Actions
  *****************************************************************************/
 static void
-pidgin_display_window_alias(G_GNUC_UNUSED GSimpleAction *simple,
-                            G_GNUC_UNUSED GVariant *parameter,
-                            gpointer data)
-{
-	PidginDisplayWindow *window = data;
-	PurpleConversation *selected = NULL;
-
-	selected = pidgin_display_window_get_selected(window);
-	if(PURPLE_IS_CONVERSATION(selected)) {
-		PurpleAccount *account;
-		const gchar *name;
-
-		account = purple_conversation_get_account(selected);
-		name = purple_conversation_get_name(selected);
-
-		if(PURPLE_IS_IM_CONVERSATION(selected)) {
-			PurpleBuddy *buddy = purple_blist_find_buddy(account, name);
-
-			if(PURPLE_IS_BUDDY(buddy)) {
-				pidgin_dialogs_alias_buddy(buddy);
-			}
-		} else if(PURPLE_IS_CHAT_CONVERSATION(selected)) {
-			PurpleChat *chat = purple_blist_find_chat(account, name);
-
-			if(PURPLE_IS_CHAT(chat)) {
-				pidgin_dialogs_alias_chat(chat);
-			}
-		}
-	}
-}
-
-static void
 pidgin_display_window_close_conversation(G_GNUC_UNUSED GSimpleAction *simple,
                                          G_GNUC_UNUSED GVariant *parameter,
                                          gpointer data)
@@ -213,39 +148,6 @@
 }
 
 static void
-pidgin_display_window_invite(G_GNUC_UNUSED GSimpleAction *simple,
-                             G_GNUC_UNUSED GVariant *parameter,
-                             gpointer data)
-{
-	PidginDisplayWindow *window = data;
-	PurpleConversation *selected = NULL;
-
-	selected = pidgin_display_window_get_selected(window);
-	if(PURPLE_IS_CHAT_CONVERSATION(selected)) {
-		GtkWidget *invite_dialog = NULL;
-
-		invite_dialog = g_object_get_data(G_OBJECT(selected),
-		                                  "pidgin-invite-dialog");
-
-		if(!GTK_IS_WIDGET(invite_dialog)) {
-			invite_dialog = pidgin_invite_dialog_new(PURPLE_CHAT_CONVERSATION(selected));
-			g_object_set_data(G_OBJECT(selected), "pidgin-invite-dialog",
-			                  invite_dialog);
-
-			gtk_window_set_transient_for(GTK_WINDOW(invite_dialog),
-			                             GTK_WINDOW(window));
-			gtk_window_set_destroy_with_parent(GTK_WINDOW(invite_dialog), TRUE);
-
-			g_signal_connect(invite_dialog, "response",
-			                 G_CALLBACK(pidgin_display_window_invite_cb),
-			                 NULL);
-		}
-
-		gtk_widget_set_visible(invite_dialog, TRUE);
-	}
-}
-
-static void
 pidgin_display_window_send_file(G_GNUC_UNUSED GSimpleAction *simple,
                                 G_GNUC_UNUSED GVariant *parameter,
                                 gpointer data)
@@ -266,18 +168,12 @@
 
 static GActionEntry win_entries[] = {
 	{
-		.name = "alias",
-		.activate = pidgin_display_window_alias
-	}, {
 		.name = "close",
 		.activate = pidgin_display_window_close_conversation
 	}, {
 		.name = "get-info",
 		.activate = pidgin_display_window_get_info
 	}, {
-		.name = "invite",
-		.activate = pidgin_display_window_invite
-	}, {
 		.name = "send-file",
 		.activate = pidgin_display_window_send_file
 	}
