--- a/blistops/blistops.c Thu May 25 21:55:19 2017 -0500
+++ b/blistops/blistops.c Thu May 25 22:02:12 2017 -0500
@@ -175,7 +175,11 @@
PidginBuddyList *gtkblist = PIDGIN_BLIST(blist);
w_blist = gtkblist->window;
+#if PURPLE_VERSION_CHECK(3,0,0) + w_menubar = gtk_ui_manager_get_widget(gtkblist->ui, "/BList"); w_menubar = gtk_item_factory_get_widget(gtkblist->ift, "<PurpleMain>");
g_signal_connect(gtkblist->treemodel, "row_changed", G_CALLBACK(row_changed_cb), gtkblist);
--- a/configure.ac Thu May 25 21:55:19 2017 -0500
+++ b/configure.ac Thu May 25 22:02:12 2017 -0500
@@ -68,10 +68,20 @@
+ AC_HELP_STRING([--with-purple-ver], [set to 3 to compile against libpurple3]), +if test "x$with_purple_ver" = "x3" ; then + # this is used as the suffix below (for purple-3, pidgin-3, etc) + # and also as the -3 param to plugin_pack.py dnl #######################################################################
dnl #######################################################################
-PKG_CHECK_MODULES(PURPLE, purple,
+PKG_CHECK_MODULES(PURPLE, purple${PURPLE_VER}, AC_DEFINE(HAVE_PURPLE, 1, [Define if we've found libpurple.])
@@ -115,7 +125,7 @@
dnl #######################################################################
dnl #######################################################################
-PKG_CHECK_MODULES(PIDGIN, pidgin,
+PKG_CHECK_MODULES(PIDGIN, pidgin${PURPLE_VER}, AC_DEFINE(HAVE_PIDGIN, 1, [Define if we've found pidgin.])
@@ -155,7 +165,7 @@
dnl #######################################################################
dnl #######################################################################
-PKG_CHECK_MODULES(FINCH, finch,
+PKG_CHECK_MODULES(FINCH, finch${PURPLE_VER}, AC_DEFINE(HAVE_FINCH, 1, [Define if we've found finch.])
--- a/difftopic/difftopic.c Thu May 25 21:55:19 2017 -0500
+++ b/difftopic/difftopic.c Thu May 25 22:02:12 2017 -0500
@@ -151,19 +151,23 @@
topic_changed(PurpleConversation *conv, const char *who, const char *what)
PidginConversation *gtkconv;
#if PURPLE_VERSION_CHECK(3,0,0)
gtkconv = purple_conversation_get_ui_data(conv);
+ imhtml = gtkconv->webview; + imhtml = gtkconv->imhtml; - old = g_object_get_data(G_OBJECT(gtkconv->imhtml), "difftopic");
+ old = g_object_get_data(G_OBJECT(imhtml), "difftopic"); - have_fun(GTK_IMHTML(gtkconv->imhtml), old, what);
+ /* TODO: GTK_IMHTML() cast gone from pidgin3 */ + have_fun(GTK_IMHTML(imhtml), old, what); - g_object_set_data_full(G_OBJECT(gtkconv->imhtml), "difftopic", g_strdup(what), (GDestroyNotify)g_free);
+ g_object_set_data_full(G_OBJECT(imhtml), "difftopic", g_strdup(what), (GDestroyNotify)g_free); --- a/irc-more/irc-more.c Thu May 25 21:55:19 2017 -0500
+++ b/irc-more/irc-more.c Thu May 25 22:02:12 2017 -0500
@@ -113,11 +113,17 @@
*esc = g_markup_escape_text(cmd, -1);
+#if !PURPLE_VERSION_CHECK(3,0,0) /* this hack courtesy irchelper -- don't use purple_conversation_set_account
* because it will fire a signal that other plugins can use. Instead do
* this hack. This will break when struct hiding is complete and ABI breaks. */
+ PurpleConversation *conv = g_new0(PurpleConversation, 1); + conv->type = PURPLE_CONV_TYPE_IM; + conv->account = account; PurpleConversation *conv = purple_conversation_new(PURPLE_CONV_TYPE_IM,
purple_debug_info("irc-more", "Executng command: %s\n", cmd);
result = purple_cmd_do_command(conv, cmd, esc, &error);
--- a/irchelper/irchelper.c Thu May 25 21:55:19 2017 -0500
+++ b/irchelper/irchelper.c Thu May 25 22:02:12 2017 -0500
@@ -223,12 +223,18 @@
PurpleConversation *conv;
+#if PURPLE_VERSION_CHECK(3,0,0) conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, "None");
+ conv = g_new0(PurpleConversation, 1); + conv->type = PURPLE_CONV_TYPE_IM; /* If we use this then the conversation updated signal is fired and
* other plugins might start doing things to our conversation, such as
* setting data on it which we would then need to free etc. It's easier
* just to be more hacky by setting account directly. */
/* purple_conversation_set_account(conv, account); */
+ conv->account = account; @@ -1312,7 +1318,11 @@
prpl_info->protocol_options = g_list_append(prpl_info->protocol_options, option);
option = purple_account_option_string_new(_("Nick password"), PLUGIN_ID "_nickpassword", "");
+#if PURPLE_VERSION_CHECK(3,0,0) + purple_account_option_string_set_masked(option, TRUE); purple_account_option_set_masked(option, TRUE);
prpl_info->protocol_options = g_list_append(prpl_info->protocol_options, option);
option = purple_account_option_bool_new(_("Disconnect ghosts (Duplicate nicknames)"),
@@ -1320,7 +1330,11 @@
prpl_info->protocol_options = g_list_append(prpl_info->protocol_options, option);
option = purple_account_option_string_new(_("Operator password"), PLUGIN_ID "_operpassword", "");
+#if PURPLE_VERSION_CHECK(3,0,0) + purple_account_option_string_set_masked(option, TRUE); purple_account_option_set_masked(option, TRUE);
prpl_info->protocol_options = g_list_append(prpl_info->protocol_options, option);
--- a/irssi/lastlog.c Thu May 25 21:55:19 2017 -0500
+++ b/irssi/lastlog.c Thu May 25 22:02:12 2017 -0500
@@ -58,9 +58,11 @@
/* let's avoid some warnings on anal C compilers like mipspro cc */
result = g_string_new(NULL);
+#if PURPLE_VERSION_CHECK(3,0,0) + /* TODO: not implemented */ lines = gtk_imhtml_get_markup_lines(GTK_IMHTML(gtkconv->imhtml));
/* XXX: This will include all messages, including the output of the
* history plugin, system messages, timestamps etc. This might be
--- a/mystatusbox/plugins.cfg Thu May 25 21:55:19 2017 -0500
+++ b/mystatusbox/plugins.cfg Thu May 25 22:02:12 2017 -0500
@@ -1,9 +1,10 @@
summary=Hide/Show the per-account statusboxes
description=You can show all the per-account statusboxes, hide all of them, or just show the ones that are in a different status from the global status. For ease of use, you can bind keyboard shortcuts for the menu items.
authors=Sadrul Habib Chowdhury
--- a/napster/plugins.cfg Thu May 25 21:55:19 2017 -0500
+++ b/napster/plugins.cfg Thu May 25 22:02:12 2017 -0500
@@ -1,5 +1,5 @@
[Napster Protocol Plugin]
summary=NAPSTER Protocol Plugin
@@ -7,4 +7,5 @@
notes=Introduced into the Purple Plugin Pack after it was removed from libpurple.
--- a/okcupid/plugins.cfg Thu May 25 21:55:19 2017 -0500
+++ b/okcupid/plugins.cfg Thu May 25 22:02:12 2017 -0500
@@ -1,9 +1,10 @@
[OkCupid Protocol Plugin]
summary=Protocol plugin for the OkCupid social networking site framework
description=Protocol plugin for the OkCupid social networking site framework
--- a/plugin_pack.py Thu May 25 21:55:19 2017 -0500
+++ b/plugin_pack.py Thu May 25 22:02:12 2017 -0500
@@ -37,7 +37,6 @@
@@ -62,6 +61,7 @@
def __init__(self, directory, name, parser):
@@ -79,14 +79,17 @@
if parser.has_option(name, 'notes'):
self.notes = parser.get(name, 'notes')
+ if parser.has_option(name, 'purple3'): + self.purple3 = parser.get(name, 'purple3') != 'no' if self.type != 'default' and self.type != 'incomplete' and self.type != 'abusive':
printerr('\'%s\' has an unknown type of \'%s\'!' % (self.name, self.type))
output = 'name: {}\n'.format(self.name)
- output += 'authors: {}\n'.format(string.join(self.authors, ', '))
+ output += 'authors: {}\n'.format(', '.join(self.authors)) output += 'type: {}\n'.format(self.type)
- output += 'depends: {}\n'.format(string.join(self.depends, ' '))
+ output += 'depends: {}\n'.format(' '.join(self.depends)) output += 'provides: {}\n'.format(self.provides)
output += 'directory: {}\n'.format(self.directory)
output += 'summary: {}\n'.format(self.summary)
@@ -95,13 +98,20 @@
output += 'notes: {}\n'.format(self.notes)
+ output += 'purple3: no\n' + def __lt__(self, other): + return self.name < other.name - def load_plugins(self, types, depends):
+ def load_plugins(self, types, depends, purple_ver=2): @@ -131,6 +141,9 @@
if len(set(depends).intersection(set(p.depends))) == 0:
+ if purple_ver == 3 and not p.purple3: self.plugins[p.provides] = p
def list_type(self, type):
@@ -164,7 +177,7 @@
names.append(plugin.name)
- print(string.join(names, ','))
def default_plugins(self):
return self.list_type('default')
@@ -207,12 +220,12 @@
cmds = self.commands.keys()
- print(' {}'.format(string.join(cmds, ' ')))
+ print(' {}'.format(' '.join(cmds))) def dist_dirs(self, args):
"""Displays a list of all plugin directories to included in the distribution"""
- print(string.join(self.unique_dirs(), ' '))
+ print(' '.join(self.unique_dirs())) commands['dist_dirs'] = dist_dirs
def build_dirs(self, args):
@@ -309,7 +322,7 @@
- print("{}".format(string.join(output, ',')))
+ print("{}".format(','.join(output))) commands['build_dirs'] = build_dirs
def list_plugins(self, args):
@@ -356,10 +369,9 @@
fmt = '{}{} {:<' + str(widths[0]) + '} {:<' + str(widths[1]) + '} {}'
# now loop through the list again, with everything formatted
+ keys = sorted(list(data.keys()))
print(fmt.format(d[0], d[1], d[2], d[3], d[4]))
commands['list'] = list_plugins
@@ -388,12 +400,12 @@
# setup a second call to determine the plugins to be built
print('{}\n\n{}\n{}\n\n{}\n{}\n{}'.format(
- 'PP_BUILD=`$PYTHON $srcdir/plugin_pack.py build_dirs $DEPENDENCIES $with_plugins`',
+ 'PP_BUILD=`$PYTHON $srcdir/plugin_pack.py $PURPLE_VER build_dirs $DEPENDENCIES $with_plugins`', 'PP_BUILD_DIRS=`echo $PP_BUILD | sed \'s/,/\ /g\'`',
'AC_SUBST(PP_BUILD_DIRS)',
- 'PP_PURPLE_BUILD="$PYTHON $srcdir/plugin_pack.py -p show_names $PP_BUILD"',
- 'PP_PIDGIN_BUILD="$PYTHON $srcdir/plugin_pack.py -P show_names $PP_BUILD"',
- 'PP_FINCH_BUILD="$PYTHON $srcdir/plugin_pack.py -f show_names $PP_BUILD"'))
+ 'PP_PURPLE_BUILD="$PYTHON $srcdir/plugin_pack.py -p $PURPLE_VER show_names $PP_BUILD"', + 'PP_PIDGIN_BUILD="$PYTHON $srcdir/plugin_pack.py -P $PURPLE_VER show_names $PP_BUILD"', + 'PP_FINCH_BUILD="$PYTHON $srcdir/plugin_pack.py -f $PURPLE_VER show_names $PP_BUILD"')) commands['config_file'] = config_file
def dependency_graph(self, args):
@@ -534,11 +546,10 @@
def show_usage(pp, exitcode):
- cmds = pp.commands.keys()
+ cmds = sorted(list(pp.commands.keys())) - print(" {:<-20} {}".format(cmd, pp.commands[cmd].__doc__))
+ print(" {:20} {}".format(cmd, pp.commands[cmd].__doc__)) @@ -550,9 +561,10 @@
opts, args = getopt.getopt(sys.argv[1:], shortopts)
except getopt.error as msg:
@@ -572,10 +584,14 @@
# load the plugins that have been requested, if both lists are empty, all
- pp.load_plugins(types, depends)
+ pp.load_plugins(types, depends, purple_ver) --- a/schedule/pidgin-schedule.c Thu May 25 21:55:19 2017 -0500
+++ b/schedule/pidgin-schedule.c Thu May 25 22:02:12 2017 -0500
@@ -271,7 +271,14 @@
win->accounts = optmenu = pidgin_account_option_menu_new(NULL, TRUE, NULL, NULL, NULL);
win->buddy = entry = gtk_entry_new();
+#if PURPLE_VERSION_CHECK(3,0,0) + /* TODO: this doesn't seem to be equivalent to the purple2 version + * The last parameter, all=FALSE, means "Whether to include usernames + * from disconnected accounts". If it doesn't matter remove me. */ pidgin_setup_screenname_autocomplete(entry, optmenu, NULL, NULL);
+ pidgin_setup_screenname_autocomplete(entry, optmenu, FALSE); fr = pidgin_create_imhtml(TRUE, &imhtml, NULL, NULL);
/* XXX: set the formatting to default send-message format */
--- a/xchat-chats/plugins.cfg Thu May 25 21:55:19 2017 -0500
+++ b/xchat-chats/plugins.cfg Thu May 25 22:02:12 2017 -0500
@@ -1,9 +1,10 @@
summary=XChat-like chats with Pidgin
description=You can chat in Pidgin using XChat's indented view.
authors=Sadrul Habib Chowdhury