org.guifications.plugins: d82a8b2af145d3568592b0e0320710d1a8897057
nosnilmot at guifications.org
nosnilmot at guifications.org
Sat Oct 20 12:15:05 CDT 2007
-----------------------------------------------------------------
Revision: d82a8b2af145d3568592b0e0320710d1a8897057
Ancestor: 549fd8659eed7b02bb46a396c6773bb4175f59f4
Author: nosnilmot at guifications.org
Date: 2007-10-20T17:11:08
Branch: org.guifications.plugins
Added files:
dewysiwygification/.build dewysiwygification/.purple-plugin
dewysiwygification/Makefile.am
dewysiwygification/dewysiwygification.c
Added directories:
dewysiwygification
Modified files:
ChangeLog configure.ac
ChangeLog:
Add marv's DeWYSIWYGification plugin, ported to libpurple
-----------------------------------------------------------------
This revision's diffstat output:
ChangeLog | 1
configure.ac | 1
dewysiwygification/Makefile.am | 26 +++++++
dewysiwygification/dewysiwygification.c | 117 ++++++++++++++++++++++++++++++++
4 files changed, 145 insertions(+)
-------------- next part --------------
============================================================
--- dewysiwygification/.build da39a3ee5e6b4b0d3255bfef95601890afd80709
+++ dewysiwygification/.build da39a3ee5e6b4b0d3255bfef95601890afd80709
============================================================
--- dewysiwygification/.purple-plugin da39a3ee5e6b4b0d3255bfef95601890afd80709
+++ dewysiwygification/.purple-plugin da39a3ee5e6b4b0d3255bfef95601890afd80709
============================================================
--- dewysiwygification/Makefile.am 705325d04c4d4ea5e90e8db68a7b576aa1403c52
+++ dewysiwygification/Makefile.am 705325d04c4d4ea5e90e8db68a7b576aa1403c52
@@ -0,0 +1,26 @@
+EXTRA_DIST = .purple-plugin .build Makefile.mingw
+
+dewysiwygificationdir = $(PURPLE_LIBDIR)
+
+dewysiwygification_la_LDFLAGS = -module -avoid-version
+
+if HAVE_PURPLE
+
+dewysiwygification_LTLIBRARIES = dewysiwygification.la
+
+dewysiwygification_la_SOURCES = \
+ dewysiwygification.c
+
+dewysiwygification_la_LIBADD = \
+ $(GLIB_LIBS) \
+ $(PURPLE_LIBS)
+
+endif
+
+AM_CPPFLAGS = \
+ -DLIBDIR=\"$(PURPLE_LIBDIR)\" \
+ -DDATADIR=\"$(PURPLE_DATADIR)\" \
+ -DPIXMAPSDIR=\"$(PURPLE_PIXMAPSDIR)\" \
+ $(DEBUG_CFLAGS) \
+ $(PURPLE_CFLAGS)
+
============================================================
--- dewysiwygification/dewysiwygification.c 0df3b622a0db0235d147f382ffbcc50dd49f55f7
+++ dewysiwygification/dewysiwygification.c 0df3b622a0db0235d147f382ffbcc50dd49f55f7
@@ -0,0 +1,117 @@
+/*
+ * DeWYSIWYGification - Lets you type in HTML without it being escaped to entities.
+ * Copyright (C) 2004 Tim Ringenbach <omarvo at hotmail.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., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301, USA.
+ */
+
+#include "../common/pp_internal.h"
+
+#include <debug.h>
+#include <plugin.h>
+#include <signals.h>
+#include <util.h>
+#include <version.h>
+
+#include <stdio.h>
+#include <string.h>
+#ifndef _WIN32
+#include <strings.h>
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#define DEWYSIWYGIFICATION_PLUGIN_ID "dewysiwygification"
+
+
+static gboolean
+substitute_words_send_im(PurpleAccount *account, const char *receiver,
+ char **message)
+{
+ char *tmp;
+
+ if (message == NULL || *message == NULL)
+ return FALSE;
+
+ tmp = purple_unescape_html(*message);
+ g_free(*message);
+ *message = tmp;
+
+ purple_debug_misc("dewysiwygification", "it's now: %s", tmp);
+
+ return FALSE;
+}
+
+static gboolean
+substitute_words_send_chat(PurpleAccount *account, char **message, int id)
+{
+ char *tmp;
+
+ if (message == NULL || *message == NULL)
+ return FALSE;
+
+ tmp = purple_unescape_html(*message);
+ g_free(*message);
+ *message = tmp;
+
+ purple_debug_misc("dewysiwygification", "it's now: %s", tmp);
+
+ return FALSE;
+}
+
+static gboolean
+plugin_load(PurplePlugin *plugin)
+{
+ void *conv_handle = purple_conversations_get_handle();
+
+
+ purple_signal_connect(conv_handle, "sending-im-msg",
+ plugin, PURPLE_CALLBACK(substitute_words_send_im), NULL);
+ purple_signal_connect(conv_handle, "sending-chat-msg",
+ plugin, PURPLE_CALLBACK(substitute_words_send_chat), NULL);
+
+ return TRUE;
+}
+
+static PurplePluginInfo info =
+{
+ PURPLE_PLUGIN_MAGIC,
+ PURPLE_MAJOR_VERSION,
+ PURPLE_MINOR_VERSION,
+ PURPLE_PLUGIN_STANDARD,
+ NULL,
+ 0,
+ NULL,
+ PURPLE_PRIORITY_DEFAULT,
+ DEWYSIWYGIFICATION_PLUGIN_ID,
+ N_("DeWYSIWYGification Plugin"),
+ VERSION,
+ N_("Lets you type in HTML without it being escaped to entities."),
+ N_("Lets you type in HTML without it being escaped to entities. This will not work well for some protocols. Use \"<\" for a literal \"<\"."),
+ "Tim Ringenbach <omarvo at hotmail.com>",
+ PP_WEBSITE,
+ plugin_load,
+ NULL,
+ NULL,
+ NULL,
+ NULL
+};
+
+static void
+init_plugin(PurplePlugin *plugin)
+{
+}
+
+PURPLE_INIT_PLUGIN(dewysiwygification, init_plugin, info)
============================================================
--- ChangeLog 8efb7255e92999ba8d1da1e459b996eca62dc056
+++ ChangeLog a1dcab4b202a0504337b3054498674326a33e503
@@ -24,6 +24,7 @@ Version 2.2.0mtn:
* Fixed building with ancient glib. (Bodo Bellut)
* Removed the .build file from hideconv to remove it from default
builds. Pidgin will have persistent conversations soon.
+ * Added dewysiwygification plugin
Version 2.1.1: 8/19/07
* Fixed lack of .build, .pidgin-plugin, and Makefile.mingw for convbadger
============================================================
--- configure.ac f65b5acaef394218bd748412053a1609ed749951
+++ configure.ac 8487a8587c930442d8dbebe05a9876be1be1a915
@@ -309,6 +309,7 @@ AC_OUTPUT([
buddytime/Makefile
chronic/Makefile
convbadger/Makefile
+ dewysiwygification/Makefile
dice/Makefile
difftopic/Makefile
eight_ball/Makefile
More information about the Plugins-commits
mailing list