Remove the remnants of the old menu bar in gtkconv.

Fri, 19 Aug 2022 00:06:55 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Fri, 19 Aug 2022 00:06:55 -0500
changeset 41509
b8f90275a32e
parent 41508
b248346ee70b
child 41510
630da93b9984

Remove the remnants of the old menu bar in gtkconv.

This was originally left so make it easier to implement actions in the new
menu bar, but the remaining stuff is straight forward enough that we don't need
to leave it around.

Testing Done:
Compiled

Reviewed at https://reviews.imfreedom.org/r/1603/

pidgin/gtkconv.c file | annotate | diff | comparison | revisions
--- a/pidgin/gtkconv.c	Thu Aug 18 23:27:55 2022 -0500
+++ b/pidgin/gtkconv.c	Fri Aug 19 00:06:55 2022 -0500
@@ -280,35 +280,6 @@
 	talkatu_buffer_clear(TALKATU_BUFFER(buffer));
 }
 
-static void
-add_remove_cb(GtkWidget *widget, PidginConversation *gtkconv)
-{
-	PurpleAccount *account;
-	const char *name;
-	PurpleConversation *conv = gtkconv->active_conv;
-
-	account = purple_conversation_get_account(conv);
-	name    = purple_conversation_get_name(conv);
-
-	if (PURPLE_IS_IM_CONVERSATION(conv)) {
-		PurpleBuddy *b;
-
-		b = purple_blist_find_buddy(account, name);
-		if (b != NULL)
-			pidgin_dialogs_remove_buddy(b);
-		else if (account != NULL && purple_account_is_connected(account))
-			purple_blist_request_add_buddy(account, (char *)name, NULL, NULL);
-	} else if (PURPLE_IS_CHAT_CONVERSATION(conv)) {
-		PurpleChat *c;
-
-		c = purple_blist_find_chat(account, name);
-		if (c != NULL)
-			pidgin_dialogs_remove_chat(c);
-		else if (account != NULL && purple_account_is_connected(account))
-			purple_blist_request_add_chat(account, NULL, NULL, name);
-	}
-}
-
 static void chat_do_info(PidginConversation *gtkconv, const char *who)
 {
 	PurpleChatConversation *chat = PURPLE_CHAT_CONVERSATION(gtkconv->active_conv);
@@ -320,80 +291,6 @@
 }
 
 static void
-block_cb(GtkWidget *widget, PidginConversation *gtkconv)
-{
-	PurpleConversation *conv = gtkconv->active_conv;
-	PurpleAccount *account;
-
-	account = purple_conversation_get_account(conv);
-
-	if (account != NULL && purple_account_is_connected(account))
-		pidgin_request_add_block(account, purple_conversation_get_name(conv));
-}
-
-static void
-unblock_cb(GtkWidget *widget, PidginConversation *gtkconv)
-{
-	PurpleConversation *conv = gtkconv->active_conv;
-	PurpleAccount *account;
-
-	account = purple_conversation_get_account(conv);
-
-	if (account != NULL && purple_account_is_connected(account))
-		pidgin_request_add_permit(account, purple_conversation_get_name(conv));
-}
-
-static void
-menu_initiate_media_call_cb(GtkAction *action, gpointer data)
-{
-#if 0
-	PidginConvWindow *win = (PidginConvWindow *)data;
-	PurpleConversation *conv = pidgin_conv_window_get_active_conversation(win);
-	PurpleAccount *account = purple_conversation_get_account(conv);
-
-	purple_protocol_initiate_media(account,
-			purple_conversation_get_name(conv),
-			action == win->menu->audio_call ? PURPLE_MEDIA_AUDIO :
-			action == win->menu->video_call ? PURPLE_MEDIA_VIDEO :
-			action == win->menu->audio_video_call ? PURPLE_MEDIA_AUDIO |
-			PURPLE_MEDIA_VIDEO : PURPLE_MEDIA_NONE);
-#endif
-}
-
-static void
-menu_block_cb(GtkAction *action, gpointer data)
-{
-	PidginConversationWindow *win = data;
-	PurpleConversation *conv;
-
-	conv = pidgin_conversation_window_get_selected(win);
-
-	block_cb(NULL, PIDGIN_CONVERSATION(conv));
-}
-
-static void
-menu_unblock_cb(GtkAction *action, gpointer data)
-{
-	PidginConversationWindow *win = data;
-	PurpleConversation *conv;
-
-	conv = pidgin_conversation_window_get_selected(win);
-
-	unblock_cb(NULL, PIDGIN_CONVERSATION(conv));
-}
-
-static void
-menu_add_remove_cb(GtkAction *action, gpointer data)
-{
-	PidginConversationWindow *win = data;
-	PurpleConversation *conv;
-
-	conv = pidgin_conversation_window_get_selected(win);
-
-	add_remove_cb(NULL, PIDGIN_CONVERSATION(conv));
-}
-
-static void
 chat_do_im(PidginConversation *gtkconv, const char *who)
 {
 	PurpleConversation *conv = gtkconv->active_conv;
@@ -988,23 +885,6 @@
 	g_object_set_data(G_OBJECT(gtkconv->entry), "transient_buddy", NULL);
 }
 
-static GtkActionEntry menu_entries[] =
-/* TODO: fill out tooltips... */
-{
-	/* Conversation menu */
-	{ "ConversationMenu", NULL, N_("_Conversation"), NULL, NULL, NULL },
-
-	{ "MediaMenu", NULL, N_("M_edia"), NULL, NULL, NULL },
-	{ "AudioCall", NULL, N_("_Audio Call"), NULL, NULL, G_CALLBACK(menu_initiate_media_call_cb) },
-	{ "VideoCall", NULL, N_("_Video Call"), NULL, NULL, G_CALLBACK(menu_initiate_media_call_cb) },
-	{ "AudioVideoCall", NULL, N_("Audio/Video _Call"), NULL, NULL, G_CALLBACK(menu_initiate_media_call_cb) },
-
-	{ "Block", NULL, N_("_Block..."), NULL, NULL, G_CALLBACK(menu_block_cb) },
-	{ "Unblock", NULL, N_("_Unblock..."), NULL, NULL, G_CALLBACK(menu_unblock_cb) },
-	{ "Add", NULL, N_("_Add..."), NULL, NULL, G_CALLBACK(menu_add_remove_cb) },
-	{ "Remove", NULL, N_("_Remove..."), NULL, NULL, G_CALLBACK(menu_add_remove_cb) },
-};
-
 /**************************************************************************
  * Utility functions
  **************************************************************************/

mercurial