pidgin/purple-plugin-pack

merge of 'c1642b251c4bfc7484d863f09847ddb85a471e9f'
org.guifications.plugins
2007-06-24, sadrul
6b0b40f00b3f
merge of 'c1642b251c4bfc7484d863f09847ddb85a471e9f'
and 'c6330bccc2562677023dbf17e3adf7dfb31a32a6'
--- a/AUTHORS Fri Jun 22 00:57:18 2007 -0400
+++ b/AUTHORS Sun Jun 24 19:38:05 2007 -0400
@@ -30,4 +30,5 @@
Lee Roach
Ryan Seeber
Anthony Sofocleous
+William Thompson
Chris Weyl
--- a/ChangeLog Fri Jun 22 00:57:18 2007 -0400
+++ b/ChangeLog Sun Jun 24 19:38:05 2007 -0400
@@ -9,6 +9,7 @@
* Added ignore plugin
* Added irc-more plugin
* Added highlight plugin
+ * Added more humorous stuff to eight_ball (resiak)
* Fixed build-by-default status for switchspell
* Fix crash in album when using Pidgin 2.0.2 or newer
--- a/Makefile.am Fri Jun 22 00:57:18 2007 -0400
+++ b/Makefile.am Sun Jun 24 19:38:05 2007 -0400
@@ -26,6 +26,12 @@
SUBDIRS = common doc m4 po $(PP_PURPLE_BUILD) $(PP_PIDGIN_BUILD) $(PP_FINCH_BUILD)
+DISTCLEANFILES=\
+ pp_config.h \
+ intltool-extract \
+ intltool-update \
+ intltool-merge
+
BUILT_SOURCES = pp_config.h
$(OBJECTS): $(BUILT_SOURCES)
--- a/autoreply/autoreply.c Fri Jun 22 00:57:18 2007 -0400
+++ b/autoreply/autoreply.c Sun Jun 24 19:38:05 2007 -0400
@@ -248,6 +248,9 @@
{
PurpleMenuAction *action;
+ if (purple_blist_node_get_flags(node) & PURPLE_BLIST_NODE_FLAG_NO_SAVE)
+ return;
+
if (!PURPLE_BLIST_NODE_IS_BUDDY(node) && !PURPLE_BLIST_NODE_IS_CONTACT(node))
return;
--- a/buddytime/buddytime.c Fri Jun 22 00:57:18 2007 -0400
+++ b/buddytime/buddytime.c Sun Jun 24 19:38:05 2007 -0400
@@ -185,6 +185,9 @@
bt_blist_drawing_menu_cb(PurpleBlistNode *node, GList **menu) {
PurpleMenuAction *action;
+ if (purple_blist_node_get_flags(node) & PURPLE_BLIST_NODE_FLAG_NO_SAVE)
+ return;
+
/* ignore chats and groups */
if(PURPLE_BLIST_NODE_IS_CHAT(node) || PURPLE_BLIST_NODE_IS_GROUP(node))
return;
--- a/configure.ac Fri Jun 22 00:57:18 2007 -0400
+++ b/configure.ac Sun Jun 24 19:38:05 2007 -0400
@@ -78,8 +78,14 @@
HAVE_PURPLE="yes"
AM_CONDITIONAL(HAVE_PURPLE, true)
-PURPLE_LIBDIR=`pkg-config --variable=libdir purple`
-PURPLE_DATADIR=`pkg-config --variable=datadir purple`
+if test x"$prefix" = x"NONE" ; then
+ PURPLE_LIBDIR=`pkg-config --variable=libdir purple`
+ PURPLE_DATADIR=`pkg-config --variable=datadir purple`
+else
+ PURPLE_LIBDIR="$libdir"
+ PURPLE_DATADIR="$datadir"
+fi
+
PURPLE_PIXMAPSDIR=""
# this is a hack but should work fine.
@@ -117,8 +123,14 @@
AM_CONDITIONAL(HAVE_PIDGIN, false)
])
-PIDGIN_LIBDIR=`pkg-config --variable=libdir pidgin`
-PIDGIN_DATADIR=`pkg-config --variable=datadir pidgin`
+if test x"$prefix" = x"NONE" ; then
+ PIDGIN_LIBDIR=`pkg-config --variable=libdir pidgin`
+ PIDGIN_DATADIR=`pkg-config --variable=datadir pidgin`
+else
+ PIDGIN_LIBDIR="$libdir"
+ PIDGIN_DATADIR="$datadir"
+fi
+
PIDGIN_PIXMAPSDIR=""
if test x"$PIDGIN_LIBDIR" != x"" ; then
@@ -149,8 +161,14 @@
AM_CONDITIONAL(HAVE_FINCH, false)
])
-FINCH_LIBDIR=`pkg-config --variable=libdir finch`
-FINCH_DATADIR=`pkg-config --variable=datadir finch`
+if test x"$prefix" = x"NONE" ; then
+ FINCH_LIBDIR=`pkg-config --variable=libdir finch`
+ FINCH_DATADIR=`pkg-config --variable=datadir finch`
+else
+ FINCH_LIBDIR="$libdir"
+ FINCH_DATADIR="$datadir"
+fi
+
FINCH_PIXMAPSDIR=""
if test x"$FINCH_LIBDIR" != x"" ; then
@@ -289,6 +307,7 @@
broadcast/Makefile
buddytime/Makefile
chronic/Makefile
+ convbadger/Makefile
dice/Makefile
difftopic/Makefile
eight_ball/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convbadger/Makefile.am Sun Jun 24 19:38:05 2007 -0400
@@ -0,0 +1,27 @@
+EXTRA_DIST=.pidgin-plugin
+
+convbadgerdir = $(PIDGIN_LIBDIR)
+
+convbadger_la_LDFLAGS = -module -avoid-version
+
+if HAVE_PIDGIN
+
+convbadger_LTLIBRARIES = convbadger.la
+
+convbadger_la_LIBADD = \
+ $(PIDGIN_LIBS) \
+ $(GLIB_LIBS)
+
+convbadger_la_SOURCES = convbadger.c
+
+endif
+
+AM_CPPFLAGS = \
+ -DLIBDIR=\"$(PIDGIN_LIBDIR)\" \
+ -DDATADIR=\"$(PIDGIN_DATADIR)\" \
+ -DPIXMAPSDIR=\"$(PIDGIN_PIXMAPSDIR)\" \
+ $(DEBUG_CFLAGS) \
+ $(PIDGIN_CFLAGS) \
+ $(GTK_CFLAGS) \
+ $(GLIB_CFLAGS)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convbadger/convbadger.c Sun Jun 24 19:38:05 2007 -0400
@@ -0,0 +1,88 @@
+/*
+ * GroupMsg - Send an IM to a group of buddies
+ * Copyright (C) 2004 Stu Tomlinson <stu@nosnilmot.com>
+ *
+ * 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 /* 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/i18n.h"
+
+static gboolean
+plugin_load(PurplePlugin *plugin) {
+ void *conv_handle = purple_conversations_get_handle();
+
+ 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);
+
+ return TRUE;
+}
+
+static PurplePluginInfo info = {
+ PURPLE_PLUGIN_MAGIC,
+ PURPLE_MAJOR_VERSION,
+ PURPLE_MINOR_VERSION,
+ PURPLE_PLUGIN_STANDARD,
+ NULL,
+ 0,
+ NULL,
+ PURPLE_PRIORITY_DEFAULT,
+
+ "gtk-plugin_pack-convbadger",
+ NULL,
+ PP_VERSION,
+ NULL,
+ NULL,
+ "Gary Kramlich <grim@reaperworld.com>",
+ PP_WEBSITE,
+
+ plugin_load,
+ NULL,
+ NULL,
+
+ NULL,
+ NULL,
+ NULL,
+ NULL
+};
+
+
+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 = _("Conversation Badger");
+ info.summary = _("Badges conversations with the protocol icon.");
+ info.description = _("Badges conversations with the protocol icon.");
+}
+
+PURPLE_INIT_PLUGIN(convbadger, init_plugin, info)
--- a/eight_ball/eight_ball.c Fri Jun 22 00:57:18 2007 -0400
+++ b/eight_ball/eight_ball.c Sun Jun 24 19:38:05 2007 -0400
@@ -65,7 +65,17 @@
"I believe a medical attack could be successful."
};
-static PurpleCmdId eight_ball_cmd_id = 0, sg_ball_cmd_id = 0;
+static const gchar *fullcrap_strings[] = {
+ "you are only fullcrap",
+ "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?"
+};
+
+static PurpleCmdId eight_ball_cmd_id = 0,
+ sg_ball_cmd_id = 0,
+ fullcrap_cmd_id = 0;
static PurpleCmdRet
eight_ball_cmd_func(PurpleConversation *conv, const gchar *cmd, gchar **args,
@@ -84,6 +94,10 @@
numstrings = sizeof(sg_ball_strings) / sizeof(sg_ball_strings[0]);
msgprefix = "The Purple Stargate Ball says";
msgs = sg_ball_strings;
+ } else if(!strcmp(cmd, "fullcrap")) {
+ numstrings = sizeof(fullcrap_strings) / sizeof(fullcrap_strings[0]);
+ msgprefix = "The Purple Fullcrap Ball says";
+ msgs = fullcrap_strings;
} else {
numstrings = sizeof(eight_ball_strings) / sizeof(eight_ball_strings[0]);
msgprefix = "The Purple 8 Ball says";
@@ -123,10 +137,11 @@
static gboolean
plugin_load(PurplePlugin *plugin)
{
- const gchar *eight_ball_help, *sg_ball_help;
+ const gchar *eight_ball_help, *sg_ball_help, *fullcrap_help;
eight_ball_help = _("8ball: sends a random 8ball message");
sg_ball_help = _("sgball: sends a random Stargate Ball message");
+ fullcrap_help = _("fullcrap: sends random fooling blabber");
eight_ball_cmd_id = purple_cmd_register("8ball", "w", PURPLE_CMD_P_PLUGIN,
PURPLE_CMD_FLAG_IM | PURPLE_CMD_FLAG_CHAT |
@@ -140,6 +155,12 @@
PURPLE_CMD_FUNC(eight_ball_cmd_func),
sg_ball_help, NULL);
+ fullcrap_cmd_id = purple_cmd_register("fullcrap", "w", PURPLE_CMD_P_PLUGIN,
+ PURPLE_CMD_FLAG_IM | PURPLE_CMD_FLAG_CHAT |
+ PURPLE_CMD_FLAG_ALLOW_WRONG_ARGS, NULL,
+ PURPLE_CMD_FUNC(eight_ball_cmd_func),
+ fullcrap_help, NULL);
+
return TRUE;
}
--- a/lastseen/lastseen.c Fri Jun 22 00:57:18 2007 -0400
+++ b/lastseen/lastseen.c Sun Jun 24 19:38:05 2007 -0400
@@ -108,29 +108,19 @@
purple_blist_node_set_int((PurpleBlistNode*)buddy, "signedoff", time(NULL) );
}
-#if PURPLE_VERSION_CHECK(2,0,0)
static void
drawing_tooltip_cb(PurpleBlistNode *node, GString *str, gboolean full, void *data)
-#else
-static void
-drawing_tooltip_cb(PurpleBlistNode *node, char **text, void *data)
-#endif
{
PurpleBuddy *buddy = NULL;
PurpleBlistNode *n;
time_t last = 0, max = 0, off = 0, on = 0;
const gchar *tmp = NULL;
gchar *seen = NULL, *said = NULL, *offs = NULL, *ons = NULL;
-#if !PURPLE_VERSION_CHECK(2,0,0)
- gchar *tmp2 = NULL;
-#endif
if(PURPLE_BLIST_NODE_IS_BUDDY(node))
{
-#if PURPLE_VERSION_CHECK(2,0,0)
if (!full)
return;
-#endif
node = (PurpleBlistNode *)purple_buddy_get_contact((PurpleBuddy *)node);
}
@@ -167,31 +157,15 @@
if(tmp)
said = g_strchomp(g_markup_escape_text(tmp, -1));
-#if PURPLE_VERSION_CHECK(2,0,0)
g_string_append_printf(str,
- "%s %s" /* Last seen */
- "%s %s" /* Last said */
- "%s %s" /* Signed on */
- "%s %s", /* Signed off */
- seen ? _("\n<b>Last Seen:</b>") : "", seen ? seen : "",
- said ? _("\n<b>Last Said:</b>") : "", said ? said : "",
- ons ? _("\n<b>Signed On:</b>") : "", ons ? ons : "",
- offs ? _("\n<b>Signed Off:</b>") : "", offs ? offs : "");
-#else
- tmp2 = g_strdup(*text);
- *text = g_strdup_printf("%s" /* existing */
- "%s %s" /* Last seen */
- "%s %s" /* Last said */
- "%s %s" /* Signed on */
- "%s %s", /* Signed off */
- tmp2,
- seen ? _("\n<b>Last Seen:</b>") : "", seen ? seen : "",
- said ? _("\n<b>Last Said:</b>") : "", said ? said : "",
- ons ? _("\n<b>Signed On:</b>") : "", ons ? ons : "",
- offs ? _("\n<b>Signed Off:</b>") : "", offs ? offs : "");
-
- g_free(tmp2);
-#endif
+ "%s%s" /* Last seen */
+ "%s%s" /* Last said */
+ "%s%s" /* Signed on */
+ "%s%s", /* Signed off */
+ seen ? _("\n<b>Last Seen</b>: ") : "", seen ? seen : "",
+ said ? _("\n<b>Last Said</b>: ") : "", said ? said : "",
+ ons ? _("\n<b>Signed On</b>: ") : "", ons ? ons : "",
+ offs ? _("\n<b>Signed Off</b>: ") : "", offs ? offs : "");
g_free(seen);
g_free(said);
g_free(ons);
--- a/listhandler/Makefile.am Fri Jun 22 00:57:18 2007 -0400
+++ b/listhandler/Makefile.am Sun Jun 24 19:38:05 2007 -0400
@@ -1,4 +1,12 @@
-EXTRA_DIST = .build .purple-plugin *.h Makefile.mingw
+EXTRA_DIST=\
+ .build \
+ .purple-plugin \
+ Makefile.mingw \
+ aim_blt_files.h \
+ gen_xml_files.h \
+ lh_util.h \
+ listhandler.h \
+ migrate.h
listhandlerdir = $(PURPLE_LIBDIR)
--- a/listhandler/gen_xml_files.c Fri Jun 22 00:57:18 2007 -0400
+++ b/listhandler/gen_xml_files.c Sun Jun 24 19:38:05 2007 -0400
@@ -314,7 +314,7 @@
tmpbuddy = (PurpleBuddy *)b;
if(purple_buddy_get_account(tmpbuddy) == source_account) {
tmpalias = purple_buddy_get_alias_only(tmpbuddy);
- if ( tmpalias != NULL ){
+ if (tmpalias != NULL) {
tmpname = purple_buddy_get_name(tmpbuddy);
buddy = xmlnode_new_child(parent, "buddy");
xmlnode_set_attrib(buddy, "screenname", tmpname);
@@ -450,13 +450,12 @@
static xmlnode *
lh_generic_alist_build_tree(void)
{
- xmlnode *root_node = xmlnode_new("exported_buddy_list");
+ xmlnode *root_node = xmlnode_new("exported_alias_list");
/* since building this tree is really building three smaller trees that
* share a common parent, we'll build each tree separately to make this
* easier to read and understand what goes in each tree (hopefully). */
lh_generic_build_config_tree(xmlnode_new_child(root_node, "config"));
- lh_generic_build_privacy_tree(xmlnode_new_child(root_node, "privacy"));
lh_generic_build_alist_tree(xmlnode_new_child(root_node, "alist"));
return root_node;
--- a/simfix/simfix.c Fri Jun 22 00:57:18 2007 -0400
+++ b/simfix/simfix.c Sun Jun 24 19:38:05 2007 -0400
@@ -71,6 +71,9 @@
{
PurpleMenuAction *bna = NULL;
+ if (purple_blist_node_get_flags(node) & PURPLE_BLIST_NODE_FLAG_NO_SAVE)
+ return;
+
if(!PURPLE_BLIST_NODE_IS_BUDDY(node))
return;
if (!purple_blist_node_get_bool(node, "sim-user"))