# HG changeset patch
# Node ID 4973c5468d53
# Parent  ba39c2657d78
diff --git a/ChangeLog.API b/ChangeLog.API
--- a/ChangeLog.API
+++ b/ChangeLog.API
@@ -1046,6 +1046,10 @@
 		* pidgin_conv_update_buddy_icon
 		* pidgin_conv_update_buttons_by_protocol
 		* pidgin_conversations_fill_menu
+		* pidgin_conversations_get_conv_ui_ops
+		* pidgin_conversations_get_handle
+		* pidgin_conversations_init
+		* pidgin_conversations_uninit
 		* pidgin_conversations_get_unseen_all
 		* pidgin_convert_buddy_icon
 		* pidgin_create_dialog, use pidgin_dialog_new instead.
diff --git a/doc/reference/pidgin/meson.build b/doc/reference/pidgin/meson.build
--- a/doc/reference/pidgin/meson.build
+++ b/doc/reference/pidgin/meson.build
@@ -1,5 +1,4 @@
 pidgin_doc_content_files = [
-	'signals_gtkconv.md',
 ]
 
 if get_option('doc')
diff --git a/doc/reference/pidgin/pidgin.toml.in b/doc/reference/pidgin/pidgin.toml.in
--- a/doc/reference/pidgin/pidgin.toml.in
+++ b/doc/reference/pidgin/pidgin.toml.in
@@ -52,7 +52,6 @@
 [extra]
 # The same order will be used when generating the index
 content_files = [
-	"signals_gtkconv.md",
 ]
 content_images = [
 ]
diff --git a/doc/reference/pidgin/signals_gtkconv.md b/doc/reference/pidgin/signals_gtkconv.md
deleted file mode 100644
--- a/doc/reference/pidgin/signals_gtkconv.md
+++ /dev/null
@@ -1,174 +0,0 @@
-Title: Conversation Signals
-Slug: conversation-signals
-
-## Conversation signals
-
-### displaying-im-msg
-
-```c
-gboolean
-user_function(PurpleAccount *account,
-              const gchar *who,
-              gchar **message,
-              PurpleConversation *conv,
-              PurpleMessageFlags flags,
-              gpointer user_data);
-```
-
-Emitted just before a message is displayed in an IM conversation. `message` is
-a pointer to a string, so the plugin can replace the message that will be
-displayed. This can also be used to cancel displaying a message by returning
-`TRUE`.
-
-> **NOTE:** Make sure to free `*message` before you replace it!
-
-**Parameters:**
-
-**account**
-: The account.
-
-**who**
-: The name of the user.
-
-**message**
-: A pointer to the message.
-
-**conv**
-: The conversation.
-
-**flags**
-: Flags for this message.
-
-**user_data**
-: User data set when the signal handler was connected.
-
-**Returns:**
-
-`TRUE` if the message should be canceled, or `FALSE` otherwise.
-
-## displayed-im-msg
-
-```c
-void
-user_function(PurpleAccount *account,
-              const gchar *who,
-              gchar *message,
-              PurpleConversation *conv,
-              PurpleMessageFlags flags,
-              gpointer user_data);
-```
-
-Emitted after a message is displayed in an IM conversation.
-
-**Parameters:**
-
-**account**
-: The account.
-
-**who**
-: The name of the user.
-
-**message**
-: The message.
-
-**conv**
-: The conversation.
-
-**flags**
-: Flags for this message.
-
-**user_data**
-: User data set when the signal handler was connected.
-
-### displaying-chat-msg
-
-```c
-gboolean
-user_function(PurpleAccount *account,
-              const gchar *who,
-              gchar **message,
-              PurpleConversation *conv,
-              PurpleMessageFlags flags,
-              gpointer user_data);
-```
-
-Emitted just before a message is displayed in a chat. `message` is a pointer to
-a string, so the plugin can replace the message that will be displayed. This
-can also be used to cancel displaying a message by returning `TRUE`.
-
-> **NOTE:** Make sure to free `*message` before you replace it!
-
-**Parameters:**
-
-**account**
-: The account the message is being displayed and sent on.
-
-**who**
-: The name of the user.
-
-**message**
-: A pointer to the message that will be displayed and sent.
-
-**conv**
-: The conversation the message is being displayed and sent on.
-
-**flags**
-: Flags for this message.
-
-**user_data**
-: User data set when the signal handler was connected.
-
-**Returns:**
-
-`TRUE` if the message should be canceled, or `FALSE` otherwise.
-
-### displayed-chat-msg
-
-```c
-void
-user_function(PurpleAccount *account,
-              const gchar *who,
-              gchar *message,
-              PurpleConversation *conv,
-              PurpleMessageFlags flags,
-              gpointer user_data);
-```
-
-Emitted after a message is displayed in a chat conversation.
-
-**Parameters:**
-
-**account**
-: The account the message is being displayed and sent on.
-
-**who**
-: The name of the user.
-
-**message**
-: A pointer to the message that will be displayed and sent.
-
-**conv**
-: The conversation the message is being displayed and sent on.
-
-**flags**
-: Flags for this message.
-
-**user_data**
-: User data set when the signal handler was connected.
-
-
-### conversation-displayed
-
-```c
-void user_function(PidginConversation *gtkconv, gpointer user_data);
-```
-
-Emitted right after the Pidgin UI is attached to a new conversation.
-
-**Parameters:**
-
-**gtkconv**
-: The PidginConversation.
-
-**user_data**
-: User data set when the signal handler was connected.
diff --git a/meson_options.txt b/meson_options.txt
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -46,7 +46,7 @@
 option('gtkui', type : 'boolean', value : true,
        description : 'compile with GTK+ user interface')
 
-option('unity-integration', type : 'feature',
+option('unity-integration', type : 'feature', value : 'disabled',
        description : 'compile with support for unity integration plugin')
 
 ##############################################################################
diff --git a/pidgin/gtkconv.h b/pidgin/gtkconv.h
deleted file mode 100644
--- a/pidgin/gtkconv.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/* pidgin
- *
- * Pidgin is the legal property of its developers, whose names are too numerous
- * to list here.  Please refer to the COPYRIGHT file distributed with this
- * source distribution.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
- */
-
-#if !defined(PIDGIN_GLOBAL_HEADER_INSIDE) && !defined(PIDGIN_COMPILATION)
-# error "only <pidgin.h> may be included directly"
-#endif
-
-#ifndef _PIDGIN_CONVERSATION_H_
-#define _PIDGIN_CONVERSATION_H_
-
-#include <gtk/gtk.h>
-
-typedef struct _PidginConversationOld PidginConversationOld;
-
-#define PIDGIN_CONVERSATION_OLD(conv) \
-	((PidginConversationOld *)g_object_get_data(G_OBJECT(conv), "pidgin"))
-
-#define PIDGIN_IS_PIDGIN_CONVERSATION_OLD(conv) \
-	(purple_conversation_get_ui_ops(conv) == \
-	 pidgin_conversations_get_conv_ui_ops())
-
-#include <purple.h>
-
-#include "pidginversion.h"
-
-/**************************************************************************
- * Structures
- **************************************************************************/
-
-/**
- * PidginConversationOld:
- *
- * A GTK conversation pane.
- */
-struct _PidginConversationOld
-{
-	PurpleConversation *active_conv;
-	GList *convs;
-
-	GtkWidget *tab_cont;
-
-	GtkAdjustment *vadjustment;
-	GtkWidget *history;
-
-	GtkWidget *editor;
-	GtkWidget *entry;
-
-	GtkWidget *infopane;
-};
-
-G_BEGIN_DECLS
-
-/**************************************************************************
- * GTK Conversation API
- **************************************************************************/
-
-/**
- * pidgin_conversations_get_conv_ui_ops:
- *
- * Returns the UI operations structure for GTK conversations.
- *
- * Returns: The GTK conversation operations structure.
- *
- * Since: 2.0.0
- */
-PIDGIN_AVAILABLE_IN_ALL
-PurpleConversationUiOps *pidgin_conversations_get_conv_ui_ops(void);
-
-/**************************************************************************/
-/* GTK Conversations Subsystem                                            */
-/**************************************************************************/
-
-/**
- * pidgin_conversations_get_handle:
- *
- * Returns the gtk conversations subsystem handle.
- *
- * Returns: The conversations subsystem handle.
- *
- * Since: 2.0.0
- */
-PIDGIN_AVAILABLE_IN_ALL
-void *pidgin_conversations_get_handle(void);
-
-/**
- * pidgin_conversations_init:
- *
- * Initializes the GTK conversations subsystem.
- *
- * Since: 2.0.0
- */
-PIDGIN_AVAILABLE_IN_ALL
-void pidgin_conversations_init(void);
-
-/**
- * pidgin_conversations_uninit:
- *
- * Uninitialized the GTK conversation subsystem.
- *
- * Since: 2.0.0
- */
-PIDGIN_AVAILABLE_IN_ALL
-void pidgin_conversations_uninit(void);
-
-G_END_DECLS
-
-#endif /* _PIDGIN_CONVERSATION_H_ */
diff --git a/pidgin/gtkconv.c b/pidgin/gtkconv.c
deleted file mode 100644
--- a/pidgin/gtkconv.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/* pidgin
- *
- * Pidgin is the legal property of its developers, whose names are too numerous
- * to list here.  Please refer to the COPYRIGHT file distributed with this
- * source distribution.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
- *
- */
-
-#include <purpleconfig.h>
-
-#include <purple.h>
-
-#include "gtkconv.h"
-#include "pidgincore.h"
-#include "pidgindisplaywindow.h"
-
-/**************************************************************************
- * Conversation UI operations
- **************************************************************************/
-static void
-conversation_create(PurpleConversation *conv) {
-	GtkWidget *window = NULL;
-
-	window = pidgin_display_window_get_default();
-	pidgin_display_window_add(PIDGIN_DISPLAY_WINDOW(window), conv);
-}
-
-static PurpleConversationUiOps conversation_ui_ops =
-{
-	.create_conversation = conversation_create,
-};
-
-PurpleConversationUiOps *
-pidgin_conversations_get_conv_ui_ops(void)
-{
-	return &conversation_ui_ops;
-}
-
-/**************************************************************************
- * Public conversation utility functions
- **************************************************************************/
-void *
-pidgin_conversations_get_handle(void)
-{
-	static int handle;
-
-	return &handle;
-}
-
-void
-pidgin_conversations_init(void)
-{
-	void *handle = pidgin_conversations_get_handle();
-
-	/* Conversations */
-	purple_prefs_add_none(PIDGIN_PREFS_ROOT "/conversations");
-	purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/conversations/show_incoming_formatting", TRUE);
-	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/minimum_entry_lines", 2);
-
-	/**********************************************************************
-	 * Register signals
-	 **********************************************************************/
-	purple_signal_register(handle, "displaying-im-msg",
-		purple_marshal_BOOLEAN__POINTER_POINTER,
-		G_TYPE_BOOLEAN, 2, PURPLE_TYPE_CONVERSATION, PURPLE_TYPE_MESSAGE);
-
-	purple_signal_register(handle, "displayed-im-msg",
-		purple_marshal_VOID__POINTER_POINTER, G_TYPE_NONE, 2,
-		PURPLE_TYPE_CONVERSATION, PURPLE_TYPE_MESSAGE);
-
-	purple_signal_register(handle, "displaying-chat-msg",
-		purple_marshal_BOOLEAN__POINTER_POINTER,
-		G_TYPE_BOOLEAN, 2, PURPLE_TYPE_CONVERSATION, PURPLE_TYPE_MESSAGE);
-
-	purple_signal_register(handle, "displayed-chat-msg",
-		purple_marshal_VOID__POINTER_POINTER, G_TYPE_NONE, 2,
-		PURPLE_TYPE_CONVERSATION, PURPLE_TYPE_MESSAGE);
-
-	purple_signal_register(handle, "conversation-displayed",
-						 purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
-						 G_TYPE_POINTER); /* (PidginConversationOld *) */
-
-	purple_conversations_set_ui_ops(&conversation_ui_ops);
-}
-
-void
-pidgin_conversations_uninit(void)
-{
-	purple_prefs_disconnect_by_handle(pidgin_conversations_get_handle());
-	purple_signals_disconnect_by_handle(pidgin_conversations_get_handle());
-	purple_signals_unregister_by_instance(pidgin_conversations_get_handle());
-}
diff --git a/pidgin/gtkdialogs.c b/pidgin/gtkdialogs.c
--- a/pidgin/gtkdialogs.c
+++ b/pidgin/gtkdialogs.c
@@ -27,7 +27,6 @@
 
 #include <purple.h>
 
-#include "gtkconv.h"
 #include "gtkdialogs.h"
 #include "gtkutils.h"
 #include "pidgincore.h"
diff --git a/pidgin/meson.build b/pidgin/meson.build
--- a/pidgin/meson.build
+++ b/pidgin/meson.build
@@ -3,7 +3,6 @@
 endif
 
 libpidgin_SOURCES = [
-	'gtkconv.c',
 	'gtkdialogs.c',
 	'gtkidle.c',
 	'gtkmedia.c',
@@ -64,7 +63,6 @@
 ]
 
 libpidgin_headers = [
-	'gtkconv.h',
 	'gtkdialogs.h',
 	'gtkidle.h',
 	'gtkmedia.h',
diff --git a/pidgin/pidgindisplaywindow.c b/pidgin/pidgindisplaywindow.c
--- a/pidgin/pidgindisplaywindow.c
+++ b/pidgin/pidgindisplaywindow.c
@@ -26,7 +26,6 @@
 
 #include "pidgindisplaywindow.h"
 
-#include "gtkconv.h"
 #include "gtkdialogs.h"
 #include "gtkutils.h"
 #include "pidginconversation.h"
diff --git a/pidgin/pidginui.c b/pidgin/pidginui.c
--- a/pidgin/pidginui.c
+++ b/pidgin/pidginui.c
@@ -30,7 +30,6 @@
 
 #include "pidginui.h"
 
-#include "gtkconv.h"
 #include "gtkidle.h"
 #include "gtkmedia.h"
 #include "gtknotify.h"
@@ -133,7 +132,6 @@
 	purple_idle_set_ui(pidgin_idle_new());
 
 	pidgin_request_init();
-	pidgin_conversations_init();
 	pidgin_commands_init();
 	pidgin_roomlist_init();
 	pidgin_medias_init();
@@ -149,7 +147,6 @@
 	 * shut down. */
 	pidgin_notify_uninit();
 	pidgin_commands_uninit();
-	pidgin_conversations_uninit();
 	pidgin_request_uninit();
 	pidgin_debug_window_hide();
 	pidgin_debug_uninit();
diff --git a/po/POTFILES.in b/po/POTFILES.in
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -232,7 +232,6 @@
 libpurple/win32/win32dep.c
 libpurple/xmlnode.c
 pidgin/data/im.pidgin.Pidgin3.metainfo.xml
-pidgin/gtkconv.c
 pidgin/gtkdialogs.c
 pidgin/gtkidle.c
 pidgin/gtkmedia.c
