pidgin/purple-plugin-pack

6ebd1efabcb6
propagate from branch 'org.guifications.plugins' (head 8fc9912524d80c771996d1d2f1bf6ecfd3bd5f94)
to branch 'org.guifications.plugins.smartear' (head 54d9e07be7d1d796378dba8bcca364e8d582fd2c)
--- a/AUTHORS Mon Aug 06 18:23:33 2007 -0400
+++ b/AUTHORS Mon Aug 06 18:24:49 2007 -0400
@@ -17,7 +17,16 @@
Packagers
=========
-Your name could be here!!
+Daniel Attallah <datallah@users.sourceforge.net>
+ - Windows
+Benjamin Seidenberg <benjamin@debian.org>
+ - Debian
+Stu Tomlinson <stu@nosnilmot.com>
+ - Source RPM
+ - Fedora Core 4
+ - Fedora Core 5
+ - Fedora Core 6
+ - Red Hat Enterprise Linux 4
Accepted Patches
================
@@ -34,3 +43,10 @@
Anthony Sofocleous
William Thompson
Chris Weyl
+
+Special Thanks
+==============
+Kathryn Kulick - For providing a female presence on irc
+Robert O'Connor - Kicktoy... 'nuff said :)
+Dennis Ristuccia - For random gibberish that forces us to take a break from coding
+Ankit Singla - Ticket triaging!
--- a/album/album-ui.c Mon Aug 06 18:23:33 2007 -0400
+++ b/album/album-ui.c Mon Aug 06 18:24:49 2007 -0400
@@ -23,8 +23,6 @@
#include "album-ui.h"
-#include <glib.h>
-
/* We want to use the gstdio functions when possible so that non-ASCII
* filenames are handled properly on Windows. */
#if GLIB_CHECK_VERSION(2,6,0)
@@ -48,7 +46,6 @@
#include <plugin.h>
#include <request.h>
#include <util.h>
-#include <version.h>
/* XXX: For DATADIR... There must be a better way. */
#ifdef _WIN32
--- a/album/album-ui.h Mon Aug 06 18:23:33 2007 -0400
+++ b/album/album-ui.h Mon Aug 06 18:24:49 2007 -0400
@@ -24,10 +24,7 @@
#include "album.h"
-#include <glib.h>
-
#include <blist.h>
-#include <version.h>
#define PREF_WINDOW_HEIGHT PREF_PREFIX "/window_height"
#define PREF_WINDOW_WIDTH PREF_PREFIX "/window_width"
--- a/album/album.c Mon Aug 06 18:23:33 2007 -0400
+++ b/album/album.c Mon Aug 06 18:24:49 2007 -0400
@@ -20,11 +20,11 @@
* 02111-1307, USA.
*/
+#include "album.h"
+
#include <errno.h>
#include <string.h>
-#include <glib.h>
-
/* We want to use the gstdio functions when possible so that non-ASCII
* filenames are handled properly on Windows. */
#if GLIB_CHECK_VERSION(2,6,0)
@@ -41,20 +41,13 @@
#include <unistd.h>
#endif
-#ifndef PURPLE_PLUGINS
-#define PURPLE_PLUGINS
-#endif
-
#include <buddyicon.h>
#include <debug.h>
#include <plugin.h>
#include <util.h>
-#include <version.h>
#include <cipher.h>
-#include "album.h"
-
/* GUI */
#include <gtkplugin.h>
#include "album-ui.h"
--- a/album/album.h Mon Aug 06 18:23:33 2007 -0400
+++ b/album/album.h Mon Aug 06 18:24:49 2007 -0400
@@ -22,9 +22,9 @@
#ifndef _ALBUM_H_
#define _ALBUM_H_
-#include <blist.h>
+#include "../common/pp_internal.h"
-#include "../common/pp_internal.h"
+#include <account.h>
#define PLUGIN_STATIC_NAME "album"
#define PLUGIN_ID "gtk-rlaager-" PLUGIN_STATIC_NAME
--- a/autorejoin/autorejoin.c Mon Aug 06 18:23:33 2007 -0400
+++ b/autorejoin/autorejoin.c Mon Aug 06 18:24:49 2007 -0400
@@ -17,11 +17,8 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif
-#define PURPLE_PLUGINS
+#include "../common/pp_internal.h"
#define PLUGIN_ID "core-plugin_pack-autorejoin"
#define PLUGIN_NAME "Autorejoin (IRC)"
@@ -31,17 +28,12 @@
#define PLUGIN_AUTHOR "Sadrul H Chowdhury <sadrul@users.sourceforge.net>"
/* System headers */
-#include <glib.h>
#include <string.h>
/* Purple headers */
#include <cmds.h>
#include <plugin.h>
#include <prpl.h>
-#include <version.h>
-
-/* Pack/Local headers */
-#include "../common/pp_internal.h"
static gboolean
show_them(gpointer data)
--- a/autoreply/autoreply.c Mon Aug 06 18:23:33 2007 -0400
+++ b/autoreply/autoreply.c Mon Aug 06 18:24:49 2007 -0400
@@ -17,11 +17,8 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif /* HAVE_CONFIG_H */
-#define PURPLE_PLUGINS
+#include "../common/pp_internal.h"
#define PLUGIN_ID "core-plugin_pack-autoreply"
#define PLUGIN_NAME N_("Autoreply")
@@ -34,9 +31,6 @@
"account, go to the `Advanced' tab of the Account-edit dialog.")
#define PLUGIN_AUTHOR "Sadrul Habib Chowdhury <sadrul@users.sourceforge.net>"
-/* System headers */
-#include <glib.h>
-
/* Purple headers */
#include <account.h>
#include <accountopt.h>
@@ -48,10 +42,6 @@
#include <savedstatuses.h>
#include <status.h>
#include <util.h>
-#include <version.h>
-
-/* Plugin Pack Headers */
-#include "../common/pp_internal.h"
#define PREFS_PREFIX "/plugins/core/" PLUGIN_ID
#define PREFS_IDLE PREFS_PREFIX "/idle"
--- a/awaynotify/awaynotify.c Mon Aug 06 18:23:33 2007 -0400
+++ b/awaynotify/awaynotify.c Mon Aug 06 18:24:49 2007 -0400
@@ -17,19 +17,12 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif
-
#include "../common/pp_internal.h"
-#define PURPLE_PLUGINS
-
#include <blist.h>
#include <conversation.h>
#include <debug.h>
#include <signals.h>
-#include <version.h>
#include <plugin.h>
#include <pluginpref.h>
--- a/bash/bash.c Mon Aug 06 18:23:33 2007 -0400
+++ b/bash/bash.c Mon Aug 06 18:24:49 2007 -0400
@@ -21,10 +21,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif
-
#include "../common/pp_internal.h"
/* libc */
@@ -33,16 +29,11 @@
#include <string.h>
#include <time.h>
-/* GLib */
-#include <glib.h>
-
/* Purple */
-#define PURPLE_PLUGINS
#include <cmds.h>
#include <conversation.h>
#include <debug.h>
#include <plugin.h>
-#include <version.h>
#define BASH_QUOTES 636661
#define QDB_QUOTES 58841
--- a/bit/bit.c Mon Aug 06 18:23:33 2007 -0400
+++ b/bit/bit.c Mon Aug 06 18:24:49 2007 -0400
@@ -16,20 +16,13 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif /* HAVE_CONFIG_H */
-
-#define PURPLE_PLUGINS
+#include "../common/pp_internal.h"
#include <buddyicon.h>
#include <debug.h>
#include <notify.h>
#include <plugin.h>
#include <request.h>
-#include <version.h>
-
-#include "../common/pp_internal.h"
PurplePlugin *bit = NULL; /* the request api prefers this for a plugin */
static PurpleBuddyList *buddies = NULL;
--- a/blistops/blistops.c Mon Aug 06 18:23:33 2007 -0400
+++ b/blistops/blistops.c Mon Aug 06 18:24:49 2007 -0400
@@ -17,25 +17,19 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif
+
+#include "../common/pp_internal.h"
#include <gdk/gdk.h>
#include <gtk/gtk.h>
-#define PURPLE_PLUGINS
-
#include <gtkplugin.h>
#include <gtkblist.h>
#include <pluginpref.h>
#include <prefs.h>
-#include <version.h>
#include <string.h>
-#include "../common/pp_internal.h"
-
#define PREF_MY "/plugins/gtk/amc_grim"
#define PREF_ROOT "/plugins/gtk/amc_grim/blistops"
#define PREF_LIST "/plugins/gtk/amc_grim/blistops/hidelist"
--- a/broadcast/broadcast.c Mon Aug 06 18:23:33 2007 -0400
+++ b/broadcast/broadcast.c Mon Aug 06 18:24:49 2007 -0400
@@ -17,19 +17,12 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif /* HAVE_CONFIG_H */
-
-#define PURPLE_PLUGINS
+#include "../common/pp_internal.h"
#include <blist.h>
#include <debug.h>
#include <request.h>
#include <util.h>
-#include <version.h>
-
-#include "../common/pp_internal.h"
#define BROADCAST_CATEGORY "plugin pack: broadcast"
--- a/buddytime/buddytime.c Mon Aug 06 18:23:33 2007 -0400
+++ b/buddytime/buddytime.c Mon Aug 06 18:24:49 2007 -0400
@@ -17,13 +17,10 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif
-#define PURPLE_PLUGINS
+#include "../common/pp_internal.h"
-#define PLUGIN_ID "amc_grim-buddytime-gtk"
+#define PLUGIN_ID "gtk-plugin_pack-buddytime"
#define PLUGIN_NAME "Buddy Time"
#define PLUGIN_STATIC_NAME "buddytime"
#define PLUGIN_SUMMARY "summary"
@@ -31,17 +28,13 @@
#define PLUGIN_AUTHOR "Gary Kramlich <grim@reaperworld.com>"
#include <gdk/gdk.h>
-#include <glib.h>
#include <gtk/gtk.h>
-#include <version.h>
#include <blist.h>
#include <gtkutils.h>
#include <gtkplugin.h>
#include <request.h>
-#include "../common/pp_internal.h"
-
/******************************************************************************
* Defines
*****************************************************************************/
--- a/chronic/chronic.c Mon Aug 06 18:23:33 2007 -0400
+++ b/chronic/chronic.c Mon Aug 06 18:24:49 2007 -0400
@@ -17,24 +17,15 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif /* HAVE_CONFIG_H */
-
#include "../common/pp_internal.h"
/* libc */
#include <string.h>
-/* GLib */
-#include <glib.h>
-
/* Purple */
-#define PURPLE_PLUGINS
#include <conversation.h>
#include <debug.h>
#include <plugin.h>
-#include <version.h>
static void
chronic_received_cb(PurpleAccount *account, char *sender, char *message,
@@ -71,10 +62,10 @@
static PurplePluginInfo chronic_info =
{
PURPLE_PLUGIN_MAGIC, /* magic? do you think i'm gullible enough to
- * believe in magic? */
- PURPLE_MAJOR_VERSION, /* bet you can't guess what this is */
- PURPLE_MINOR_VERSION, /* this either */
- PURPLE_PLUGIN_STANDARD, /* and what about this? */
+ * believe in magic? */
+ PURPLE_MAJOR_VERSION,
+ PURPLE_MINOR_VERSION,
+ PURPLE_PLUGIN_STANDARD,
NULL,
0,
NULL,
--- a/common/core-template.c Mon Aug 06 18:23:33 2007 -0400
+++ b/common/core-template.c Mon Aug 06 18:24:49 2007 -0400
@@ -17,11 +17,8 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif
-#define PURPLE_PLUGINS
+#include "../common/pp_internal.h"
#define PLUGIN_ID "unnamed plugin"
#define PLUGIN_NAME "unnamed"
@@ -30,15 +27,8 @@
#define PLUGIN_DESCRIPTION "description"
#define PLUGIN_AUTHOR "someone <someone@somewhere.tld>"
-/* System headers */
-#include <glib.h>
-
/* Purple headers */
#include <plugin.h>
-#include <version.h>
-
-/* Pack/Local headers */
-#include "../common/pp_internal.h"
static gboolean
plugin_load(PurplePlugin *plugin) {
@@ -54,28 +44,32 @@
PURPLE_PLUGIN_MAGIC, /* Magic */
PURPLE_MAJOR_VERSION, /* Purple Major Version */
PURPLE_MINOR_VERSION, /* Purple Minor Version */
- PURPLE_PLUGIN_STANDARD, /* plugin type */
- NULL, /* ui requirement */
- 0, /* flags */
- NULL, /* dependencies */
+ PURPLE_PLUGIN_STANDARD, /* plugin type */
+ NULL, /* ui requirement */
+ 0, /* flags */
+ NULL, /* dependencies */
PURPLE_PRIORITY_DEFAULT, /* priority */
- PLUGIN_ID, /* plugin id */
- NULL, /* name */
- PP_VERSION, /* version */
- NULL, /* summary */
- NULL, /* description */
- PLUGIN_AUTHOR, /* author */
- PP_WEBSITE, /* website */
+ PLUGIN_ID, /* plugin id */
+ NULL, /* name */
+ PP_VERSION, /* version */
+ NULL, /* summary */
+ NULL, /* description */
+ PLUGIN_AUTHOR, /* author */
+ PP_WEBSITE, /* website */
- plugin_load, /* load */
- plugin_unload, /* unload */
- NULL, /* destroy */
+ plugin_load, /* load */
+ plugin_unload, /* unload */
+ NULL, /* destroy */
- NULL, /* ui_info */
- NULL, /* extra_info */
- NULL, /* prefs_info */
- NULL /* actions */
+ NULL, /* ui_info */
+ NULL, /* extra_info */
+ NULL, /* prefs_info */
+ NULL, /* actions */
+ NULL, /* reserved 1 */
+ NULL, /* reserved 2 */
+ NULL, /* reserved 3 */
+ NULL /* reserved 4 */
};
static void
--- a/common/gtk-template.c Mon Aug 06 18:23:33 2007 -0400
+++ b/common/gtk-template.c Mon Aug 06 18:24:49 2007 -0400
@@ -17,11 +17,8 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif
-#define PURPLE_PLUGINS
+#include "../common/pp_internal.h"
#define PLUGIN_ID "unnamed plugin"
#define PLUGIN_NAME "unnamed"
@@ -32,15 +29,10 @@
/* System headers */
#include <gdk/gdk.h>
-#include <glib.h>
#include <gtk/gtk.h>
/* Purple headers */
#include <gtkplugin.h>
-#include <version.h>
-
-/* Pack/Local headers */
-#include "../common/pp_internal.h"
static gboolean
plugin_load(PurplePlugin *plugin) {
@@ -53,22 +45,22 @@
}
static PurplePluginInfo info = {
- PURPLE_PLUGIN_MAGIC, /* Magic */
- PURPLE_MAJOR_VERSION, /* Purple Major Version */
- PURPLE_MINOR_VERSION, /* Purple Minor Version */
+ PURPLE_PLUGIN_MAGIC, /* Magic */
+ PURPLE_MAJOR_VERSION, /* Purple Major Version */
+ PURPLE_MINOR_VERSION, /* Purple Minor Version */
PURPLE_PLUGIN_STANDARD, /* plugin type */
- PIDGIN_PLUGIN_TYPE, /* ui requirement */
+ PIDGIN_PLUGIN_TYPE, /* ui requirement */
0, /* flags */
NULL, /* dependencies */
- PURPLE_PRIORITY_DEFAULT, /* priority */
+ PURPLE_PRIORITY_DEFAULT, /* priority */
PLUGIN_ID, /* plugin id */
NULL, /* name */
- PP_VERSION, /* version */
+ PP_VERSION, /* version */
NULL, /* summary */
NULL, /* description */
PLUGIN_AUTHOR, /* author */
- PP_WEBSITE, /* website */
+ PP_WEBSITE, /* website */
plugin_load, /* load */
plugin_unload, /* unload */
@@ -77,7 +69,11 @@
NULL, /* ui_info */
NULL, /* extra_info */
NULL, /* prefs_info */
- NULL /* actions */
+ NULL, /* actions */
+ NULL, /* reserved 1 */
+ NULL, /* reserved 2 */
+ NULL, /* reserved 3 */
+ NULL /* reserved 4 */
};
static void
--- a/common/pp_internal.h Mon Aug 06 18:23:33 2007 -0400
+++ b/common/pp_internal.h Mon Aug 06 18:24:49 2007 -0400
@@ -56,4 +56,12 @@
# endif
#endif
+/* Every plugin for libpurple, Pidgin, or Finch needs to define PURPLE_PLUGINS
+ * in order to compile and run correctly. Define it here for simplicity */
+#define PURPLE_PLUGINS
+
+/* Every plugin for libpurple, Pidgin, or Finch needs to include version.h
+ * to ensure it has the version macros, so include it here for simplicity */
+#include <version.h>
+
#endif /* PP_INTERNAL_H */
--- a/convbadger/convbadger.c Mon Aug 06 18:23:33 2007 -0400
+++ b/convbadger/convbadger.c Mon Aug 06 18:24:49 2007 -0400
@@ -1,6 +1,6 @@
/*
- * GroupMsg - Send an IM to a group of buddies
- * Copyright (C) 2004 Stu Tomlinson <stu@nosnilmot.com>
+ * ConvBadger - Adds the protocol icon to the menu tray of a conversation
+ * Copyright (C) 2007 Gary Kramlich <grim@reaperworld.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -16,31 +16,140 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif /* HAVE_CONFIG_H */
-
-#define PURPLE_PLUGINS
-
-#include <debug.h>
-#include <notify.h>
-#include <prpl.h>
-#include <request.h>
-#include <signals.h>
-#include <util.h>
-#include <version.h>
-
#include "../common/pp_internal.h"
+#include <gtk/gtk.h>
+
+#include <conversation.h>
+#include <signals.h>
+
+#include <gtkmenutray.h>
+#include <gtkutils.h>
+
+/******************************************************************************
+ * Structs
+ *****************************************************************************/
+typedef struct {
+ PidginWindow *win;
+ PurpleConversation *conv;
+ GtkWidget *icon;
+} ConvBadgerData;
+
+/******************************************************************************
+ * Globals
+ *****************************************************************************/
+static GHashTable *data = NULL;
+
+/******************************************************************************
+ * helpers
+ *****************************************************************************/
+static void
+conv_badger_data_free(ConvBadgerData *cbd) {
+ cbd->win = NULL;
+ cbd->conv = NULL;
+
+ if(GTK_IS_IMAGE(cbd->icon))
+ gtk_widget_destroy(cbd->icon);
+
+ cbd->icon = NULL;
+
+ g_free(cbd);
+
+ cbd = NULL;
+}
+
+static void
+conv_badger_data_free_helper(gpointer k, gpointer v, gpointer d) {
+ ConvBadgerData *cbd = (ConvBadgerData *)v;
+
+ conv_badger_data_free(cbd);
+}
+
+static void
+conv_badger_update(PidginWindow *win, PurpleConversation *conv) {
+ ConvBadgerData *cbd = NULL;
+ GdkPixbuf *pixbuf = NULL;
+ PurpleAccount *account = NULL;
+
+ g_return_if_fail(win);
+ g_return_if_fail(conv);
+
+ cbd = g_hash_table_lookup(data, win);
+
+ if(cbd == NULL) {
+ cbd = g_new0(ConvBadgerData, 1);
+
+ cbd->win = win;
+
+ cbd->icon = gtk_image_new();
+ pidgin_menu_tray_append(PIDGIN_MENU_TRAY(win->menu.tray), cbd->icon,
+ NULL);
+ gtk_widget_show(cbd->icon);
+ }
+
+ cbd->conv = conv;
+
+ account = purple_conversation_get_account(conv);
+ pixbuf = pidgin_create_prpl_icon(account, PIDGIN_PRPL_ICON_SMALL);
+ gtk_image_set_from_pixbuf(GTK_IMAGE(cbd->icon), pixbuf);
+ g_object_unref(G_OBJECT(pixbuf));
+
+ g_hash_table_insert(data, win, cbd);
+}
+
+/******************************************************************************
+ * Callbacks
+ *****************************************************************************/
+static void
+convbadger_conv_created_cb(PurpleConversation *conv, gpointer data) {
+ PidginConversation *pconv = PIDGIN_CONVERSATION(conv);
+ PidginWindow *win = pidgin_conv_get_window(pconv);
+
+ conv_badger_update(win, conv);
+}
+
+static void
+convbadger_conv_destroyed_cb(PurpleConversation *conv, gpointer data) {
+}
+
+static void
+convbadger_conv_switched_cb(PurpleConversation *conv, gpointer data) {
+ PidginConversation *pconv = PIDGIN_CONVERSATION(conv);
+ PidginWindow *win = pidgin_conv_get_window(pconv);
+
+ conv_badger_update(win, conv);
+}
+
+/******************************************************************************
+ * Plugin Stuff
+ *****************************************************************************/
static gboolean
plugin_load(PurplePlugin *plugin) {
void *conv_handle = purple_conversations_get_handle();
+ data = g_hash_table_new_full(g_direct_hash, g_direct_equal,
+ NULL, NULL);
+
purple_signal_connect(conv_handle, "conversation-created", plugin,
PURPLE_CALLBACK(convbadger_conv_created_cb), NULL);
purple_signal_connect(conv_handle, "deleting-conversation", plugin,
PURPLE_CALLBACK(convbadger_conv_destroyed_cb), NULL);
+ purple_signal_connect(pidgin_conversations_get_handle(),
+ "conversation-switched", plugin,
+ PURPLE_CALLBACK(convbadger_conv_switched_cb), NULL);
+
+ return TRUE;
+}
+
+static gboolean
+plugin_unload(PurplePlugin *plugin) {
+ g_hash_table_foreach(data, conv_badger_data_free_helper, NULL);
+
+ g_hash_table_destroy(data);
+
+ data = NULL;
+
return TRUE;
}
@@ -63,7 +172,7 @@
PP_WEBSITE,
plugin_load,
- NULL,
+ plugin_unload,
NULL,
NULL,
--- a/dice/dice.c Mon Aug 06 18:23:33 2007 -0400
+++ b/dice/dice.c Mon Aug 06 18:24:49 2007 -0400
@@ -17,13 +17,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif /* HAVE_CONFIG_H */
-#define PURPLE_PLUGINS
+#include "../common/pp_internal.h"
-#include <glib.h>
#include <time.h>
#include <stdlib.h>
@@ -31,9 +27,6 @@
#include <conversation.h>
#include <debug.h>
#include <plugin.h>
-#include <version.h>
-
-#include "../common/pp_internal.h"
static PurpleCmdId dice_cmd_id = 0;
--- a/difftopic/difftopic.c Mon Aug 06 18:23:33 2007 -0400
+++ b/difftopic/difftopic.c Mon Aug 06 18:24:49 2007 -0400
@@ -17,11 +17,8 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif
-#define PURPLE_PLUGINS
+#include "../common/pp_internal.h"
#define PLUGIN_ID "gtk-plugin_pack-difftopic"
#define PLUGIN_NAME "DiffTopic"
@@ -31,22 +28,13 @@
#define PLUGIN_AUTHOR "Sadrul H Chowdhury <sadrul@users.sourceforge.net>"
/* System headers */
-#include <glib.h>
#include <ctype.h>
#include <string.h>
-/* Purple headers */
-#include <plugin.h>
-#include <version.h>
-#include <gtkplugin.h>
-
-#include <conversation.h>
-
+/* Pidgin Headers */
#include <gtkconv.h>
#include <gtkimhtml.h>
-
-/* Pack/Local headers */
-#include "../common/pp_internal.h"
+#include <gtkplugin.h>
#define SAME(a,b) ((isalnum((a)) && isalnum((b))) || (!isalnum((a)) && !isalnum((b))))
--- a/eight_ball/eight_ball.c Mon Aug 06 18:23:33 2007 -0400
+++ b/eight_ball/eight_ball.c Mon Aug 06 18:24:49 2007 -0400
@@ -20,10 +20,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif
-
#include "../common/pp_internal.h"
/* libc */
@@ -32,16 +28,11 @@
#include <string.h>
#include <time.h>
-/* GLib */
-#include <glib.h>
-
/* Purple */
-#define PURPLE_PLUGINS
#include <cmds.h>
#include <conversation.h>
#include <debug.h>
#include <plugin.h>
-#include <version.h>
/* TODO: add to these, but be careful NOT to use real 8-ball messages!!! */
static const gchar *eight_ball_strings[] = {
@@ -70,7 +61,8 @@
"this is only fooling blabber",
"thats nots really nice",
"Oh I at all do not understand a pancake about what you here talk.",
- "it shall be visible will be?"
+ "it shall be visible will be?",
+ "it becomes a complex rainbow of confusion."
};
static PurpleCmdId eight_ball_cmd_id = 0,
--- a/flip/flip.c Mon Aug 06 18:23:33 2007 -0400
+++ b/flip/flip.c Mon Aug 06 18:24:49 2007 -0400
@@ -16,13 +16,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif /* HAVE_CONFIG_H */
-#define PURPLE_PLUGINS
+#include "../common/pp_internal.h"
-#include <glib.h>
#include <time.h>
#include <stdlib.h>
@@ -30,9 +26,6 @@
#include <conversation.h>
#include <debug.h>
#include <plugin.h>
-#include <version.h>
-
-#include "../common/pp_internal.h"
static PurpleCmdId flip_cmd_id = 0;
--- a/gRIM/gRIM.c Mon Aug 06 18:23:33 2007 -0400
+++ b/gRIM/gRIM.c Mon Aug 06 18:24:49 2007 -0400
@@ -26,28 +26,19 @@
* 08:19 < grim> i was going to use my nick as an example but decided against that..
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif /* HAVE_CONFIG_H */
+#include "../common/pp_internal.h"
-#define PURPLE_PLUGINS
+#include <time.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <cmds.h>
+#include <debug.h>
#include <gtkconv.h>
#include <gtkimhtml.h>
#include <gtkplugin.h>
-#include <glib.h>
-#include <time.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include <cmds.h>
-#include <conversation.h>
-#include <debug.h>
-#include <plugin.h>
-#include <version.h>
-
-#include "../common/pp_internal.h"
#if GLIB_CHECK_VERSION(2,6,0)
#include <glib/gstdio.h>
--- a/groupmsg/groupmsg.c Mon Aug 06 18:23:33 2007 -0400
+++ b/groupmsg/groupmsg.c Mon Aug 06 18:24:49 2007 -0400
@@ -16,11 +16,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif /* HAVE_CONFIG_H */
-#define PURPLE_PLUGINS
+#include "../common/pp_internal.h"
#include <debug.h>
#include <notify.h>
@@ -28,9 +25,6 @@
#include <request.h>
#include <signals.h>
#include <util.h>
-#include <version.h>
-
-#include "../common/pp_internal.h"
static void
dont_do_it_cb(GList *list, const char *text)
--- a/hideconv/hideconv.c Mon Aug 06 18:23:33 2007 -0400
+++ b/hideconv/hideconv.c Mon Aug 06 18:24:49 2007 -0400
@@ -17,11 +17,8 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif
-#define PURPLE_PLUGINS
+#include "../common/pp_internal.h"
#define PLUGIN_ID "gtk-plugin_pack-hideconv"
#define PLUGIN_NAME "Hide Conversation"
@@ -32,18 +29,12 @@
/* System headers */
#include <gdk/gdk.h>
-#include <glib.h>
#include <gtk/gtk.h>
/* Purple headers */
-#include <gtkplugin.h>
-#include <version.h>
-
-/* Pack/Local headers */
-#include "../common/pp_internal.h"
-
#include <gtkconv.h>
#include <gtkconvwin.h>
+#include <gtkplugin.h>
#include <gtkutils.h>
#define MENUSET "hideconv::menuset"
--- a/highlight/highlight.c Mon Aug 06 18:23:33 2007 -0400
+++ b/highlight/highlight.c Mon Aug 06 18:24:49 2007 -0400
@@ -18,11 +18,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif
-
-#define PURPLE_PLUGINS
+/* Pack/Local headers */
+#include "../common/pp_internal.h"
#include <plugin.h>
@@ -33,13 +30,9 @@
#include <debug.h>
#include <notify.h>
#include <util.h>
-#include <version.h>
#include <string.h>
-/* Pack/Local headers */
-#include "../common/pp_internal.h"
-
#define PREF_PREFIX "/plugins/core/highlight"
#define PREF_WORDS PREF_PREFIX "/words"
--- a/ignore/ignore.c Mon Aug 06 18:23:33 2007 -0400
+++ b/ignore/ignore.c Mon Aug 06 18:24:49 2007 -0400
@@ -18,24 +18,17 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif
-
-#define PURPLE_PLUGINS
-
-#include <plugin.h>
+/* Pack/Local headers */
+#include "../common/pp_internal.h"
#include <account.h>
#include <blist.h>
#include <cmds.h>
#include <conversation.h>
#include <debug.h>
-#include <version.h>
-#include <string.h>
+#include <plugin.h>
-/* Pack/Local headers */
-#include "../common/pp_internal.h"
+#include <string.h>
#define PREF_ROOT "/plugins/ignore"
--- a/irc-more/irc-more.c Mon Aug 06 18:23:33 2007 -0400
+++ b/irc-more/irc-more.c Mon Aug 06 18:24:49 2007 -0400
@@ -18,23 +18,16 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif
-
-#define PURPLE_PLUGINS
+/* Pack/Local headers */
+#include "../common/pp_internal.h"
#include <cmds.h>
#include <plugin.h>
#include <accountopt.h>
#include <conversation.h>
-#include <version.h>
#include <string.h>
-/* Pack/Local headers */
-#include "../common/pp_internal.h"
-
#define CTCP_REPLY purple_account_get_string(account, "ctcp-message", "Purple IRC")
#define PART_MESSAGE purple_account_get_string(account, "part-message", "Leaving.")
#define QUIT_MESSAGE purple_account_get_string(account, "quit-message", "Leaving.")
--- a/irchelper/irchelper.c Mon Aug 06 18:23:33 2007 -0400
+++ b/irchelper/irchelper.c Mon Aug 06 18:24:49 2007 -0400
@@ -23,14 +23,10 @@
* 02111-1307, USA.
*/
-#include <glib.h>
+#include "../common/pp_internal.h"
#include <string.h>
-#ifndef PURPLE_PLUGINS
-#define PURPLE_PLUGINS
-#endif
-
#include <account.h>
#include <accountopt.h>
#include <cmds.h>
@@ -42,9 +38,6 @@
#include <pluginpref.h>
#include <prefs.h>
#include <util.h>
-#include <version.h>
-
-#include "../common/pp_internal.h"
#define PLUGIN_STATIC_NAME "irchelper"
#define PLUGIN_ID "core-rlaager-" PLUGIN_STATIC_NAME
--- a/irssi/datechange.c Mon Aug 06 18:23:33 2007 -0400
+++ b/irssi/datechange.c Mon Aug 06 18:24:49 2007 -0400
@@ -19,17 +19,13 @@
* 02111-1307, USA.
*/
-/* pp_config.h provides necessary definitions that help us find/do stuff */
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif
+#include "../common/pp_internal.h"
#include <time.h>
#include <plugin.h>
#include <cmds.h>
-#include "../common/pp_internal.h"
#include "datechange.h"
/******************************************************************************
--- a/irssi/irssi.c Mon Aug 06 18:23:33 2007 -0400
+++ b/irssi/irssi.c Mon Aug 06 18:24:49 2007 -0400
@@ -19,13 +19,7 @@
* 02111-1307, USA.
*/
-/* pp_config.h provides necessary definitions that help us find/do stuff */
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif
-
-/* all Purple plugins need to define this */
-#define PURPLE_PLUGINS
+#include "../common/pp_internal.h"
/* define these so the plugin info struct way at the bottom is cleaner */
#define PLUGIN_ID "gtk-plugin_pack-irssi"
@@ -43,13 +37,7 @@
"\tJohn Bailey <rekkanoryo@rekkanoryo.org>\n" \
"\tSadrul Habib Chowdhury <sadrul@users.sourceforge.net>"
-/* System headers */
-#include <glib.h>
-
-/* Purple headers */
#include <gtkplugin.h>
-#include <plugin.h>
-#include <version.h>
/* irssi headers */
#include "datechange.h"
@@ -58,9 +46,6 @@
#include "textfmt.h"
#include "window.h"
-/* Pack/Local headers */
-#include "../common/pp_internal.h"
-
static gboolean
irssi_load(PurplePlugin *plugin) {
irssi_datechange_init(plugin);
--- a/irssi/lastlog.c Mon Aug 06 18:23:33 2007 -0400
+++ b/irssi/lastlog.c Mon Aug 06 18:24:49 2007 -0400
@@ -19,10 +19,7 @@
* 02111-1307, USA.
*/
-/* pp_config.h provides necessary definitions that help us find/do stuff */
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif
+#include "../common/pp_internal.h"
#include <string.h>
@@ -33,7 +30,6 @@
#include <gtkconv.h>
#include <gtkimhtml.h>
-#include "../common/pp_internal.h"
#include "lastlog.h"
/******************************************************************************
--- a/irssi/layout.c Mon Aug 06 18:23:33 2007 -0400
+++ b/irssi/layout.c Mon Aug 06 18:24:49 2007 -0400
@@ -19,10 +19,7 @@
* 02111-1307, USA.
*/
-/* pp_config.h provides necessary definitions that help us find/do stuff */
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif
+#include "../common/pp_internal.h"
#include <blist.h>
#include <cmds.h>
@@ -31,7 +28,6 @@
#include <gtkblist.h>
#include <gtkconv.h>
-#include "../common/pp_internal.h"
#include "layout.h"
#define IRSSI_LAYOUT_SETTING "irssi::layout"
--- a/irssi/textfmt.c Mon Aug 06 18:23:33 2007 -0400
+++ b/irssi/textfmt.c Mon Aug 06 18:24:49 2007 -0400
@@ -19,10 +19,7 @@
* 02111-1307, USA.
*/
-/* pp_config.h provides necessary definitions that help us find/do stuff */
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif
+#include "../common/pp_internal.h"
#ifdef HAVE_REGEX_H
# include <regex.h>
@@ -31,7 +28,6 @@
#include <plugin.h>
#include <cmds.h>
-#include "../common/pp_internal.h"
#include "textfmt.h"
/******************************************************************************
--- a/irssi/window.c Mon Aug 06 18:23:33 2007 -0400
+++ b/irssi/window.c Mon Aug 06 18:24:49 2007 -0400
@@ -19,10 +19,7 @@
* 02111-1307, USA.
*/
-/* pp_config.h provides necessary definitions that help us find/do stuff */
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif
+#include "../common/pp_internal.h"
#include <gtk/gtk.h>
@@ -32,7 +29,6 @@
#include <gtkconv.h>
-#include "../common/pp_internal.h"
#include "window.h"
/******************************************************************************
@@ -47,8 +43,7 @@
static gboolean
irssi_window_close_cb(PurpleConversation *c) {
/* this gets called from a conversation since the conversation must exist
- * until all of the commands are processed, and the output is output.
- */
+ * until all of the commands are processed, and the output is output. */
purple_conversation_destroy(c);
--- a/lastseen/lastseen.c Mon Aug 06 18:23:33 2007 -0400
+++ b/lastseen/lastseen.c Mon Aug 06 18:24:49 2007 -0400
@@ -16,24 +16,18 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif /* HAVE_CONFIG_H */
-#define PURPLE_PLUGINS
+#include "../common/pp_internal.h"
#include <plugin.h>
#include <debug.h>
#include <blist.h>
#include <signals.h>
#include <util.h>
-#include <version.h>
#include <gtkplugin.h>
#include <gtkblist.h>
-#include "../common/pp_internal.h"
-
/* global list of accounts connecting, to avoid inaccurate signon times
* idea stolen from guifications :) - thanks Gary.
*/
--- a/listhandler/listhandler.h Mon Aug 06 18:23:33 2007 -0400
+++ b/listhandler/listhandler.h Mon Aug 06 18:24:49 2007 -0400
@@ -21,27 +21,18 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif
+#include "../common/pp_internal.h"
-#include <glib.h>
#include <string.h>
-/* this has to be defined for the plugin to work properly */
-#define PURPLE_PLUGINS
-
/* Purple headers */
#include <account.h>
#include <blist.h>
#include <debug.h>
#include <plugin.h>
#include <request.h>
-#include <version.h>
#include <xmlnode.h>
-#include "../common/pp_internal.h"
-
#include "lh_util.h"
/* we send this to the request API so it is probably a good idea to make sure
--- a/mystatusbox/mystatusbox.c Mon Aug 06 18:23:33 2007 -0400
+++ b/mystatusbox/mystatusbox.c Mon Aug 06 18:24:49 2007 -0400
@@ -17,11 +17,8 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif
-#define PURPLE_PLUGINS
+#include "../common/pp_internal.h"
#define PLUGIN_ID "gtk-plugin_pack-mystatusbox"
#define PLUGIN_NAME "Mystatusbox (Show Statusboxes)"
@@ -36,12 +33,8 @@
/* System headers */
#include <gdk/gdk.h>
-#include <glib.h>
#include <gtk/gtk.h>
-/* Purple headers */
-#include <version.h>
-
#if PURPLE_VERSION_CHECK(2,0,0) /* Stu is a chicken */
#include <core.h>
@@ -51,9 +44,6 @@
#include <gtkplugin.h>
#include <gtkstatusbox.h>
-/* Pack/Local headers */
-#include "../common/pp_internal.h"
-
/* XXX: THIS NEEDS CHANGED WHEN PIDGIN DOES ITS PREFS MIGRATION!!!!! */
#define PREF_PREFIX "/plugins/gtk/" PLUGIN_ID
#define PREF_PANE PREF_PREFIX "/pane"
--- a/napster/napster.c Mon Aug 06 18:23:33 2007 -0400
+++ b/napster/napster.c Mon Aug 06 18:24:49 2007 -0400
@@ -21,30 +21,23 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif
-
-#define PURPLE_PLUGINS
+#include "../common/pp_internal.h"
-#include "account.h"
-#include "accountopt.h"
-#include "blist.h"
-#include "conversation.h"
-#include "debug.h"
-#include "notify.h"
-#include "prpl.h"
-#include "proxy.h"
-#include "util.h"
-#include "version.h"
+#include <account.h>
+#include <accountopt.h>
+#include <blist.h>
+#include <conversation.h>
+#include <debug.h>
+#include <notify.h>
+#include <prpl.h>
+#include <proxy.h>
+#include <util.h>
#include <errno.h>
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
-#include "../common/pp_internal.h"
-
#define NAP_SERVER "64.124.41.187"
#define NAP_PORT 8888
--- a/nicksaid/nicksaid.c Mon Aug 06 18:23:33 2007 -0400
+++ b/nicksaid/nicksaid.c Mon Aug 06 18:24:49 2007 -0400
@@ -17,11 +17,8 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif
-#define PURPLE_PLUGINS
+#include "../common/pp_internal.h"
#define PLUGIN_ID "gtk-plugin_pack-nicksaid"
#define PLUGIN_NAME "Nicksaid"
@@ -41,24 +38,18 @@
/* System headers */
#include <string.h>
#include <gdk/gdk.h>
-#include <glib.h>
#include <gtk/gtk.h>
-/* Purple headers */
-#include <gtkplugin.h>
-#include <version.h>
-
-#include <conversation.h>
+/* libpurple headers */
#include <notify.h>
+/* Pidgin headers */
#include <gtkconv.h>
#include <gtkimhtml.h>
#include <gtkmenutray.h>
-#include <pidginstock.h>
+#include <gtkplugin.h>
#include <gtkutils.h>
-
-/* Pack/Local headers */
-#include "../common/pp_internal.h"
+#include <pidginstock.h>
#define DELIMS " .,;|<>?/\\`~!@#$%^&*()_-+={}[]:'\""
--- a/oldlogger/oldlogger.c Mon Aug 06 18:23:33 2007 -0400
+++ b/oldlogger/oldlogger.c Mon Aug 06 18:24:49 2007 -0400
@@ -16,11 +16,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif /* HAVE_CONFIG_H */
-#define PURPLE_PLUGINS
+#include "../common/pp_internal.h"
+
#define OLDLOGGER_PLUGIN_ID "core-plugin_pack-oldlogger"
#include <errno.h>
@@ -36,11 +34,6 @@
#include <prpl.h>
#include <stringref.h>
#include <util.h>
-#include <version.h>
-
-#include "../common/pp_internal.h"
-
-#include <glib.h>
/* We want to use the gstdio functions when possible so that non-ASCII
* filenames are handled properly on Windows. */
@@ -54,16 +47,9 @@
#define g_unlink unlink
#endif
-
-#if PURPLE_VERSION_CHECK(2,0,0)
static PurpleLogLogger *oldtxt_logger;
static PurpleLogLogger *oldhtml_logger;
#define return_written return written
-#else
-static PurpleLogLogger oldtxt_logger;
-static PurpleLogLogger oldhtml_logger;
-#define return_written return
-#endif
struct basic_logger_data {
FILE *file;
@@ -214,11 +200,7 @@
** Ye Olde PLAIN TEXT LOGGER **
*******************************/
-#if PURPLE_VERSION_CHECK(2,0,0)
static gsize
-#else
-static void
-#endif
oldtxt_logger_write(PurpleLog *log, PurpleMessageFlags type,
const char *from, time_t time, const char *message)
{
@@ -330,29 +312,10 @@
return_written;
}
-#if !PURPLE_VERSION_CHECK(2,0,0)
-static PurpleLogLogger oldtxt_logger = {
- N_("Old plain text"), "oldtxt",
- old_logger_create,
- oldtxt_logger_write,
- old_logger_finalize,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL
-};
-#endif
-
-
/****************************
** Ye Olde HTML LOGGER *****
****************************/
-#if PURPLE_VERSION_CHECK(2,0,0)
static gsize
-#else
-static void
-#endif
oldhtml_logger_write(PurpleLog *log, PurpleMessageFlags type,
const char *from, time_t time, const char *message)
{
@@ -461,24 +424,9 @@
return_written;
}
-#if !PURPLE_VERSION_CHECK(2,0,0)
-static PurpleLogLogger oldhtml_logger = {
- N_("Old HTML"), "oldhtml",
- old_logger_create,
- oldhtml_logger_write,
- old_logger_finalize,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL
-};
-#endif
-
static gboolean
plugin_load(PurplePlugin *plugin)
{
-#if PURPLE_VERSION_CHECK(2,0,0)
oldtxt_logger = purple_log_logger_new("oldtxt", N_("Old plain text"), 3,
old_logger_create,
oldtxt_logger_write,
@@ -489,10 +437,6 @@
oldhtml_logger_write,
old_logger_finalize);
purple_log_logger_add(oldhtml_logger);
-#else
- purple_log_logger_add(&oldtxt_logger);
- purple_log_logger_add(&oldhtml_logger);
-#endif
purple_prefs_trigger_callback("/purple/logging/format");
return TRUE;
}
@@ -500,13 +444,8 @@
static gboolean
plugin_unload(PurplePlugin *plugin)
{
-#if PURPLE_VERSION_CHECK(2,0,0)
purple_log_logger_remove(oldtxt_logger);
purple_log_logger_remove(oldhtml_logger);
-#else
- purple_log_logger_remove(&oldtxt_logger);
- purple_log_logger_remove(&oldhtml_logger);
-#endif
purple_prefs_trigger_callback("/purple/logging/format");
return TRUE;
}
--- a/plonkers/plonkers.c Mon Aug 06 18:23:33 2007 -0400
+++ b/plonkers/plonkers.c Mon Aug 06 18:24:49 2007 -0400
@@ -18,17 +18,11 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include <glib.h>
-#include <gtk/gtk.h>
-#include <gdk/gdk.h>
-
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif
#include "../common/pp_internal.h"
-#define PURPLE_PLUGINS
+#include <gtk/gtk.h>
+#include <gdk/gdk.h>
#include <cmds.h>
#include <conversation.h>
@@ -40,7 +34,6 @@
#include <plugin.h>
#include <prefs.h>
#include <util.h>
-#include <version.h>
/* #define PLONKERS_DEBUG */
/*******************************************************************************
--- a/schedule/pidgin-schedule.c Mon Aug 06 18:23:33 2007 -0400
+++ b/schedule/pidgin-schedule.c Mon Aug 06 18:24:49 2007 -0400
@@ -17,11 +17,8 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif
-#define PURPLE_PLUGINS
+#include "../common/pp_internal.h"
#define PLUGIN_ID "gtk-schedule"
#define PLUGIN_NAME "Purple Schedule"
@@ -32,14 +29,11 @@
/* System headers */
#include <gdk/gdk.h>
-#include <glib.h>
#include <gtk/gtk.h>
-/* Purple headers */
+/* Pidgin headers */
+#include <gtkimhtml.h>
#include <gtkplugin.h>
-#include <version.h>
-
-#include <gtkimhtml.h>
#include <gtkutils.h>
#include "schedule.h"
--- a/schedule/schedule.c Mon Aug 06 18:23:33 2007 -0400
+++ b/schedule/schedule.c Mon Aug 06 18:24:49 2007 -0400
@@ -19,6 +19,7 @@
*/
#include "schedule.h"
+
#include <notify.h>
#include <xmlnode.h>
#include <util.h>
--- a/schedule/schedule.h Mon Aug 06 18:23:33 2007 -0400
+++ b/schedule/schedule.h Mon Aug 06 18:24:49 2007 -0400
@@ -18,13 +18,6 @@
* 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif
-
-#include <glib.h>
-
-/* Pack/Local headers */
#include "../common/pp_internal.h"
#include <account.h>
--- a/sepandtab/sepandtab.c Mon Aug 06 18:23:33 2007 -0400
+++ b/sepandtab/sepandtab.c Mon Aug 06 18:24:49 2007 -0400
@@ -20,21 +20,16 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif
-#define PURPLE_PLUGINS
+#include "../common/pp_internal.h"
#include <conversation.h>
#include <plugin.h>
-#include <pidgin.h>
-#include <version.h>
+
#include <gtkplugin.h>
#include <gtkconv.h>
#include <gtkconvwin.h>
-
-#include "../common/pp_internal.h"
+#include <pidgin.h>
#define SEPANDTAB_PREF "/pidgin/conversations/placement"
@@ -83,9 +78,11 @@
}
}
+#if 0
static void
conv_placement_grp_type_sep_prpl(PidginConversation *conv) {
}
+#endif
static gboolean
plugin_load(PurplePlugin *plugin) {
@@ -93,8 +90,10 @@
&conv_placement_sep_ims_tab_chats);
pidgin_conv_placement_add_fnc("sep-chats-tab-ims", _("Separate Chats, group IMs"),
&conv_placement_sep_chats_tab_ims);
+#if 0
pidgin_conv_placement_add_fnc("grp-type-sep-prpl", _("Group by Type, Separate by Protocol"),
&conv_placement_grp_type_sep_prpl);
+#endif
purple_prefs_trigger_callback(SEPANDTAB_PREF);
return TRUE;
--- a/showoffline/showoffline.c Mon Aug 06 18:23:33 2007 -0400
+++ b/showoffline/showoffline.c Mon Aug 06 18:24:49 2007 -0400
@@ -16,20 +16,14 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif /* HAVE_CONFIG_H */
-#define PURPLE_PLUGINS
+#include "../common/pp_internal.h"
#include <debug.h>
#include <notify.h>
#include <request.h>
#include <signals.h>
#include <util.h>
-#include <version.h>
-
-#include "../common/pp_internal.h"
static void
showoffline_cb(PurpleBlistNode *node, gpointer data)
--- a/simfix/simfix.c Mon Aug 06 18:23:33 2007 -0400
+++ b/simfix/simfix.c Mon Aug 06 18:24:49 2007 -0400
@@ -17,20 +17,14 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif /* HAVE_CONFIG_H */
-#define PURPLE_PLUGINS
+#include "../common/pp_internal.h"
#include <plugin.h>
#include <debug.h>
#include <blist.h>
#include <signals.h>
#include <util.h>
-#include <version.h>
-
-#include "../common/pp_internal.h"
static gboolean
receiving_im_msg_cb(PurpleAccount *account, char **sender, char **message,
--- a/slashexec/slashexec.c Mon Aug 06 18:23:33 2007 -0400
+++ b/slashexec/slashexec.c Mon Aug 06 18:24:49 2007 -0400
@@ -1,10 +1,10 @@
/*
- * slashexec - A CLI for pidgin
- * Copyright (C) 2004-2006 Gary Kramlich
- * Copyright (C) 2005-2006 Peter Lawler
- * Copyright (C) 2005-2006 Daniel Atallah
- * Copyright (C) 2005-2006 John Bailey
- * Copyright (C) 2006 Sadrul Habib Chowdhury
+ * slashexec - A CLI for libpurple clients
+ * Copyright (C) 2004-2007 Gary Kramlich
+ * Copyright (C) 2005-2007 Peter Lawler
+ * Copyright (C) 2005-2007 Daniel Atallah
+ * Copyright (C) 2005-2007 John Bailey
+ * Copyright (C) 2006-2007 Sadrul Habib Chowdhury
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -26,13 +26,8 @@
* care to translate messages users will see in the main interface. Debug
* window messages are not important. - rekkanoryo */
-#if defined HAVE_CONFIG_H && !defined _WIN32
-# include "../pp_config.h"
-#endif
-
#include "../common/pp_internal.h"
-#include <glib.h>
#include <stdarg.h>
#include <string.h>
@@ -41,15 +36,12 @@
# include <unistd.h>
#endif
-#define PURPLE_PLUGINS
-
#include <cmds.h>
#include <conversation.h>
#include <debug.h>
#include <notify.h>
#include <plugin.h>
#include <util.h>
-#include <version.h>
#ifdef _WIN32
/* Windows 2000 and earlier only allow 2047 bytes in an argv vector for cmd.exe
--- a/snpp/snpp.c Mon Aug 06 18:23:33 2007 -0400
+++ b/snpp/snpp.c Mon Aug 06 18:24:49 2007 -0400
@@ -19,24 +19,17 @@
*
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif
-
#include "../common/pp_internal.h"
-#define PURPLE_PLUGINS
-
#define _GNU_SOURCE
#include <stdio.h>
-#include <glib.h>
#include <string.h>
#ifndef _WIN32
-#include <sys/socket.h>
+# include <sys/socket.h>
#else
-#include <libc_interface.h>
+# include <libc_interface.h>
#endif
#include <sys/types.h>
@@ -50,7 +43,6 @@
#include <debug.h>
#include <blist.h>
#include <util.h>
-#include <version.h>
#define SNPP_DEFAULT_SERVER "localhost"
#define SNPP_DEFAULT_PORT 444
--- a/sslinfo/sslinfo.c Mon Aug 06 18:23:33 2007 -0400
+++ b/sslinfo/sslinfo.c Mon Aug 06 18:24:49 2007 -0400
@@ -16,20 +16,13 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif /* HAVE_CONFIG_H */
-#define PURPLE_PLUGINS
+#include "../common/pp_internal.h"
-#include <glib.h>
#include <string.h>
#include <notify.h>
#include <plugin.h>
-#include <version.h>
-
-#include "../common/pp_internal.h"
static PurplePlugin *my_plugin = NULL;
--- a/stocker/stocker.c Mon Aug 06 18:23:33 2007 -0400
+++ b/stocker/stocker.c Mon Aug 06 18:24:49 2007 -0400
@@ -17,23 +17,17 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif
+
+#include "../common/pp_internal.h"
#include <gdk/gdk.h>
#include <gtk/gtk.h>
-#define PURPLE_PLUGINS
-
#include <gtkplugin.h>
#include <gtkprefs.h>
#include <gtkblist.h>
#include <gtkutils.h>
#include <prefs.h>
-#include <version.h>
-
-#include "../common/pp_internal.h"
#include "gtkticker.h"
#include "stocker_prefs.h"
--- a/switchspell/switchspell.c Mon Aug 06 18:23:33 2007 -0400
+++ b/switchspell/switchspell.c Mon Aug 06 18:24:49 2007 -0400
@@ -17,11 +17,8 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif
-#define PURPLE_PLUGINS
+#include "../common/pp_internal.h"
#define PLUGIN_ID "gtk-plugin_pack-switchspell"
#define PLUGIN_NAME "Switch Spell"
@@ -31,22 +28,15 @@
#define PLUGIN_AUTHOR "Alfredo Raul Pena (arpena)\n" \
"Sadrul H Chowdhury <sadrul@users.sourceforge.net>"
-/* System headers */
-#include <glib.h>
-
/* Purple headers */
-#include <plugin.h>
-#include <version.h>
-
#include <conversation.h>
#include <debug.h>
+#include <plugin.h>
+/* Pidgin headers */
#include <gtkconv.h>
#include <gtkplugin.h>
-/* Pack/Local headers */
-#include "../common/pp_internal.h"
-
#include <aspell.h>
#include <gtkspell/gtkspell.h>
#include <string.h>
@@ -55,8 +45,6 @@
/* TODO: Add option to save the selected language for the dude and restore it */
-static void regenerate_switchspell_menu(PidginConversation *gtkconv);
-
static void
menu_conv_use_dict_cb(GObject *m, gpointer data)
{
--- a/talkfilters/talkfilters.c Mon Aug 06 18:23:33 2007 -0400
+++ b/talkfilters/talkfilters.c Mon Aug 06 18:24:49 2007 -0400
@@ -8,23 +8,11 @@
*/
/* TODO:
--- save filter preference
- -- done (sadrul)
-- slash commands (allowing it to be a one liner)
--- convert all gtk preference calls to pidgin internal calls
- -- done (sadrul)
-- allow saving different filters for different buddies (or accounts)
--- add an entry in the popup for the imhtml-entry in the conversation window
- to allow changing the filter for that conversation. (so that I can quickly
- turn it on when nosnilmot or Paco-Paco is around)
- -- done (added a menuitem in the conversation window instead)
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif /* HAVE_CONFIG_H */
-
-#define PURPLE_PLUGINS
+#include "../common/pp_internal.h"
#include <stdio.h>
#include <string.h>
@@ -34,16 +22,14 @@
#include <sys/types.h>
#include <sys/stat.h>
+
#include <debug.h>
#include <signals.h>
#include <util.h>
-#include <version.h>
#include <gtkplugin.h>
#include <gtkutils.h>
-#include "../common/pp_internal.h"
-
#include <talkfilters.h>
#define PREF_PREFIX "/plugins/gtk/bleeter/talkfilters"
@@ -56,8 +42,6 @@
static const gtf_filter_t *filter_list = NULL;
static int filter_count = 0;
-static void regenerate_talkfilter_menu(PidginConversation *gtkconv);
-
static void
translate_message(char **message, const gtf_filter_t *filter) {
if (message == NULL || *message == NULL) {
--- a/xchat-chats/gaim-xchat.c Mon Aug 06 18:23:33 2007 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,468 +0,0 @@
-/*
- * Purple-XChat - Use XChat-like chats
- * Copyright (C) 2005
- *
- * 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., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif
-
-#define PURPLE_PLUGINS
-
-#define PLUGIN_ID "gtk-plugin_pack-gaim-xchat"
-#define PLUGIN_NAME "Purple-XChat"
-#define PLUGIN_STATIC_NAME "Purple-XChat"
-#define PLUGIN_SUMMARY "XChat-like chats with Purple"
-#define PLUGIN_DESCRIPTION "You can chat in Purple using XChat's indented view."
-#define PLUGIN_AUTHOR "Sadrul Habib Chowdhury <sadrul@users.sourceforge.net>"
-
-#define PREFS_PREFIX "/plugins/gtk/" PLUGIN_ID
-#define PREFS_DATE_FORMAT PREFS_PREFIX "/date_format"
-
-/* System headers */
-#include <string.h>
-
-#include <gdk/gdk.h>
-#include <glib.h>
-#include <gtk/gtk.h>
-
-/* Purple headers */
-
-#include <conversation.h>
-#include <gtkconv.h>
-
-#include <util.h>
-
-#include <gtkplugin.h>
-#include <version.h>
-
-/* Pack/Local headers */
-#include "../common/pp_internal.h"
-
-#include "xtext.h"
-
-static PurpleConversationUiOps *uiops = NULL;
-
-static void (*default_write_conv)(PurpleConversation *conv, const char *name, const char *alias,
- const char *message, PurpleMessageFlags flags, time_t mtime);
-static void (*default_create_conversation)(PurpleConversation *conv);
-
-static void (*default_destroy_conversation)(PurpleConversation *conv);
-
-static GtkWidget* hack_and_get_widget(PidginConversation *gtkconv);
-void palette_alloc (GtkWidget * widget);
-
-typedef struct _PurpleXChat PurpleXChat;
-
-struct _PurpleXChat
-{
- GtkWidget *imhtml;
- GtkWidget *xtext;
-};
-
-static GHashTable *xchats = NULL; /* Hashtable of xchats */
-
-typedef enum
-{
- GX_SEND,
- GX_RECV,
- GX_SYSTEM,
- GX_HIGHLIGHT,
- GX_ERROR
-}PurpleXChatMessage;
-
-static GdkColor colors[][2] = {
- /* colors for xtext */
- { {0, 0x4c4c, 0x4c4c, 0x4c4c}, {0, 0x4c4c, 0x4c4c, 0x4c4c} }, /* Message sent */
- { {0, 0x35c2, 0x35c2, 0xb332}, {0, 0, 0, 0} }, /* Message received */
- { {0, 0xd9d9, 0xa6a6, 0x4141}, {0, 0xd9d9, 0xa6a6, 0x4141} }, /* System message */
- { {0, 0xc7c7, 0x3232, 0x3232}, {0, 0xc7c7, 0x3232, 0x3232} }, /* Highlight message */
- { {0, 0xc7c7, 0x3232, 0x3232}, {0, 0x4c4c, 0x4c4c, 0x4c4c} }, /* Error message */
-};
-#if 0
- {0, 0xcccc, 0xcccc, 0xcccc}, /* 16 white */
- {0, 0x0000, 0x0000, 0x0000}, /* 17 black */
- {0, 0x35c2, 0x35c2, 0xb332}, /* 18 blue */
- {0, 0x2a3d, 0x8ccc, 0x2a3d}, /* 19 green */
- {0, 0xc7c7, 0x3232, 0x3232}, /* 21 light red */
- {0, 0x8000, 0x2666, 0x7fff}, /* 22 purple */
- {0, 0xd999, 0xa6d3, 0x4147}, /* 24 yellow */
- {0, 0x3d70, 0xcccc, 0x3d70}, /* 25 green */
- {0, 0x199a, 0x5555, 0x5555}, /* 26 aqua */
- {0, 0x2eef, 0x8ccc, 0x74df}, /* 27 light aqua */
- {0, 0x451e, 0x451e, 0xe666}, /* 28 blue */
- {0, 0x4c4c, 0x4c4c, 0x4c4c}, /* 30 grey */
- {0, 0x9595, 0x9595, 0x9595}, /* 31 light grey */
-
- {0, 0xcccc, 0xcccc, 0xcccc}, /* 16 white */
- {0, 0x0000, 0x0000, 0x0000}, /* 17 black */
- {0, 0x35c2, 0x35c2, 0xb332}, /* 18 blue */
- {0, 0x2a3d, 0x8ccc, 0x2a3d}, /* 19 green */
- {0, 0xc7c7, 0x3232, 0x3232}, /* 21 light red */
- {0, 0x8000, 0x2666, 0x7fff}, /* 22 purple */
- {0, 0xd999, 0xa6d3, 0x4147}, /* 24 yellow */
- {0, 0x3d70, 0xcccc, 0x3d70}, /* 25 green */
- {0, 0x199a, 0x5555, 0x5555}, /* 26 aqua */
- {0, 0x2eef, 0x8ccc, 0x74df}, /* 27 light aqua */
- {0, 0x451e, 0x451e, 0xe666}, /* 28 blue */
- {0, 0x4c4c, 0x4c4c, 0x4c4c}, /* 30 grey */
- {0, 0x9595, 0x9595, 0x9595}, /* 31 light grey */
-
- {0, 0xffff, 0xffff, 0xffff}, /* 32 marktext Fore (white) */
- {0, 0x3535, 0x6e6e, 0xc1c1}, /* 33 marktext Back (blue) */
- {0, 0x0000, 0x0000, 0x0000}, /* 34 foreground (black) */
- {0, 0xf0f0, 0xf0f0, 0xf0f0}, /* 35 background (white) */
- {0, 0xcccc, 0x1010, 0x1010}, /* 36 marker line (red) */
-
- /* colors for GUI */
- {0, 0x9999, 0x0000, 0x0000}, /* 37 tab New Data (dark red) */
- {0, 0x0000, 0x0000, 0xffff}, /* 38 tab Nick Mentioned (blue) */
- {0, 0xffff, 0x0000, 0x0000}, /* 39 tab New Message (red) */
- {0, 0x9595, 0x9595, 0x9595}, /* 40 away user (grey) */
-};
-#endif
-
-#if 0
-/* check if a word is clickable */
-
-static int
-mg_word_check (GtkWidget * xtext, char *word, int len)
-{
- session *sess = current_sess;
- int ret;
-
- ret = url_check_word (word, len); /* common/url.c */
- if (ret == 0)
- {
- if (( (word[0]=='@' || word[0]=='+') && userlist_find (sess, word+1)) || userlist_find (sess, word))
- return WORD_NICK;
-
- if (sess->type == SESS_DIALOG)
- return WORD_DIALOG;
- }
-
- return ret;
-}
-#endif
-
-GtkWidget *get_xtext(PurpleConversation *conv)
-{
- PurpleXChat *gx;
-
- if ((gx = g_hash_table_lookup(xchats, conv)) == NULL)
- {
- PidginConversation *gtkconv;
- GtkWidget *xtext;
- GtkWidget *imhtml = NULL;
- GtkStyle *style;
-
- gtkconv = PIDGIN_CONVERSATION(conv);
- if (!gtkconv)
- return NULL;
- imhtml = gtkconv->imhtml;
- style = gtk_widget_get_style(imhtml);
-
- palette_alloc(pidgin_conv_get_window(gtkconv)->window);
-
- gx = g_new0(PurpleXChat, 1);
-
- xtext = gtk_xtext_new(colors, TRUE);
-
- /* TODO: Figure out a way to set the colors correctly */
- gtk_xtext_set_foreground_color(GTK_XTEXT(xtext), &style->text[0]);
- gtk_xtext_set_background_color(GTK_XTEXT(xtext), &style->base[0]);
- gtk_xtext_set_indent(GTK_XTEXT(xtext), TRUE);
- gtk_xtext_set_max_indent(GTK_XTEXT(xtext), 200);
-
- gx->xtext = xtext;
- gx->imhtml = hack_and_get_widget(gtkconv);
-
- if (!gtk_xtext_set_font(GTK_XTEXT(xtext),
- pango_font_description_to_string(style->font_desc)))
- return NULL;
-
- g_hash_table_insert(xchats, conv, gx);
- }
- return gx->xtext;
-}
-
-void
-palette_alloc (GtkWidget * widget)
-{
- int i;
- static int done_alloc = FALSE;
- GdkColormap *cmap;
-
- if (!done_alloc) /* don't do it again */
- {
- done_alloc = TRUE;
- cmap = gtk_widget_get_colormap (widget);
- for (i = G_N_ELEMENTS(colors)-1; i >= 0; i--)
- {
- gdk_colormap_alloc_color (cmap, &colors[i][0], FALSE, TRUE);
- gdk_colormap_alloc_color (cmap, &colors[i][1], FALSE, TRUE);
- }
- }
-}
-
-static void purple_xchat_write_conv(PurpleConversation *conv, const char *name, const char *alias,
- const char *message, PurpleMessageFlags flags, time_t mtime)
-{
- PurpleConversationType type;
- GtkWidget *xtext;
- char *msg;
- PurpleXChatMessage col = 0;
-
- /* Do the usual stuff first. */
- default_write_conv(conv, name, alias, message, flags, mtime);
-
- type = purple_conversation_get_type(conv);
- if (type != PURPLE_CONV_TYPE_CHAT)
- {
- /* If it's IM, we have nothing to do. */
- return;
- }
-
- /* So it's a chat. Let's play. */
-
- xtext = get_xtext(conv);
- if (name == NULL || !strcmp(name, purple_conversation_get_name(conv)))
- name = "*";
- msg = purple_markup_strip_html(message);
- if (msg && msg[0] == '/' && msg[1] == 'm' && msg[2] == 'e' && msg[3] == ' ')
- {
- char *tmp = msg;
- msg = g_strdup_printf("%s%s", name, tmp+3);
- g_free(tmp);
- name = "*";
- }
-
- if (flags & PURPLE_MESSAGE_SEND)
- col = GX_SEND;
- else if (flags & PURPLE_MESSAGE_RECV)
- {
- if (flags & PURPLE_MESSAGE_NICK)
- col = GX_HIGHLIGHT;
- else
- col = GX_RECV;
- }
- else if (flags & PURPLE_MESSAGE_ERROR)
- col = GX_ERROR;
- else if ((flags & PURPLE_MESSAGE_SYSTEM) || (flags & PURPLE_MESSAGE_NO_LOG))
- col = GX_SYSTEM;
-
- gtk_xtext_append_indent(GTK_XTEXT(xtext)->buffer, (guchar*)name, strlen(name), colors[col][0].pixel,
- (guchar*)msg, strlen(msg), colors[col][1].pixel);
- g_free(msg);
-}
-
-static GtkWidget*
-hack_and_get_widget(PidginConversation *gtkconv)
-{
- GtkWidget *tab_cont, *pane, *vbox, *hpaned, *frame;
- GList *list;
- const char *name;
-
- /* If you think this is ugly, you are right. */
-#define DEBUG_INFO(x) \
- name = G_OBJECT_TYPE_NAME(x); \
- printf("%s\n", name)
-
- tab_cont = gtkconv->tab_cont;
- DEBUG_INFO(tab_cont);
-
- list = gtk_container_get_children(GTK_CONTAINER(tab_cont));
- pane = list->data;
- g_list_free(list);
- DEBUG_INFO(pane);
-
- vbox = GTK_PANED(pane)->child1;
- DEBUG_INFO(vbox);
- list = GTK_BOX(vbox)->children;
- while (list->next)
- list = list->next;
- hpaned = ((GtkBoxChild*)list->data)->widget;
- DEBUG_INFO(hpaned);
-
- frame = GTK_PANED(hpaned)->child1;
- return frame;
-}
-
-static void
-purple_conversation_use_xtext(PurpleConversation *conv)
-{
- PidginConversation *gtkconv;
- GtkWidget *parent, *box, *wid, *frame, *xtext;
-
- if (purple_conversation_get_type(conv) != PURPLE_CONV_TYPE_CHAT)
- return;
-
- gtkconv = PIDGIN_CONVERSATION(conv);
- if (!gtkconv)
- return;
-
- frame = hack_and_get_widget(gtkconv);
- parent = frame->parent;
- gtk_widget_hide_all(frame);
- g_object_ref(frame);
-
- box = gtk_hbox_new(FALSE, 0);
- xtext = get_xtext(conv);
- GTK_PANED(parent)->child1 = NULL;
- gtk_paned_pack1(GTK_PANED(parent), box, TRUE, TRUE);
-
- gtk_box_pack_start(GTK_BOX(box), xtext, TRUE, TRUE, 0);
-
- wid = gtk_vscrollbar_new(GTK_XTEXT(xtext)->adj);
- gtk_box_pack_start(GTK_BOX(box), wid, FALSE, FALSE, 0);
- GTK_WIDGET_UNSET_FLAGS(wid, GTK_CAN_FOCUS);
-
- gtk_widget_show_all(box);
- gtk_widget_realize(xtext);
-}
-
-static void
-purple_xchat_create_conv(PurpleConversation *conv)
-{
- default_create_conversation(conv);
- purple_conversation_use_xtext(conv);
-}
-
-static void
-purple_xchat_destroy_conv(PurpleConversation *conv)
-{
- PurpleXChat *gx;
-
- default_destroy_conversation(conv);
-
- gx = g_hash_table_lookup(xchats, conv);
- if (gx)
- {
- g_free(gx);
- g_hash_table_remove(xchats, conv);
- }
-}
-
-static gboolean
-plugin_load(PurplePlugin *plugin)
-{
- GList *list;
-
- uiops = pidgin_conversations_get_conv_ui_ops();
-
- if (uiops == NULL)
- return FALSE;
-
- /* Use the oh-so-useful uiops. Signals? bleh. */
- default_write_conv = uiops->write_conv;
- uiops->write_conv = purple_xchat_write_conv;
-
- default_create_conversation = uiops->create_conversation;
- uiops->create_conversation = purple_xchat_create_conv;
-
- default_destroy_conversation = uiops->destroy_conversation;
- uiops->destroy_conversation = purple_xchat_destroy_conv;
-
- xchats = g_hash_table_new(g_direct_hash, g_direct_equal);
-
- list = purple_get_chats();
- while (list)
- {
- purple_conversation_use_xtext(list->data);
- list = list->next;
- }
-
- return TRUE;
-}
-
-static void remove_xtext(PurpleConversation *conv, PurpleXChat *gx, gpointer null)
-{
- GtkWidget *frame, *parent;
-
- frame = gx->xtext->parent;
- parent = frame->parent;
-
- GTK_PANED(parent)->child1 = NULL;
- gx->imhtml->parent = NULL;
- gtk_paned_add1(GTK_PANED(parent), gx->imhtml);
- g_object_unref(gx->imhtml);
-
- gtk_widget_show_all(gx->imhtml);
-
- gtk_widget_destroy(frame);
-}
-
-static gboolean
-plugin_unload(PurplePlugin *plugin)
-{
- /* Restore the default ui-ops */
- uiops->write_conv = default_write_conv;
- uiops->create_conversation = default_create_conversation;
- uiops->destroy_conversation = default_destroy_conversation;
-
- /* Clear up everything */
- g_hash_table_foreach(xchats, (GHFunc)remove_xtext, NULL);
- g_hash_table_destroy(xchats);
-
- return TRUE;
-}
-
-static PurplePluginInfo info =
-{
- PURPLE_PLUGIN_MAGIC, /* Magic */
- PURPLE_MAJOR_VERSION, /* Purple Major Version */
- PURPLE_MINOR_VERSION, /* Purple Minor Version */
- PURPLE_PLUGIN_STANDARD, /* plugin type */
- PIDGIN_PLUGIN_TYPE, /* ui requirement */
- 0, /* flags */
- NULL, /* dependencies */
- PURPLE_PRIORITY_DEFAULT, /* priority */
-
- PLUGIN_ID, /* plugin id */
- NULL, /* name */
- PP_VERSION, /* version */
- NULL, /* summary */
- NULL, /* description */
- PLUGIN_AUTHOR, /* author */
- PP_WEBSITE, /* website */
-
- plugin_load, /* load */
- plugin_unload, /* unload */
- NULL, /* destroy */
-
- NULL, /* ui_info */
- NULL, /* extra_info */
- NULL, /* prefs_info */
- NULL /* actions */
-};
-
-static void
-init_plugin(PurplePlugin *plugin) {
-#ifdef ENABLE_NLS
- bindtextdomain(GETTEXT_PACKAGE, PP_LOCALEDIR);
- bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
-#endif /* ENABLE_NLS */
-
- info.name = _(PLUGIN_NAME);
- info.summary = _(PLUGIN_SUMMARY);
- info.description = _(PLUGIN_DESCRIPTION);
-
- purple_prefs_add_none(PREFS_PREFIX);
- purple_prefs_add_string(PREFS_DATE_FORMAT, "[%H:%M]");
-}
-
-PURPLE_INIT_PLUGIN(PLUGIN_STATIC_NAME, init_plugin, info)
--- a/xchat-chats/xchat-chats.c Mon Aug 06 18:23:33 2007 -0400
+++ b/xchat-chats/xchat-chats.c Mon Aug 06 18:24:49 2007 -0400
@@ -17,11 +17,8 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif
-#define PURPLE_PLUGINS
+#include "../common/pp_internal.h"
#define PLUGIN_ID "gtk-plugin_pack-xchat-chats"
#define PLUGIN_NAME "XChat Chats"
@@ -35,23 +32,16 @@
/* System headers */
#include <string.h>
-
#include <gdk/gdk.h>
-#include <glib.h>
#include <gtk/gtk.h>
/* Purple headers */
-
#include <conversation.h>
-#include <gtkconv.h>
-
#include <util.h>
+/* Pidgin headers */
+#include <gtkconv.h>
#include <gtkplugin.h>
-#include <version.h>
-
-/* Pack/Local headers */
-#include "../common/pp_internal.h"
#include "xtext.h"
--- a/xmmsremote/xmmsremote.c Mon Aug 06 18:23:33 2007 -0400
+++ b/xmmsremote/xmmsremote.c Mon Aug 06 18:24:49 2007 -0400
@@ -16,7 +16,9 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include <glib.h>
+
+#include "../common/pp_internal.h"
+
#include <gtk/gtk.h>
#include <gdk/gdk.h>
@@ -24,12 +26,6 @@
#include <string.h>
-#ifdef HAVE_CONFIG_H
-# include "../pp_config.h"
-#endif
-
-#define PURPLE_PLUGINS
-
#include <cmds.h>
#include <conversation.h>
#include <debug.h>
@@ -40,7 +36,6 @@
#include <gtkprefs.h>
#include <gtkutils.h>
#include <prefs.h>
-#include <version.h>
/*******************************************************************************
* Constants