pidgin/purple-plugin-pack
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 @@
-Your name could be here!!
+Daniel Attallah <datallah@users.sourceforge.net> +Benjamin Seidenberg <benjamin@debian.org> +Stu Tomlinson <stu@nosnilmot.com> + - Red Hat Enterprise Linux 4 @@ -34,3 +43,10 @@
+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 @@
/* 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 @@
/* XXX: For DATADIR... There must be a better way. */
--- 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 @@
#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 @@
/* 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 @@
--- 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 @@
+#include "../common/pp_internal.h" -#include "../common/pp_internal.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
-# include "../pp_config.h"
+#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>"
-/* Pack/Local headers */
-#include "../common/pp_internal.h"
--- 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
-# include "../pp_config.h"
-#endif /* HAVE_CONFIG_H */
+#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>"
@@ -48,10 +42,6 @@
#include <savedstatuses.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.
-# include "../pp_config.h"
#include "../common/pp_internal.h"
#include <conversation.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.
-# include "../pp_config.h"
#include "../common/pp_internal.h"
@@ -33,16 +29,11 @@
#include <conversation.h>
#define BASH_QUOTES 636661
--- 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.
-# include "../pp_config.h"
-#endif /* HAVE_CONFIG_H */
+#include "../common/pp_internal.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
-# include "../pp_config.h"
+#include "../common/pp_internal.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.
-# include "../pp_config.h"
-#endif /* HAVE_CONFIG_H */
+#include "../common/pp_internal.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
-# include "../pp_config.h"
+#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 "../common/pp_internal.h"
/******************************************************************************
*****************************************************************************/
--- 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.
-# include "../pp_config.h"
-#endif /* HAVE_CONFIG_H */
#include "../common/pp_internal.h"
#include <conversation.h>
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
- PURPLE_MAJOR_VERSION, /* bet you can't guess what this is */
- PURPLE_MINOR_VERSION, /* this either */
- PURPLE_PLUGIN_STANDARD, /* and what about this? */
+ PURPLE_PLUGIN_STANDARD, --- 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
-# include "../pp_config.h"
+#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>"
-/* Pack/Local headers */
-#include "../common/pp_internal.h"
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 */
- NULL, /* dependencies */
+ PURPLE_PLUGIN_STANDARD, /* plugin type */ + NULL, /* ui requirement */ + NULL, /* dependencies */ PURPLE_PRIORITY_DEFAULT, /* priority */
- PLUGIN_ID, /* plugin id */
- PP_VERSION, /* version */
- NULL, /* description */
- PLUGIN_AUTHOR, /* author */
- PP_WEBSITE, /* website */
+ PLUGIN_ID, /* plugin id */ + PP_VERSION, /* version */ + NULL, /* description */ + PLUGIN_AUTHOR, /* author */ + PP_WEBSITE, /* website */ - plugin_load, /* load */
- plugin_unload, /* unload */
+ plugin_load, /* load */ + plugin_unload, /* unload */
--- 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
-# include "../pp_config.h"
+#include "../common/pp_internal.h" #define PLUGIN_ID "unnamed plugin"
#define PLUGIN_NAME "unnamed"
@@ -32,15 +29,10 @@
-/* Pack/Local headers */
-#include "../common/pp_internal.h"
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 */ - PURPLE_PRIORITY_DEFAULT, /* priority */
+ PURPLE_PRIORITY_DEFAULT, /* priority */ PLUGIN_ID, /* plugin id */
- PP_VERSION, /* version */
+ PP_VERSION, /* version */ PLUGIN_AUTHOR, /* author */
- PP_WEBSITE, /* website */
+ PP_WEBSITE, /* website */ plugin_unload, /* unload */
@@ -77,7 +69,11 @@
--- 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 @@
+/* Every plugin for libpurple, Pidgin, or Finch needs to define PURPLE_PLUGINS + * in order to compile and run correctly. Define it here for simplicity */ +/* 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 */ #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.
-# include "../pp_config.h"
-#endif /* HAVE_CONFIG_H */
#include "../common/pp_internal.h"
+#include <conversation.h> +#include <gtkmenutray.h> +/****************************************************************************** + *****************************************************************************/ + PurpleConversation *conv; +/****************************************************************************** + *****************************************************************************/ +static GHashTable *data = NULL; +/****************************************************************************** + *****************************************************************************/ +conv_badger_data_free(ConvBadgerData *cbd) { + if(GTK_IS_IMAGE(cbd->icon)) + gtk_widget_destroy(cbd->icon); +conv_badger_data_free_helper(gpointer k, gpointer v, gpointer d) { + ConvBadgerData *cbd = (ConvBadgerData *)v; + conv_badger_data_free(cbd); +conv_badger_update(PidginWindow *win, PurpleConversation *conv) { + ConvBadgerData *cbd = NULL; + GdkPixbuf *pixbuf = NULL; + PurpleAccount *account = NULL; + g_return_if_fail(conv); + cbd = g_hash_table_lookup(data, win); + cbd = g_new0(ConvBadgerData, 1); + cbd->icon = gtk_image_new(); + pidgin_menu_tray_append(PIDGIN_MENU_TRAY(win->menu.tray), cbd->icon, + gtk_widget_show(cbd->icon); + 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); +/****************************************************************************** + *****************************************************************************/ +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); +convbadger_conv_destroyed_cb(PurpleConversation *conv, gpointer data) { +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_load(PurplePlugin *plugin) {
void *conv_handle = purple_conversations_get_handle();
+ data = g_hash_table_new_full(g_direct_hash, g_direct_equal, 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); +plugin_unload(PurplePlugin *plugin) { + g_hash_table_foreach(data, conv_badger_data_free_helper, NULL); + g_hash_table_destroy(data); @@ -63,7 +172,7 @@
--- 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.
-# include "../pp_config.h"
-#endif /* HAVE_CONFIG_H */
+#include "../common/pp_internal.h"
@@ -31,9 +27,6 @@
#include <conversation.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
-# include "../pp_config.h"
+#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>"
-#include <conversation.h>
-/* Pack/Local headers */
-#include "../common/pp_internal.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.
-# include "../pp_config.h"
#include "../common/pp_internal.h"
@@ -32,16 +28,11 @@
#include <conversation.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.
-# include "../pp_config.h"
-#endif /* HAVE_CONFIG_H */
+#include "../common/pp_internal.h"
@@ -30,9 +26,6 @@
#include <conversation.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..
-# include "../pp_config.h"
-#endif /* HAVE_CONFIG_H */
+#include "../common/pp_internal.h"
-#include <conversation.h>
-#include "../common/pp_internal.h"
#if GLIB_CHECK_VERSION(2,6,0)
--- 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.
-# include "../pp_config.h"
-#endif /* HAVE_CONFIG_H */
+#include "../common/pp_internal.h" @@ -28,9 +25,6 @@
-#include "../common/pp_internal.h"
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
-# include "../pp_config.h"
+#include "../common/pp_internal.h" #define PLUGIN_ID "gtk-plugin_pack-hideconv"
#define PLUGIN_NAME "Hide Conversation"
@@ -32,18 +29,12 @@
-/* Pack/Local headers */
-#include "../common/pp_internal.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
-# include "../pp_config.h"
+/* Pack/Local headers */ +#include "../common/pp_internal.h" @@ -33,13 +30,9 @@
-/* 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
-# include "../pp_config.h"
+/* Pack/Local headers */ +#include "../common/pp_internal.h" #include <conversation.h>
-/* Pack/Local headers */
-#include "../common/pp_internal.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
-# include "../pp_config.h"
+/* Pack/Local headers */ +#include "../common/pp_internal.h" #include <conversation.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 @@
+#include "../common/pp_internal.h"
@@ -42,9 +38,6 @@
-#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 @@
-/* pp_config.h provides necessary definitions that help us find/do stuff */
-# include "../pp_config.h"
+#include "../common/pp_internal.h" -#include "../common/pp_internal.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 @@
-/* pp_config.h provides necessary definitions that help us find/do stuff */
-# include "../pp_config.h"
-/* all Purple plugins need to define this */
+#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>"
@@ -58,9 +46,6 @@
-/* Pack/Local headers */
-#include "../common/pp_internal.h"
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 @@
-/* pp_config.h provides necessary definitions that help us find/do stuff */
-# include "../pp_config.h"
+#include "../common/pp_internal.h" @@ -33,7 +30,6 @@
-#include "../common/pp_internal.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 @@
-/* pp_config.h provides necessary definitions that help us find/do stuff */
-# include "../pp_config.h"
+#include "../common/pp_internal.h" @@ -31,7 +28,6 @@
-#include "../common/pp_internal.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 @@
-/* pp_config.h provides necessary definitions that help us find/do stuff */
-# include "../pp_config.h"
+#include "../common/pp_internal.h" @@ -31,7 +28,6 @@
-#include "../common/pp_internal.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 @@
-/* pp_config.h provides necessary definitions that help us find/do stuff */
-# include "../pp_config.h"
+#include "../common/pp_internal.h" @@ -32,7 +29,6 @@
-#include "../common/pp_internal.h"
/******************************************************************************
@@ -47,8 +43,7 @@
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.
-# include "../pp_config.h"
-#endif /* HAVE_CONFIG_H */
+#include "../common/pp_internal.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.
-# include "../pp_config.h"
+#include "../common/pp_internal.h"
-/* this has to be defined for the plugin to work properly */
-#include "../common/pp_internal.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
-# include "../pp_config.h"
+#include "../common/pp_internal.h" #define PLUGIN_ID "gtk-plugin_pack-mystatusbox"
#define PLUGIN_NAME "Mystatusbox (Show Statusboxes)"
@@ -36,12 +33,8 @@
#if PURPLE_VERSION_CHECK(2,0,0) /* Stu is a chicken */
@@ -51,9 +44,6 @@
#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
-# include "../pp_config.h"
+#include "../common/pp_internal.h"
-#include "conversation.h"
+#include <conversation.h> -#include "../common/pp_internal.h"
#define NAP_SERVER "64.124.41.187"
--- 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
-# include "../pp_config.h"
+#include "../common/pp_internal.h" #define PLUGIN_ID "gtk-plugin_pack-nicksaid"
#define PLUGIN_NAME "Nicksaid"
@@ -41,24 +38,18 @@
-#include <conversation.h>
-#include <pidginstock.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.
-# include "../pp_config.h"
-#endif /* HAVE_CONFIG_H */
+#include "../common/pp_internal.h" #define OLDLOGGER_PLUGIN_ID "core-plugin_pack-oldlogger"
@@ -36,11 +34,6 @@
-#include "../common/pp_internal.h"
/* We want to use the gstdio functions when possible so that non-ASCII
* filenames are handled properly on Windows. */
@@ -54,16 +47,9 @@
-#if PURPLE_VERSION_CHECK(2,0,0)
static PurpleLogLogger *oldtxt_logger;
static PurpleLogLogger *oldhtml_logger;
#define return_written return written
-static PurpleLogLogger oldtxt_logger;
-static PurpleLogLogger oldhtml_logger;
-#define return_written return
struct basic_logger_data {
@@ -214,11 +200,7 @@
** Ye Olde PLAIN TEXT LOGGER **
*******************************/
-#if PURPLE_VERSION_CHECK(2,0,0)
oldtxt_logger_write(PurpleLog *log, PurpleMessageFlags type,
const char *from, time_t time, const char *message)
@@ -330,29 +312,10 @@
-#if !PURPLE_VERSION_CHECK(2,0,0)
-static PurpleLogLogger oldtxt_logger = {
- N_("Old plain text"), "oldtxt",
/****************************
** Ye Olde HTML LOGGER *****
****************************/
-#if PURPLE_VERSION_CHECK(2,0,0)
oldhtml_logger_write(PurpleLog *log, PurpleMessageFlags type,
const char *from, time_t time, const char *message)
@@ -461,24 +424,9 @@
-#if !PURPLE_VERSION_CHECK(2,0,0)
-static PurpleLogLogger oldhtml_logger = {
- N_("Old HTML"), "oldhtml",
plugin_load(PurplePlugin *plugin)
-#if PURPLE_VERSION_CHECK(2,0,0)
oldtxt_logger = purple_log_logger_new("oldtxt", N_("Old plain text"), 3,
@@ -489,10 +437,6 @@
purple_log_logger_add(oldhtml_logger);
- purple_log_logger_add(&oldtxt_logger);
- purple_log_logger_add(&oldhtml_logger);
purple_prefs_trigger_callback("/purple/logging/format");
@@ -500,13 +444,8 @@
plugin_unload(PurplePlugin *plugin)
-#if PURPLE_VERSION_CHECK(2,0,0)
purple_log_logger_remove(oldtxt_logger);
purple_log_logger_remove(oldhtml_logger);
- purple_log_logger_remove(&oldtxt_logger);
- purple_log_logger_remove(&oldhtml_logger);
purple_prefs_trigger_callback("/purple/logging/format");
--- 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 "../pp_config.h"
#include "../common/pp_internal.h"
#include <conversation.h>
@@ -40,7 +34,6 @@
/* #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
-# include "../pp_config.h"
+#include "../common/pp_internal.h" #define PLUGIN_ID "gtk-schedule"
#define PLUGIN_NAME "Purple Schedule"
@@ -32,14 +29,11 @@
--- 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 @@
--- 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 @@
-# include "../pp_config.h"
-/* Pack/Local headers */
#include "../common/pp_internal.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.
-# include "../pp_config.h"
+#include "../common/pp_internal.h" #include <conversation.h>
-#include "../common/pp_internal.h"
#define SEPANDTAB_PREF "/pidgin/conversations/placement"
@@ -83,9 +78,11 @@
conv_placement_grp_type_sep_prpl(PidginConversation *conv) {
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);
pidgin_conv_placement_add_fnc("grp-type-sep-prpl", _("Group by Type, Separate by Protocol"),
&conv_placement_grp_type_sep_prpl);
purple_prefs_trigger_callback(SEPANDTAB_PREF);
--- 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.
-# include "../pp_config.h"
-#endif /* HAVE_CONFIG_H */
+#include "../common/pp_internal.h"
-#include "../common/pp_internal.h"
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.
-# include "../pp_config.h"
-#endif /* HAVE_CONFIG_H */
+#include "../common/pp_internal.h"
-#include "../common/pp_internal.h"
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"
#include "../common/pp_internal.h"
@@ -41,15 +36,12 @@
#include <conversation.h>
/* 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 @@
-# include "../pp_config.h"
#include "../common/pp_internal.h"
+# include <sys/socket.h> -#include <libc_interface.h>
+# include <libc_interface.h> @@ -50,7 +43,6 @@
#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.
-# include "../pp_config.h"
-#endif /* HAVE_CONFIG_H */
+#include "../common/pp_internal.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
-# include "../pp_config.h"
+#include "../common/pp_internal.h"
-#include "../common/pp_internal.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
-# include "../pp_config.h"
+#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>"
#include <conversation.h>
-/* Pack/Local headers */
-#include "../common/pp_internal.h"
#include <gtkspell/gtkspell.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);
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 @@
--- save filter preference
-- slash commands (allowing it to be a one liner)
--- convert all gtk preference calls to pidgin internal calls
-- 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)
-# include "../pp_config.h"
-#endif /* HAVE_CONFIG_H */
+#include "../common/pp_internal.h" @@ -34,16 +22,14 @@
-#include "../common/pp_internal.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);
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
- * 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
-# include "../pp_config.h"
-#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"
-#include <conversation.h>
-/* Pack/Local headers */
-#include "../common/pp_internal.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;
-static GHashTable *xchats = NULL; /* Hashtable of xchats */
-static GdkColor colors[][2] = {
- { {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 */
- {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) */
- {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) */
-/* check if a word is clickable */
-mg_word_check (GtkWidget * xtext, char *word, int len)
- session *sess = current_sess;
- ret = url_check_word (word, len); /* common/url.c */
- if (( (word[0]=='@' || word[0]=='+') && userlist_find (sess, word+1)) || userlist_find (sess, word))
- if (sess->type == SESS_DIALOG)
-GtkWidget *get_xtext(PurpleConversation *conv)
- if ((gx = g_hash_table_lookup(xchats, conv)) == NULL)
- PidginConversation *gtkconv;
- GtkWidget *imhtml = NULL;
- gtkconv = PIDGIN_CONVERSATION(conv);
- 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->imhtml = hack_and_get_widget(gtkconv);
- if (!gtk_xtext_set_font(GTK_XTEXT(xtext),
- pango_font_description_to_string(style->font_desc)))
- g_hash_table_insert(xchats, conv, gx);
-palette_alloc (GtkWidget * widget)
- static int done_alloc = FALSE;
- if (!done_alloc) /* don't do it again */
- 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;
- 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. */
- /* So it's a chat. Let's play. */
- xtext = get_xtext(conv);
- if (name == NULL || !strcmp(name, purple_conversation_get_name(conv)))
- msg = purple_markup_strip_html(message);
- if (msg && msg[0] == '/' && msg[1] == 'm' && msg[2] == 'e' && msg[3] == ' ')
- msg = g_strdup_printf("%s%s", name, tmp+3);
- if (flags & PURPLE_MESSAGE_SEND)
- else if (flags & PURPLE_MESSAGE_RECV)
- if (flags & PURPLE_MESSAGE_NICK)
- else if (flags & PURPLE_MESSAGE_ERROR)
- else if ((flags & PURPLE_MESSAGE_SYSTEM) || (flags & PURPLE_MESSAGE_NO_LOG))
- gtk_xtext_append_indent(GTK_XTEXT(xtext)->buffer, (guchar*)name, strlen(name), colors[col][0].pixel,
- (guchar*)msg, strlen(msg), colors[col][1].pixel);
-hack_and_get_widget(PidginConversation *gtkconv)
- GtkWidget *tab_cont, *pane, *vbox, *hpaned, *frame;
- /* If you think this is ugly, you are right. */
- name = G_OBJECT_TYPE_NAME(x); \
- tab_cont = gtkconv->tab_cont;
- list = gtk_container_get_children(GTK_CONTAINER(tab_cont));
- vbox = GTK_PANED(pane)->child1;
- list = GTK_BOX(vbox)->children;
- hpaned = ((GtkBoxChild*)list->data)->widget;
- frame = GTK_PANED(hpaned)->child1;
-purple_conversation_use_xtext(PurpleConversation *conv)
- PidginConversation *gtkconv;
- GtkWidget *parent, *box, *wid, *frame, *xtext;
- if (purple_conversation_get_type(conv) != PURPLE_CONV_TYPE_CHAT)
- gtkconv = PIDGIN_CONVERSATION(conv);
- frame = hack_and_get_widget(gtkconv);
- parent = frame->parent;
- gtk_widget_hide_all(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);
-purple_xchat_create_conv(PurpleConversation *conv)
- default_create_conversation(conv);
- purple_conversation_use_xtext(conv);
-purple_xchat_destroy_conv(PurpleConversation *conv)
- default_destroy_conversation(conv);
- gx = g_hash_table_lookup(xchats, conv);
- g_hash_table_remove(xchats, conv);
-plugin_load(PurplePlugin *plugin)
- uiops = pidgin_conversations_get_conv_ui_ops();
- /* 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();
- purple_conversation_use_xtext(list->data);
-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);
-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);
-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 */
- NULL, /* dependencies */
- PURPLE_PRIORITY_DEFAULT, /* priority */
- PLUGIN_ID, /* plugin id */
- PP_VERSION, /* version */
- NULL, /* description */
- PLUGIN_AUTHOR, /* author */
- PP_WEBSITE, /* website */
- plugin_load, /* load */
- plugin_unload, /* unload */
-init_plugin(PurplePlugin *plugin) {
- bindtextdomain(GETTEXT_PACKAGE, PP_LOCALEDIR);
- bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
- 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
-# include "../pp_config.h"
+#include "../common/pp_internal.h" #define PLUGIN_ID "gtk-plugin_pack-xchat-chats"
#define PLUGIN_NAME "XChat Chats"
@@ -35,23 +32,16 @@
#include <conversation.h>
-/* Pack/Local headers */
-#include "../common/pp_internal.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 "../common/pp_internal.h" @@ -24,12 +26,6 @@
-# include "../pp_config.h"
#include <conversation.h>
@@ -40,7 +36,6 @@
/*******************************************************************************