qulogic/pidgin

Merged pidgin/main into default

2017-11-03, Jakub Adam
9183e00db579
Merged pidgin/main into default
  • +2 -0
    COPYRIGHT
  • +19 -1
    ChangeLog
  • +5 -0
    ChangeLog.API
  • +4 -4
    bitbucket-pipelines.yml
  • +9 -4
    finch/gntnotify.c
  • +25 -9
    finch/libgnt/gntmain.c
  • +15 -15
    finch/libgnt/gntwm.c
  • +2 -2
    libpurple/account.c
  • +1 -1
    libpurple/account.h
  • +2 -2
    libpurple/blistnode.h
  • +1 -0
    libpurple/buddyicon.c
  • +1 -1
    libpurple/cmds.h
  • +2 -2
    libpurple/connection.h
  • +1 -1
    libpurple/eventloop.h
  • +3 -3
    libpurple/image.h
  • +1 -13
    libpurple/media.c
  • +1 -1
    libpurple/media/backend-iface.h
  • +1 -1
    libpurple/plugins.h
  • +1 -1
    libpurple/pounce.h
  • +11 -9
    libpurple/prefs.h
  • +136 -124
    libpurple/protocol.h
  • +2 -2
    libpurple/protocols.h
  • +1 -1
    libpurple/protocols/gg/blist.c
  • +12 -9
    libpurple/protocols/jabber/jingle/rtp.c
  • +8 -8
    libpurple/request.h
  • +4 -4
    libpurple/sslconn.h
  • +1 -1
    libpurple/stun.h
  • +2 -2
    libpurple/tests.h
  • +27 -0
    libpurple/tests/test_util.c
  • +2 -2
    libpurple/theme-loader.h
  • +1 -1
    libpurple/theme-manager.h
  • +12 -1
    libpurple/util.c
  • +11 -0
    libpurple/util.h
  • +1 -0
    libpurple/win32/libc_interface.c
  • +2 -0
    pidgin/Makefile.am
  • +9 -6
    pidgin/gtkblist.c
  • +6 -4
    pidgin/gtkblist.h
  • +2 -2
    pidgin/gtkconv-theme.h
  • +58 -0
    pidgin/gtkconv.c
  • +7 -7
    pidgin/gtkconv.h
  • +15 -2
    pidgin/gtkconvwin.h
  • +8 -8
    pidgin/gtkdialogs.h
  • +1 -1
    pidgin/gtkdocklet.h
  • +1 -1
    pidgin/gtkmenutray.h
  • +1 -7
    pidgin/gtknotify.c
  • +0 -2
    pidgin/gtknotify.h
  • +1 -1
    pidgin/gtkplugin.h
  • +1 -1
    pidgin/gtkpluginpref.h
  • +16 -10
    pidgin/gtkprefs.h
  • +1 -1
    pidgin/gtkrequest.h
  • +2 -2
    pidgin/gtksavedstatuses.h
  • +1 -1
    pidgin/gtksmiley-theme.h
  • +1 -1
    pidgin/gtkstatusbox.h
  • +70 -0
    pidgin/gtkstyle.c
  • +59 -0
    pidgin/gtkstyle.h
  • +79 -50
    pidgin/gtkutils.h
  • +9 -9
    pidgin/gtkwebview.h
  • +2 -2
    pidgin/gtkwebviewtoolbar.h
  • +3 -1
    pidgin/meson.build
  • +7 -2
    pidgin/minidialog.h
  • +10 -10
    pidgin/pidgintooltip.h
  • --- a/COPYRIGHT Mon Oct 02 13:27:23 2017 +0200
    +++ b/COPYRIGHT Fri Nov 03 18:27:03 2017 +0100
    @@ -292,6 +292,7 @@
    F.W. Kong
    Konstantin Korikov
    Cole Kowalski
    +Daniel Kamil Kozar
    Nikita Kozlov
    Matt Kramer
    Gary Kramlich
    @@ -628,6 +629,7 @@
    Kevin Wu Won
    Pui Lam Wong
    Justin Wood
    +David Woodhouse
    Ximian
    Ma Xuan
    Yonas Yanfa
    --- a/ChangeLog Mon Oct 02 13:27:23 2017 +0200
    +++ b/ChangeLog Fri Nov 03 18:27:03 2017 +0100
    @@ -104,12 +104,22 @@
    * A single jabber plugin provides XMPP, GTalk and Facebook protocols.
    * A single yahoo plugin provides both Yahoo and Yahoo JAPAN protocols.
    -version 2.12.1 (??/??/????):
    +version 2.13.0 (??/??/????):
    libpurple:
    * Unified string comparison. (PR #186) (Arkadiy Illarionov)
    + * Properlly shell escape URI's when opening them. (PR #271 Daniel Kamil Kozar)
    +
    + libgnt:
    + * Fixed build against curses 6.0 with opaque structs set. (#16764 dimstar)
    + (PR #268 Daniel Kamil Kozar)
    + * Fixed a crash when resizing the window. (#16680 marcus) (PR #269 Daniel Kamil Kozar)
    +
    + General:
    + * Fixed bashism in autotools. (#16836 lameventanas) (PR #267 Daniel Kamil Kozar)
    XMPP:
    * Show XEP-0066 OOB URLs in any message, not just headlines
    + * Fix a user after free (#17200 debarshiray) (PR #266 Ethan Blanton)
    IRC:
    * Fix "Registration timeout" on SASL auth with InspIRCd servers
    @@ -117,6 +127,14 @@
    * Fix issues with plugins that modify outgoing messages
    (such as the custom PART/QUIT feature of the IRC More plugin)
    + Pidgin:
    + * Better support for dark themes. (#12572 Alyssa Rosenzweig and Gary Kramlich)
    + * Fixed IPv6 links by not escaping []'s. (#16391 cyisfor) (PR #270 Daniel Kamil Kozar)
    + * Only write buddy icons to the cache if they're not already cached. (PR #276 David Woodhouse)
    +
    + Finch:
    + * Fix handling of search results (#17238 David Woodhouse)
    +
    version 2.12.0 (03/09/2017):
    libpurple:
    * Fix an out of bounds memory write in purple_markup_unescape_entity.
    --- a/ChangeLog.API Mon Oct 02 13:27:23 2017 +0200
    +++ b/ChangeLog.API Fri Nov 03 18:27:03 2017 +0100
    @@ -611,6 +611,11 @@
    * _GntTreeColumnFlag
    * _GntWidgetFlags
    +version 2.13.0:
    + libpurple:
    + Added:
    + * purple_uri_escape_for_open
    +
    version 2.12.0:
    libpurple:
    Added:
    --- a/bitbucket-pipelines.yml Mon Oct 02 13:27:23 2017 +0200
    +++ b/bitbucket-pipelines.yml Fri Nov 03 18:27:03 2017 +0100
    @@ -1,13 +1,13 @@
    # vi:et:ts=2 sw=2 sts=2
    -image: pidgin/builder-debian:stretch
    +image: pidgin/builder-debian:buster
    pipelines:
    default:
    - step:
    script:
    - set -ex
    - - ./autogen.sh --enable-debug --enable-gtk-doc
    - - make -s -j$(nproc)
    - - make -s -j$(nproc) distcheck
    + - meson -Dsilc=false -Ddoc=true -Ddebug=true build
    + - ninja -C build
    + - ninja -C build test
    branches:
    release-2.x.y:
    - step:
    --- a/finch/gntnotify.c Mon Oct 02 13:27:23 2017 +0200
    +++ b/finch/gntnotify.c Fri Nov 03 18:27:03 2017 +0100
    @@ -385,11 +385,12 @@
    finch_notify_sr_new_rows(PurpleConnection *gc,
    PurpleNotifySearchResults *results, void *data)
    {
    - GntTree *tree = GNT_TREE(data);
    + GntWindow *window = GNT_WINDOW(data);
    + GntTree *tree = GNT_TREE(g_object_get_data(G_OBJECT(window), "tree-widget"));
    GList *o;
    GntTreeRow *prev = NULL;
    - /* XXX: Do I need to empty the tree here? */
    + gnt_tree_remove_all(GNT_TREE(tree));
    for (o = results->rows; o; o = o->next)
    {
    @@ -493,12 +494,16 @@
    g_signal_connect(G_OBJECT(tree), "destroy",
    G_CALLBACK(notify_sr_destroy_cb), NULL);
    - finch_notify_sr_new_rows(gc, results, tree);
    + g_object_set_data(G_OBJECT(window), "tree-widget", tree);
    + finch_notify_sr_new_rows(gc, results, window);
    +
    + g_signal_connect(G_OBJECT(window), "destroy",
    + G_CALLBACK(notify_msg_window_destroy_cb), GINT_TO_POINTER(PURPLE_NOTIFY_SEARCHRESULTS));
    gnt_widget_show(window);
    g_object_set_data(G_OBJECT(window), "notify-results", results);
    - return tree;
    + return window;
    }
    static void *
    --- a/finch/libgnt/gntmain.c Mon Oct 02 13:27:23 2017 +0200
    +++ b/finch/libgnt/gntmain.c Fri Nov 03 18:27:03 2017 +0100
    @@ -551,10 +551,11 @@
    #ifdef SIGWINCH
    static void (*org_winch_handler)(int);
    +static void (*org_winch_handler_sa)(int, siginfo_t *, void *);
    #endif
    static void
    -sighandler(int sig)
    +sighandler(int sig, siginfo_t *info, void *data)
    {
    switch (sig) {
    #ifdef SIGWINCH
    @@ -563,18 +564,17 @@
    g_idle_add((GSourceFunc)refresh_screen, NULL);
    if (org_winch_handler)
    org_winch_handler(sig);
    - signal(SIGWINCH, sighandler);
    + if (org_winch_handler_sa)
    + org_winch_handler_sa(sig, info, data);
    break;
    #endif
    #ifndef _WIN32
    case SIGCHLD:
    clean_pid();
    - signal(SIGCHLD, sighandler);
    break;
    #endif
    case SIGINT:
    ask_before_exit();
    - signal(SIGINT, sighandler);
    break;
    }
    }
    @@ -602,6 +602,10 @@
    {
    char *filename;
    const char *locale;
    + struct sigaction act;
    +#ifdef SIGWINCH
    + struct sigaction oact;
    +#endif
    if (channel)
    return;
    @@ -654,14 +658,26 @@
    werase(stdscr);
    wrefresh(stdscr);
    + act.sa_sigaction = sighandler;
    + sigemptyset(&act.sa_mask);
    + act.sa_flags = SA_SIGINFO;
    +
    #ifdef SIGWINCH
    - org_winch_handler = signal(SIGWINCH, sighandler);
    + org_winch_handler = NULL;
    + org_winch_handler_sa = NULL;
    + sigaction(SIGWINCH, &act, &oact);
    + if (oact.sa_flags & SA_SIGINFO)
    + {
    + org_winch_handler_sa = oact.sa_sigaction;
    + }
    + else if (oact.sa_handler != SIG_DFL && oact.sa_handler != SIG_IGN)
    + {
    + org_winch_handler = oact.sa_handler;
    + }
    #endif
    -#ifndef _WIN32
    - signal(SIGCHLD, sighandler);
    + sigaction(SIGCHLD, &act, NULL);
    + sigaction(SIGINT, &act, NULL);
    signal(SIGPIPE, SIG_IGN);
    -#endif
    - signal(SIGINT, sighandler);
    #if !GLIB_CHECK_VERSION(2, 36, 0)
    /* GLib type system is automaticaly initialized since 2.36. */
    --- a/finch/libgnt/gntwm.c Mon Oct 02 13:27:23 2017 +0200
    +++ b/finch/libgnt/gntwm.c Fri Nov 03 18:27:03 2017 +0100
    @@ -166,37 +166,37 @@
    cchar_t ch;
    PANEL *below = panel;
    - sx = panel->win->_begx;
    - ex = panel->win->_maxx + sx;
    - sy = panel->win->_begy;
    - ey = panel->win->_maxy + sy;
    + sx = getbegx(panel->win);
    + ex = getmaxx(panel->win) + sx;
    + sy = getbegy(panel->win);
    + ey = getmaxy(panel->win) + sy;
    while ((below = panel_below(below)) != NULL) {
    - if (sy > below->win->_begy + below->win->_maxy ||
    - ey < below->win->_begy)
    + if (sy > getbegy(below->win) + getmaxy(below->win) ||
    + ey < getbegy(below->win))
    continue;
    - if (sx > below->win->_begx + below->win->_maxx ||
    - ex < below->win->_begx)
    + if (sx > getbegx(below->win) + getmaxx(below->win) ||
    + ex < getbegx(below->win))
    continue;
    - for (y = MAX(sy, below->win->_begy); y <= MIN(ey, below->win->_begy + below->win->_maxy); y++) {
    - if (mvwin_wch(below->win, y - below->win->_begy, sx - 1 - below->win->_begx, &ch) != OK)
    + for (y = MAX(sy, getbegy(below->win)); y <= MIN(ey, getbegy(below->win) + getmaxy(below->win)); y++) {
    + if (mvwin_wch(below->win, y - getbegy(below->win), sx - 1 - getbegx(below->win), &ch) != OK)
    goto right;
    w = widestringwidth(ch.chars);
    if (w > 1 && (ch.attr & 1)) {
    ch.chars[0] = ' ';
    ch.attr &= ~ A_CHARTEXT;
    - mvwadd_wch(below->win, y - below->win->_begy, sx - 1 - below->win->_begx, &ch);
    - touchline(below->win, y - below->win->_begy, 1);
    + mvwadd_wch(below->win, y - getbegy(below->win), sx - 1 - getbegx(below->win), &ch);
    + touchline(below->win, y - getbegy(below->win), 1);
    }
    right:
    - if (mvwin_wch(below->win, y - below->win->_begy, ex + 1 - below->win->_begx, &ch) != OK)
    + if (mvwin_wch(below->win, y - getbegy(below->win), ex + 1 - getbegx(below->win), &ch) != OK)
    continue;
    w = widestringwidth(ch.chars);
    if (w > 1 && !(ch.attr & 1)) {
    ch.chars[0] = ' ';
    ch.attr &= ~ A_CHARTEXT;
    - mvwadd_wch(below->win, y - below->win->_begy, ex + 1 - below->win->_begx, &ch);
    - touchline(below->win, y - below->win->_begy, 1);
    + mvwadd_wch(below->win, y - getbegy(below->win), ex + 1 - getbegx(below->win), &ch);
    + touchline(below->win, y - getbegy(below->win), 1);
    }
    }
    }
    --- a/libpurple/account.c Mon Oct 02 13:27:23 2017 +0200
    +++ b/libpurple/account.c Fri Nov 03 18:27:03 2017 +0100
    @@ -2566,7 +2566,7 @@
    }
    static PurpleXmlNode *
    -proxy_settings_to_xmlnode(PurpleProxyInfo *proxy_info)
    +proxy_settings_to_xmlnode(const PurpleProxyInfo *proxy_info)
    {
    PurpleXmlNode *node, *child;
    PurpleProxyType proxy_type;
    @@ -2705,7 +2705,7 @@
    PurpleXmlNode *node, *child;
    const char *tmp;
    PurplePresence *presence;
    - PurpleProxyInfo *proxy_info;
    + const PurpleProxyInfo *proxy_info;
    PurpleAccountPrivate *priv = PURPLE_ACCOUNT_GET_PRIVATE(account);
    node = purple_xmlnode_new("account");
    --- a/libpurple/account.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/libpurple/account.h Fri Nov 03 18:27:03 2017 +0100
    @@ -42,7 +42,7 @@
    typedef struct _PurpleAccountClass PurpleAccountClass;
    typedef gboolean (*PurpleFilterAccountFunc)(PurpleAccount *account);
    -typedef void (*PurpleAccountRequestAuthorizationCb)(const char *, void *);
    +typedef void (*PurpleAccountRequestAuthorizationCb)(const char *response, void *data);
    typedef void (*PurpleAccountRegistrationCb)(PurpleAccount *account, gboolean succeeded, void *user_data);
    typedef void (*PurpleAccountUnregistrationCb)(PurpleAccount *account, gboolean succeeded, void *user_data);
    typedef void (*PurpleSetPublicAliasSuccessCallback)(PurpleAccount *account, const char *new_alias);
    --- a/libpurple/blistnode.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/libpurple/blistnode.h Fri Nov 03 18:27:03 2017 +0100
    @@ -96,7 +96,7 @@
    * See purple_blist_node_get_parent(), purple_blist_node_get_first_child(),
    * purple_blist_node_get_sibling_next(), purple_blist_node_get_sibling_prev().
    *
    - * Returns: The next node
    + * Returns: (transfer none): The next node
    */
    PurpleBlistNode *purple_blist_node_next(PurpleBlistNode *node, gboolean offline);
    @@ -109,7 +109,7 @@
    * See purple_blist_node_get_first_child(), purple_blist_node_get_sibling_next(),
    * purple_blist_node_get_sibling_prev(), purple_blist_node_next().
    *
    - * Returns: The parent node.
    + * Returns: (transfer none): The parent node.
    */
    PurpleBlistNode *purple_blist_node_get_parent(PurpleBlistNode *node);
    --- a/libpurple/buddyicon.c Mon Oct 02 13:27:23 2017 +0200
    +++ b/libpurple/buddyicon.c Fri Nov 03 18:27:03 2017 +0100
    @@ -176,6 +176,7 @@
    if (!purple_image_save(img, path))
    purple_debug_error("buddyicon", "failed to save icon %s", path);
    +
    g_free(path);
    }
    --- a/libpurple/cmds.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/libpurple/cmds.h Fri Nov 03 18:27:03 2017 +0100
    @@ -75,7 +75,7 @@
    * A function implementing a command, as passed to purple_cmd_register().
    */
    /* TODO document the arguments to these functions. */
    -typedef PurpleCmdRet (*PurpleCmdFunc)(PurpleConversation *, const gchar *cmd,
    +typedef PurpleCmdRet (*PurpleCmdFunc)(PurpleConversation *conversation, const gchar *cmd,
    gchar **args, gchar **error, void *data);
    /**
    * PurpleCmdId:
    --- a/libpurple/connection.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/libpurple/connection.h Fri Nov 03 18:27:03 2017 +0100
    @@ -405,7 +405,7 @@
    *
    * Returns the connection's account.
    *
    - * Returns: The connection's account.
    + * Returns: (transfer none): The connection's account.
    */
    PurpleAccount *purple_connection_get_account(const PurpleConnection *gc);
    @@ -415,7 +415,7 @@
    *
    * Returns the protocol managing a connection.
    *
    - * Returns: The protocol.
    + * Returns: (transfer none): The protocol.
    */
    PurpleProtocol *purple_connection_get_protocol(const PurpleConnection *gc);
    --- a/libpurple/eventloop.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/libpurple/eventloop.h Fri Nov 03 18:27:03 2017 +0100
    @@ -53,7 +53,7 @@
    * purple_input_add(), the file descriptor on which the event occurred, and the
    * condition that was satisfied to cause the callback to be invoked.
    */
    -typedef void (*PurpleInputFunction)(gpointer, gint, PurpleInputCondition);
    +typedef void (*PurpleInputFunction)(gpointer data, gint fd, PurpleInputCondition cond);
    G_BEGIN_DECLS
    --- a/libpurple/image.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/libpurple/image.h Fri Nov 03 18:27:03 2017 +0100
    @@ -80,7 +80,7 @@
    /**
    * purple_image_new_from_bytes:
    - * @bytes: (transfer none) A #GBytes containing the raw image data.
    + * @bytes: (transfer none): A #GBytes containing the raw image data.
    *
    * Loads a raw image data as a new #PurpleImage object.
    *
    @@ -91,7 +91,7 @@
    /**
    * purple_image_new_from_file:
    * @path: the path to the image file.
    - * @error: (optional) An optional return address for a #GError
    + * @error: (optional) (out): An optional return address for a #GError
    *
    * Loads an image file as a new #PurpleImage object. The @path must exists, be
    * readable and should point to a valid image file. If you don't set @be_eager
    @@ -118,7 +118,7 @@
    /**
    * purple_image_new_take_data:
    - * @data: (transfer full) the pointer to the image data buffer.
    + * @data: (transfer full): the pointer to the image data buffer.
    * @length: the length of @data.
    *
    * Creates a new #PurpleImage object with contents of @data buffer.
    --- a/libpurple/media.c Mon Oct 02 13:27:23 2017 +0200
    +++ b/libpurple/media.c Fri Nov 03 18:27:03 2017 +0100
    @@ -1458,20 +1458,12 @@
    gchar dtmf, guint8 volume, guint16 duration)
    {
    #ifdef USE_VV
    - PurpleAccount *account = NULL;
    - PurpleConnection *gc = NULL;
    - PurpleProtocol *protocol = NULL;
    PurpleMediaBackendIface *backend_iface = NULL;
    if (media)
    {
    - account = purple_media_get_account(media);
    backend_iface = PURPLE_MEDIA_BACKEND_GET_INTERFACE(media->priv->backend);
    }
    - if (account)
    - gc = purple_account_get_connection(account);
    - if (gc)
    - protocol = purple_connection_get_protocol(gc);
    if (dtmf == 'a')
    dtmf = 'A';
    @@ -1484,11 +1476,7 @@
    g_return_val_if_fail(strchr("0123456789ABCD#*", dtmf), FALSE);
    - if (PURPLE_PROTOCOL_IMPLEMENTS(protocol, MEDIA_IFACE, send_dtmf)
    - && purple_protocol_media_iface_send_dtmf(protocol, media, dtmf, volume, duration))
    - {
    - return TRUE;
    - } else if (backend_iface && backend_iface->send_dtmf
    + if (backend_iface && backend_iface->send_dtmf
    && backend_iface->send_dtmf(media->priv->backend,
    session_id, dtmf, volume, duration))
    {
    --- a/libpurple/media/backend-iface.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/libpurple/media/backend-iface.h Fri Nov 03 18:27:03 2017 +0100
    @@ -188,7 +188,7 @@
    * @self: The media backend the stream is in.
    * @sess_id: The session id the stream is associated with.
    * @participant: The participant the stream is associated with.
    - * @codecs: (element-type PurpleMediaCodec) The list of remote codecs to set.
    + * @codecs: (element-type PurpleMediaCodec): The list of remote codecs to set.
    *
    * Sets the remote codecs on a stream.
    *
    --- a/libpurple/plugins.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/libpurple/plugins.h Fri Nov 03 18:27:03 2017 +0100
    @@ -500,7 +500,7 @@
    *
    * Returns a plugin's #PurplePluginInfo instance.
    *
    - * Returns: (transfer none) The plugin's #PurplePluginInfo instance.
    + * Returns: (transfer none): The plugin's #PurplePluginInfo instance.
    * GPlugin refs the plugin info object before returning it. This workaround
    * is to avoid managing the reference counts everywhere in our codebase
    * where we use the plugin info. The plugin info instance is guaranteed to
    --- a/libpurple/pounce.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/libpurple/pounce.h Fri Nov 03 18:27:03 2017 +0100
    @@ -81,7 +81,7 @@
    *
    * A pounce callback.
    */
    -typedef void (*PurplePounceCb)(PurplePounce *, PurplePounceEvent, void *);
    +typedef void (*PurplePounceCb)(PurplePounce *pounce, PurplePounceEvent event, void *data);
    G_BEGIN_DECLS
    --- a/libpurple/prefs.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/libpurple/prefs.h Fri Nov 03 18:27:03 2017 +0100
    @@ -130,24 +130,26 @@
    void (*schedule_save)(void);
    /**
    + * connect_callback:
    + * @name: The preference name.
    + * @data: The object to be passed when triggering the callback
    + *
    * Called when a callback is added to a preference. The UI must keep
    * track of it and call #purple_prefs_trigger_callback_object with the
    * data attribute.
    *
    - * @param name The preference name.
    - * @param data The object to be passed when triggering the callback
    - * @return A pointer to a ui_data object.
    - * */
    + * Returns: A pointer to a ui_data object.
    + */
    void *(*connect_callback)(const char *name, PurplePrefCallbackData *data);
    /**
    + * disconnect_callback:
    + * @name The preference name
    + * @ui_data The object that was returned from the connect_callback UI OP.
    + *
    * Called when a callback is removed from a preference. The ui_data
    * object is the one returned from connect_callback.
    - *
    - * @param name The preference name
    - * @param ui_data The object that was returned from the
    - * connect_callback UI OP.
    - * */
    + */
    void (*disconnect_callback)(const char *name, void *ui_data);
    void (*_purple_reserved1)(void);
    --- a/libpurple/protocol.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/libpurple/protocol.h Fri Nov 03 18:27:03 2017 +0100
    @@ -128,9 +128,9 @@
    {
    GObjectClass parent_class;
    - void (*login)(PurpleAccount *);
    + void (*login)(PurpleAccount *account);
    - void (*close)(PurpleConnection *);
    + void (*close)(PurpleConnection *connection);
    GList *(*status_types)(PurpleAccount *account);
    @@ -215,7 +215,7 @@
    GTypeInterface parent_iface;
    /*< public >*/
    - GList *(*get_actions)(PurpleConnection *);
    + GList *(*get_actions)(PurpleConnection *connection);
    const char *(*list_emblem)(PurpleBuddy *buddy);
    @@ -226,9 +226,9 @@
    GList *(*blist_node_menu)(PurpleBlistNode *node);
    - void (*buddy_free)(PurpleBuddy *);
    + void (*buddy_free)(PurpleBuddy *buddy);
    - void (*convo_closed)(PurpleConnection *, const char *who);
    + void (*convo_closed)(PurpleConnection *connection, const char *who);
    const char *(*normalize)(const PurpleAccount *account, const char *who);
    @@ -323,20 +323,20 @@
    GTypeInterface parent_iface;
    /*< public >*/
    - void (*register_user)(PurpleAccount *);
    + void (*register_user)(PurpleAccount *account);
    - void (*unregister_user)(PurpleAccount *, PurpleAccountUnregistrationCb cb,
    + void (*unregister_user)(PurpleAccount *account, PurpleAccountUnregistrationCb cb,
    void *user_data);
    - void (*set_info)(PurpleConnection *, const char *info);
    + void (*set_info)(PurpleConnection *connection, const char *info);
    - void (*get_info)(PurpleConnection *, const char *who);
    + void (*get_info)(PurpleConnection *connection, const char *who);
    void (*set_status)(PurpleAccount *account, PurpleStatus *status);
    - void (*set_idle)(PurpleConnection *, int idletime);
    + void (*set_idle)(PurpleConnection *connection, int idletime);
    - void (*change_passwd)(PurpleConnection *, const char *old_pass,
    + void (*change_passwd)(PurpleConnection *connection, const char *old_pass,
    const char *new_pass);
    void (*add_buddy)(PurpleConnection *pc, PurpleBuddy *buddy,
    @@ -345,23 +345,23 @@
    void (*add_buddies)(PurpleConnection *pc, GList *buddies, GList *groups,
    const char *message);
    - void (*remove_buddy)(PurpleConnection *, PurpleBuddy *buddy,
    + void (*remove_buddy)(PurpleConnection *connection, PurpleBuddy *buddy,
    PurpleGroup *group);
    - void (*remove_buddies)(PurpleConnection *, GList *buddies, GList *groups);
    + void (*remove_buddies)(PurpleConnection *connection, GList *buddies, GList *groups);
    - void (*keepalive)(PurpleConnection *);
    + void (*keepalive)(PurpleConnection *connection);
    - void (*alias_buddy)(PurpleConnection *, const char *who,
    + void (*alias_buddy)(PurpleConnection *connection, const char *who,
    const char *alias);
    - void (*group_buddy)(PurpleConnection *, const char *who,
    + void (*group_buddy)(PurpleConnection *connection, const char *who,
    const char *old_group, const char *new_group);
    - void (*rename_group)(PurpleConnection *, const char *old_name,
    + void (*rename_group)(PurpleConnection *connection, const char *old_name,
    PurpleGroup *group, GList *moved_buddies);
    - void (*set_buddy_icon)(PurpleConnection *, PurpleImage *img);
    + void (*set_buddy_icon)(PurpleConnection *connection, PurpleImage *img);
    void (*remove_group)(PurpleConnection *gc, PurpleGroup *group);
    @@ -410,9 +410,9 @@
    GTypeInterface parent_iface;
    /*< public >*/
    - int (*send)(PurpleConnection *, PurpleMessage *msg);
    + int (*send)(PurpleConnection *connection, PurpleMessage *msg);
    - unsigned int (*send_typing)(PurpleConnection *, const char *name,
    + unsigned int (*send_typing)(PurpleConnection *connection, const char *name,
    PurpleIMTypingState state);
    };
    @@ -493,22 +493,22 @@
    GTypeInterface parent_iface;
    /*< public >*/
    - GList *(*info)(PurpleConnection *);
    + GList *(*info)(PurpleConnection *connection);
    - GHashTable *(*info_defaults)(PurpleConnection *, const char *chat_name);
    + GHashTable *(*info_defaults)(PurpleConnection *connection, const char *chat_name);
    - void (*join)(PurpleConnection *, GHashTable *components);
    + void (*join)(PurpleConnection *connection, GHashTable *components);
    - void (*reject)(PurpleConnection *, GHashTable *components);
    + void (*reject)(PurpleConnection *connection, GHashTable *components);
    char *(*get_name)(GHashTable *components);
    - void (*invite)(PurpleConnection *, int id,
    + void (*invite)(PurpleConnection *connection, int id,
    const char *message, const char *who);
    - void (*leave)(PurpleConnection *, int id);
    + void (*leave)(PurpleConnection *connection, int id);
    - int (*send)(PurpleConnection *, int id, PurpleMessage *msg);
    + int (*send)(PurpleConnection *connection, int id, PurpleMessage *msg);
    char *(*get_user_real_name)(PurpleConnection *gc, int id, const char *who);
    @@ -573,12 +573,12 @@
    GTypeInterface parent_iface;
    /*< public >*/
    - gboolean (*can_receive)(PurpleConnection *, const char *who);
    + gboolean (*can_receive)(PurpleConnection *connection, const char *who);
    - void (*send)(PurpleConnection *, const char *who,
    + void (*send)(PurpleConnection *connection, const char *who,
    const char *filename);
    - PurpleXfer *(*new_xfer)(PurpleConnection *, const char *who);
    + PurpleXfer *(*new_xfer)(PurpleConnection *connection, const char *who);
    };
    #define PURPLE_PROTOCOL_HAS_XFER_IFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_PROTOCOL_XFER_IFACE))
    @@ -848,14 +848,14 @@
    /* Protocol Class API */
    /**************************************************************************/
    -void purple_protocol_class_login(PurpleProtocol *, PurpleAccount *);
    +void purple_protocol_class_login(PurpleProtocol *protocol, PurpleAccount *account);
    -void purple_protocol_class_close(PurpleProtocol *, PurpleConnection *);
    +void purple_protocol_class_close(PurpleProtocol *protocol, PurpleConnection *connection);
    -GList *purple_protocol_class_status_types(PurpleProtocol *,
    +GList *purple_protocol_class_status_types(PurpleProtocol *protocol,
    PurpleAccount *account);
    -const char *purple_protocol_class_list_icon(PurpleProtocol *,
    +const char *purple_protocol_class_list_icon(PurpleProtocol *protocol,
    PurpleAccount *account, PurpleBuddy *buddy);
    /**************************************************************************/
    @@ -869,42 +869,42 @@
    */
    GType purple_protocol_client_iface_get_type(void);
    -GList *purple_protocol_client_iface_get_actions(PurpleProtocol *,
    - PurpleConnection *);
    +GList *purple_protocol_client_iface_get_actions(PurpleProtocol *protocol,
    + PurpleConnection *connection);
    -const char *purple_protocol_client_iface_list_emblem(PurpleProtocol *,
    +const char *purple_protocol_client_iface_list_emblem(PurpleProtocol *protocol,
    PurpleBuddy *buddy);
    -char *purple_protocol_client_iface_status_text(PurpleProtocol *,
    +char *purple_protocol_client_iface_status_text(PurpleProtocol *protocol,
    PurpleBuddy *buddy);
    -void purple_protocol_client_iface_tooltip_text(PurpleProtocol *,
    +void purple_protocol_client_iface_tooltip_text(PurpleProtocol *protocol,
    PurpleBuddy *buddy, PurpleNotifyUserInfo *user_info, gboolean full);
    -GList *purple_protocol_client_iface_blist_node_menu(PurpleProtocol *,
    +GList *purple_protocol_client_iface_blist_node_menu(PurpleProtocol *protocol,
    PurpleBlistNode *node);
    -void purple_protocol_client_iface_buddy_free(PurpleProtocol *, PurpleBuddy *);
    +void purple_protocol_client_iface_buddy_free(PurpleProtocol *protocol, PurpleBuddy *buddy);
    -void purple_protocol_client_iface_convo_closed(PurpleProtocol *,
    - PurpleConnection *, const char *who);
    +void purple_protocol_client_iface_convo_closed(PurpleProtocol *protocol,
    + PurpleConnection *connection, const char *who);
    -const char *purple_protocol_client_iface_normalize(PurpleProtocol *,
    +const char *purple_protocol_client_iface_normalize(PurpleProtocol *protocol,
    const PurpleAccount *account, const char *who);
    -PurpleChat *purple_protocol_client_iface_find_blist_chat(PurpleProtocol *,
    +PurpleChat *purple_protocol_client_iface_find_blist_chat(PurpleProtocol *protocol,
    PurpleAccount *account, const char *name);
    -gboolean purple_protocol_client_iface_offline_message(PurpleProtocol *,
    +gboolean purple_protocol_client_iface_offline_message(PurpleProtocol *protocol,
    const PurpleBuddy *buddy);
    -GHashTable *purple_protocol_client_iface_get_account_text_table(PurpleProtocol *,
    +GHashTable *purple_protocol_client_iface_get_account_text_table(PurpleProtocol *protocol,
    PurpleAccount *account);
    -PurpleMood *purple_protocol_client_iface_get_moods(PurpleProtocol *,
    +PurpleMood *purple_protocol_client_iface_get_moods(PurpleProtocol *protocol,
    PurpleAccount *account);
    -gssize purple_protocol_client_iface_get_max_message_size(PurpleProtocol *,
    +gssize purple_protocol_client_iface_get_max_message_size(PurpleProtocol *protocol,
    PurpleConversation *conv);
    /**************************************************************************/
    @@ -918,66 +918,66 @@
    */
    GType purple_protocol_server_iface_get_type(void);
    -void purple_protocol_server_iface_register_user(PurpleProtocol *,
    - PurpleAccount *);
    +void purple_protocol_server_iface_register_user(PurpleProtocol *protocol,
    + PurpleAccount *account);
    /**
    * purple_protocol_server_iface_unregister_user:
    * @cb: (scope call):
    */
    -void purple_protocol_server_iface_unregister_user(PurpleProtocol *,
    - PurpleAccount *, PurpleAccountUnregistrationCb cb, void *user_data);
    +void purple_protocol_server_iface_unregister_user(PurpleProtocol *protocol,
    + PurpleAccount *account, PurpleAccountUnregistrationCb cb, void *user_data);
    -void purple_protocol_server_iface_set_info(PurpleProtocol *, PurpleConnection *,
    +void purple_protocol_server_iface_set_info(PurpleProtocol *protocol, PurpleConnection *connection,
    const char *info);
    -void purple_protocol_server_iface_get_info(PurpleProtocol *, PurpleConnection *,
    +void purple_protocol_server_iface_get_info(PurpleProtocol *protocol, PurpleConnection *connection,
    const char *who);
    -void purple_protocol_server_iface_set_status(PurpleProtocol *,
    +void purple_protocol_server_iface_set_status(PurpleProtocol *protocol,
    PurpleAccount *account, PurpleStatus *status);
    -void purple_protocol_server_iface_set_idle(PurpleProtocol *, PurpleConnection *,
    +void purple_protocol_server_iface_set_idle(PurpleProtocol *protocol, PurpleConnection *connection,
    int idletime);
    -void purple_protocol_server_iface_change_passwd(PurpleProtocol *,
    - PurpleConnection *, const char *old_pass, const char *new_pass);
    +void purple_protocol_server_iface_change_passwd(PurpleProtocol *protocol,
    + PurpleConnection *connection, const char *old_pass, const char *new_pass);
    -void purple_protocol_server_iface_add_buddy(PurpleProtocol *,
    +void purple_protocol_server_iface_add_buddy(PurpleProtocol *protocol,
    PurpleConnection *pc, PurpleBuddy *buddy, PurpleGroup *group,
    const char *message);
    -void purple_protocol_server_iface_add_buddies(PurpleProtocol *,
    +void purple_protocol_server_iface_add_buddies(PurpleProtocol *protocol,
    PurpleConnection *pc, GList *buddies, GList *groups,
    const char *message);
    -void purple_protocol_server_iface_remove_buddy(PurpleProtocol *,
    - PurpleConnection *, PurpleBuddy *buddy, PurpleGroup *group);
    +void purple_protocol_server_iface_remove_buddy(PurpleProtocol *protocol,
    + PurpleConnection *connection, PurpleBuddy *buddy, PurpleGroup *group);
    -void purple_protocol_server_iface_remove_buddies(PurpleProtocol *,
    - PurpleConnection *, GList *buddies, GList *groups);
    +void purple_protocol_server_iface_remove_buddies(PurpleProtocol *protocol,
    + PurpleConnection *connection, GList *buddies, GList *groups);
    -void purple_protocol_server_iface_keepalive(PurpleProtocol *,
    - PurpleConnection *);
    +void purple_protocol_server_iface_keepalive(PurpleProtocol *protocol,
    + PurpleConnection *connection);
    -void purple_protocol_server_iface_alias_buddy(PurpleProtocol *,
    - PurpleConnection *, const char *who, const char *alias);
    +void purple_protocol_server_iface_alias_buddy(PurpleProtocol *protocol,
    + PurpleConnection *connection, const char *who, const char *alias);
    -void purple_protocol_server_iface_group_buddy(PurpleProtocol *,
    - PurpleConnection *, const char *who, const char *old_group,
    +void purple_protocol_server_iface_group_buddy(PurpleProtocol *protocol,
    + PurpleConnection *connection, const char *who, const char *old_group,
    const char *new_group);
    -void purple_protocol_server_iface_rename_group(PurpleProtocol *,
    - PurpleConnection *, const char *old_name, PurpleGroup *group,
    +void purple_protocol_server_iface_rename_group(PurpleProtocol *protocol,
    + PurpleConnection *connection, const char *old_name, PurpleGroup *group,
    GList *moved_buddies);
    -void purple_protocol_server_iface_set_buddy_icon(PurpleProtocol *,
    - PurpleConnection *, PurpleImage *img);
    +void purple_protocol_server_iface_set_buddy_icon(PurpleProtocol *protocol,
    + PurpleConnection *connection, PurpleImage *img);
    -void purple_protocol_server_iface_remove_group(PurpleProtocol *,
    +void purple_protocol_server_iface_remove_group(PurpleProtocol *protocol,
    PurpleConnection *gc, PurpleGroup *group);
    -int purple_protocol_server_iface_send_raw(PurpleProtocol *,
    +int purple_protocol_server_iface_send_raw(PurpleProtocol *protocol,
    PurpleConnection *gc, const char *buf, int len);
    /**
    @@ -985,7 +985,7 @@
    * @success_cb: (scope call):
    * @failure_cb: (scope call):
    */
    -void purple_protocol_server_iface_set_public_alias(PurpleProtocol *,
    +void purple_protocol_server_iface_set_public_alias(PurpleProtocol *protocol,
    PurpleConnection *gc, const char *alias,
    PurpleSetPublicAliasSuccessCallback success_cb,
    PurpleSetPublicAliasFailureCallback failure_cb);
    @@ -995,7 +995,7 @@
    * @success_cb: (scope call):
    * @failure_cb: (scope call):
    */
    -void purple_protocol_server_iface_get_public_alias(PurpleProtocol *,
    +void purple_protocol_server_iface_get_public_alias(PurpleProtocol *protocol,
    PurpleConnection *gc, PurpleGetPublicAliasSuccessCallback success_cb,
    PurpleGetPublicAliasFailureCallback failure_cb);
    @@ -1010,11 +1010,11 @@
    */
    GType purple_protocol_im_iface_get_type(void);
    -int purple_protocol_im_iface_send(PurpleProtocol *, PurpleConnection *,
    +int purple_protocol_im_iface_send(PurpleProtocol *protocol, PurpleConnection *connection,
    PurpleMessage *msg);
    -unsigned int purple_protocol_im_iface_send_typing(PurpleProtocol *,
    - PurpleConnection *, const char *name, PurpleIMTypingState state);
    +unsigned int purple_protocol_im_iface_send_typing(PurpleProtocol *protocol,
    + PurpleConnection *connection, const char *name, PurpleIMTypingState state);
    /**************************************************************************/
    /* Protocol Chat Interface API */
    @@ -1027,34 +1027,34 @@
    */
    GType purple_protocol_chat_iface_get_type(void);
    -GList *purple_protocol_chat_iface_info(PurpleProtocol *,
    - PurpleConnection *);
    +GList *purple_protocol_chat_iface_info(PurpleProtocol *protocol,
    + PurpleConnection *connection);
    -GHashTable *purple_protocol_chat_iface_info_defaults(PurpleProtocol *,
    - PurpleConnection *, const char *chat_name);
    +GHashTable *purple_protocol_chat_iface_info_defaults(PurpleProtocol *protocol,
    + PurpleConnection *connection, const char *chat_name);
    -void purple_protocol_chat_iface_join(PurpleProtocol *, PurpleConnection *,
    +void purple_protocol_chat_iface_join(PurpleProtocol *protocol, PurpleConnection *connection,
    GHashTable *components);
    -void purple_protocol_chat_iface_reject(PurpleProtocol *,
    - PurpleConnection *, GHashTable *components);
    +void purple_protocol_chat_iface_reject(PurpleProtocol *protocol,
    + PurpleConnection *connection, GHashTable *components);
    -char *purple_protocol_chat_iface_get_name(PurpleProtocol *,
    +char *purple_protocol_chat_iface_get_name(PurpleProtocol *protocol,
    GHashTable *components);
    -void purple_protocol_chat_iface_invite(PurpleProtocol *,
    - PurpleConnection *, int id, const char *message, const char *who);
    +void purple_protocol_chat_iface_invite(PurpleProtocol *protocol,
    + PurpleConnection *connection, int id, const char *message, const char *who);
    -void purple_protocol_chat_iface_leave(PurpleProtocol *, PurpleConnection *,
    +void purple_protocol_chat_iface_leave(PurpleProtocol *protocol, PurpleConnection *connection,
    int id);
    -int purple_protocol_chat_iface_send(PurpleProtocol *, PurpleConnection *,
    +int purple_protocol_chat_iface_send(PurpleProtocol *protocol, PurpleConnection *connection,
    int id, PurpleMessage *msg);
    -char *purple_protocol_chat_iface_get_user_real_name(PurpleProtocol *,
    +char *purple_protocol_chat_iface_get_user_real_name(PurpleProtocol *protocol,
    PurpleConnection *gc, int id, const char *who);
    -void purple_protocol_chat_iface_set_topic(PurpleProtocol *,
    +void purple_protocol_chat_iface_set_topic(PurpleProtocol *protocol,
    PurpleConnection *gc, int id, const char *topic);
    /**************************************************************************/
    @@ -1068,20 +1068,20 @@
    */
    GType purple_protocol_privacy_iface_get_type(void);
    -void purple_protocol_privacy_iface_add_permit(PurpleProtocol *,
    - PurpleConnection *, const char *name);
    +void purple_protocol_privacy_iface_add_permit(PurpleProtocol *protocol,
    + PurpleConnection *connection, const char *name);
    -void purple_protocol_privacy_iface_add_deny(PurpleProtocol *,
    - PurpleConnection *, const char *name);
    +void purple_protocol_privacy_iface_add_deny(PurpleProtocol *protocol,
    + PurpleConnection *connection, const char *name);
    -void purple_protocol_privacy_iface_rem_permit(PurpleProtocol *,
    - PurpleConnection *, const char *name);
    +void purple_protocol_privacy_iface_rem_permit(PurpleProtocol *protocol,
    + PurpleConnection *connection, const char *name);
    -void purple_protocol_privacy_iface_rem_deny(PurpleProtocol *,
    - PurpleConnection *, const char *name);
    +void purple_protocol_privacy_iface_rem_deny(PurpleProtocol *protocol,
    + PurpleConnection *connection, const char *name);
    -void purple_protocol_privacy_iface_set_permit_deny(PurpleProtocol *,
    - PurpleConnection *);
    +void purple_protocol_privacy_iface_set_permit_deny(PurpleProtocol *protocol,
    + PurpleConnection *connection);
    /**************************************************************************/
    /* Protocol Xfer Interface API */
    @@ -1094,14 +1094,14 @@
    */
    GType purple_protocol_xfer_iface_get_type(void);
    -gboolean purple_protocol_xfer_iface_can_receive(PurpleProtocol *,
    - PurpleConnection *, const char *who);
    +gboolean purple_protocol_xfer_iface_can_receive(PurpleProtocol *protocol,
    + PurpleConnection *connection, const char *who);
    -void purple_protocol_xfer_iface_send(PurpleProtocol *, PurpleConnection *,
    +void purple_protocol_xfer_iface_send(PurpleProtocol *protocol, PurpleConnection *connection,
    const char *who, const char *filename);
    -PurpleXfer *purple_protocol_xfer_iface_new_xfer(PurpleProtocol *,
    - PurpleConnection *, const char *who);
    +PurpleXfer *purple_protocol_xfer_iface_new_xfer(PurpleProtocol *protocol,
    + PurpleConnection *connection, const char *who);
    /**************************************************************************/
    /* Protocol Roomlist Interface API */
    @@ -1114,16 +1114,16 @@
    */
    GType purple_protocol_roomlist_iface_get_type(void);
    -PurpleRoomlist *purple_protocol_roomlist_iface_get_list(PurpleProtocol *,
    +PurpleRoomlist *purple_protocol_roomlist_iface_get_list(PurpleProtocol *protocol,
    PurpleConnection *gc);
    -void purple_protocol_roomlist_iface_cancel(PurpleProtocol *,
    +void purple_protocol_roomlist_iface_cancel(PurpleProtocol *protocol,
    PurpleRoomlist *list);
    -void purple_protocol_roomlist_iface_expand_category(PurpleProtocol *,
    +void purple_protocol_roomlist_iface_expand_category(PurpleProtocol *protocol,
    PurpleRoomlist *list, PurpleRoomlistRoom *category);
    -char *purple_protocol_roomlist_iface_room_serialize(PurpleProtocol *,
    +char *purple_protocol_roomlist_iface_room_serialize(PurpleProtocol *protocol,
    PurpleRoomlistRoom *room);
    /**************************************************************************/
    @@ -1137,10 +1137,10 @@
    */
    GType purple_protocol_attention_iface_get_type(void);
    -gboolean purple_protocol_attention_iface_send(PurpleProtocol *,
    +gboolean purple_protocol_attention_iface_send(PurpleProtocol *protocol,
    PurpleConnection *gc, const char *username, guint type);
    -GList *purple_protocol_attention_iface_get_types(PurpleProtocol *,
    +GList *purple_protocol_attention_iface_get_types(PurpleProtocol *protocol,
    PurpleAccount *acct);
    /**************************************************************************/
    @@ -1154,13 +1154,13 @@
    */
    GType purple_protocol_media_iface_get_type(void);
    -gboolean purple_protocol_media_iface_initiate_session(PurpleProtocol *,
    +gboolean purple_protocol_media_iface_initiate_session(PurpleProtocol *protocol,
    PurpleAccount *account, const char *who, PurpleMediaSessionType type);
    -PurpleMediaCaps purple_protocol_media_iface_get_caps(PurpleProtocol *,
    +PurpleMediaCaps purple_protocol_media_iface_get_caps(PurpleProtocol *protocol,
    PurpleAccount *account, const char *who);
    -gboolean purple_protocol_media_iface_send_dtmf(PurpleProtocol *,
    +gboolean purple_protocol_media_iface_send_dtmf(PurpleProtocol *protocol,
    PurpleMedia *media, gchar dtmf, guint8 volume, guint8 duration);
    /**************************************************************************/
    @@ -1174,16 +1174,28 @@
    */
    GType purple_protocol_factory_iface_get_type(void);
    -PurpleConnection *purple_protocol_factory_iface_connection_new(PurpleProtocol *,
    +/**
    + * purple_protocol_factory_iface_connection_new: (skip)
    + */
    +PurpleConnection *purple_protocol_factory_iface_connection_new(PurpleProtocol *protocol,
    PurpleAccount *account, const char *password);
    -PurpleRoomlist *purple_protocol_factory_iface_roomlist_new(PurpleProtocol *,
    +/**
    + * purple_protocol_factory_iface_roomlist_new: (skip)
    + */
    +PurpleRoomlist *purple_protocol_factory_iface_roomlist_new(PurpleProtocol *protocol,
    PurpleAccount *account);
    -PurpleWhiteboard *purple_protocol_factory_iface_whiteboard_new(PurpleProtocol *,
    +/**
    + * purple_protocol_factory_iface_whiteboard_new: (skip)
    + */
    +PurpleWhiteboard *purple_protocol_factory_iface_whiteboard_new(PurpleProtocol *protocol,
    PurpleAccount *account, const char *who, int state);
    -PurpleXfer *purple_protocol_factory_iface_xfer_new(PurpleProtocol *,
    +/**
    + * purple_protocol_factory_iface_xfer_new: (skip)
    + */
    +PurpleXfer *purple_protocol_factory_iface_xfer_new(PurpleProtocol *protocol,
    PurpleAccount *account, PurpleXferType type, const char *who);
    G_END_DECLS
    --- a/libpurple/protocols.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/libpurple/protocols.h Fri Nov 03 18:27:03 2017 +0100
    @@ -34,7 +34,7 @@
    #define PURPLE_TYPE_PROTOCOL_ACTION (purple_protocol_action_get_type())
    typedef struct _PurpleProtocolAction PurpleProtocolAction;
    -typedef void (*PurpleProtocolActionCallback)(PurpleProtocolAction *);
    +typedef void (*PurpleProtocolActionCallback)(PurpleProtocolAction *action);
    #define PURPLE_TYPE_ATTENTION_TYPE (purple_attention_type_get_type())
    @@ -466,7 +466,7 @@
    *
    * Retrieves the list of stock status types from a protocol.
    *
    - * Returns: (element-type PurpleStatus): List of statuses
    + * Returns: (transfer full) (element-type PurpleStatus): List of statuses
    */
    GList *purple_protocol_get_statuses(PurpleAccount *account,
    PurplePresence *presence);
    --- a/libpurple/protocols/gg/blist.c Mon Oct 02 13:27:23 2017 +0200
    +++ b/libpurple/protocols/gg/blist.c Fri Nov 03 18:27:03 2017 +0100
    @@ -125,7 +125,7 @@
    g = g_strdup("Gadu-Gadu");
    - if ('\0' != data_tbl[F_GROUP]) {
    + if ('\0' != *(data_tbl[F_GROUP])) {
    /* XXX: Probably buddy should be added to all the groups. */
    /* Hard limit to at most 50 groups */
    gchar **group_tbl = g_strsplit(data_tbl[F_GROUP], ",", 50);
    --- a/libpurple/protocols/jabber/jingle/rtp.c Mon Oct 02 13:27:23 2017 +0200
    +++ b/libpurple/protocols/jabber/jingle/rtp.c Fri Nov 03 18:27:03 2017 +0100
    @@ -819,6 +819,7 @@
    JingleTransport *transport;
    JabberBuddy *jb;
    JabberBuddyResource *jbr;
    + gboolean ret = FALSE;
    const gchar *transport_type;
    gchar *resource = NULL, *me = NULL, *sid = NULL;
    @@ -827,16 +828,15 @@
    jb = jabber_buddy_find(js, who, FALSE);
    if (!jb) {
    purple_debug_error("jingle-rtp", "Could not find Jabber buddy\n");
    - return FALSE;
    + goto out;
    }
    resource = jabber_get_resource(who);
    jbr = jabber_buddy_find_resource(jb, resource);
    - g_free(resource);
    if (!jbr) {
    purple_debug_error("jingle-rtp", "Could not find buddy's resource - %s\n", resource);
    - return FALSE;
    + goto out;
    }
    if (jabber_resource_has_capability(jbr, JINGLE_TRANSPORT_ICEUDP)) {
    @@ -848,7 +848,7 @@
    } else {
    purple_debug_error("jingle-rtp", "Resource doesn't support "
    "the same transport types\n");
    - return FALSE;
    + goto out;
    }
    /* set ourselves as initiator */
    @@ -856,7 +856,6 @@
    sid = jabber_get_next_id(js);
    session = jingle_session_create(js, sid, me, who, TRUE);
    - g_free(sid);
    if (type & PURPLE_MEDIA_AUDIO) {
    @@ -878,13 +877,17 @@
    g_object_notify_by_pspec(G_OBJECT(content), properties[PROP_MEDIA_TYPE]);
    }
    - g_free(me);
    -
    if (jingle_rtp_get_media(session) == NULL) {
    - return FALSE;
    + goto out;
    }
    - return TRUE;
    + ret = TRUE;
    +
    +out:
    + g_free(me);
    + g_free(resource);
    + g_free(sid);
    + return ret;
    }
    void
    --- a/libpurple/request.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/libpurple/request.h Fri Nov 03 18:27:03 2017 +0100
    @@ -133,7 +133,7 @@
    PURPLE_REQUEST_ICON_ERROR
    } PurpleRequestIconType;
    -typedef void (*PurpleRequestCancelCb)(gpointer);
    +typedef void (*PurpleRequestCancelCb)(gpointer data);
    /**
    * PurpleRequestUiOps:
    @@ -202,7 +202,7 @@
    void (*_purple_reserved4)(void);
    };
    -typedef void (*PurpleRequestInputCb)(void *, const char *);
    +typedef void (*PurpleRequestInputCb)(void *data, const char *value);
    typedef gboolean (*PurpleRequestFieldValidator)(PurpleRequestField *field,
    gchar **errmsg, gpointer user_data);
    @@ -216,12 +216,12 @@
    * argument is the <literal>user_data</literal> parameter; the second is the
    * index in the list of actions of the one chosen.
    */
    -typedef void (*PurpleRequestActionCb)(void *, int);
    +typedef void (*PurpleRequestActionCb)(void *data, int action);
    -typedef void (*PurpleRequestChoiceCb)(void *, gpointer);
    -typedef void (*PurpleRequestFieldsCb)(void *, PurpleRequestFields *fields);
    -typedef void (*PurpleRequestFileCb)(void *, const char *filename);
    -typedef void (*PurpleRequestHelpCb)(gpointer);
    +typedef void (*PurpleRequestChoiceCb)(void *data, gpointer value);
    +typedef void (*PurpleRequestFieldsCb)(void *data, PurpleRequestFields *fields);
    +typedef void (*PurpleRequestFileCb)(void *data, const char *filename);
    +typedef void (*PurpleRequestHelpCb)(gpointer data);
    G_BEGIN_DECLS
    @@ -1841,7 +1841,7 @@
    /**
    * purple_request_field_email_validator:
    * @field: The field.
    - * @errmsg: (Optional) destination for error message.
    + * @errmsg: (out) (optional): destination for error message.
    * @user_data: Ignored.
    *
    * Validates a field which should contain an email address.
    --- a/libpurple/sslconn.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/libpurple/sslconn.h Fri Nov 03 18:27:03 2017 +0100
    @@ -50,10 +50,10 @@
    typedef struct _PurpleSslConnection PurpleSslConnection;
    -typedef void (*PurpleSslInputFunction)(gpointer, PurpleSslConnection *,
    - PurpleInputCondition);
    -typedef void (*PurpleSslErrorFunction)(PurpleSslConnection *, PurpleSslErrorType,
    - gpointer);
    +typedef void (*PurpleSslInputFunction)(gpointer data, PurpleSslConnection *connection,
    + PurpleInputCondition cond);
    +typedef void (*PurpleSslErrorFunction)(PurpleSslConnection *connection, PurpleSslErrorType err,
    + gpointer data);
    /**
    * PurpleSslConnection:
    --- a/libpurple/stun.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/libpurple/stun.h Fri Nov 03 18:27:03 2017 +0100
    @@ -88,7 +88,7 @@
    time_t lookup_time;
    };
    -typedef void (*PurpleStunCallback) (PurpleStunNatDiscovery *);
    +typedef void (*PurpleStunCallback) (PurpleStunNatDiscovery *discovery);
    G_BEGIN_DECLS
    --- a/libpurple/tests.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/libpurple/tests.h Fri Nov 03 18:27:03 2017 +0100
    @@ -30,8 +30,8 @@
    const gchar *output;
    } PurpleTestStringData;
    -typedef const gchar *(*PurpleTestStringFunc)(const gchar *);
    -typedef gchar *(*PurpleTestStringFreeFunc)(const gchar *);
    +typedef const gchar *(*PurpleTestStringFunc)(const gchar *str);
    +typedef gchar *(*PurpleTestStringFreeFunc)(const gchar *str);
    static inline void
    purple_test_string_compare(PurpleTestStringFunc func,
    --- a/libpurple/tests/test_util.c Mon Oct 02 13:27:23 2017 +0200
    +++ b/libpurple/tests/test_util.c Fri Nov 03 18:27:03 2017 +0100
    @@ -523,6 +523,30 @@
    }
    /******************************************************************************
    + * URI Escaping
    + *****************************************************************************/
    +static void
    +test_uri_escape_for_open(void) {
    + /* make sure shell stuff is escaped... */
    + gchar *result = purple_uri_escape_for_open("https://$(xterm)");
    + g_assert_cmpstr("https://%24%28xterm%29", ==, result);
    + g_free(result);
    +
    + result = purple_uri_escape_for_open("https://`xterm`");
    + g_assert_cmpstr("https://%60xterm%60", ==, result);
    + g_free(result);
    +
    + result = purple_uri_escape_for_open("https://$((25 + 13))");
    + g_assert_cmpstr("https://%24%28%2825%20+%2013%29%29", ==, result);
    + g_free(result);
    +
    + /* ...but keep brackets so that ipv6 links can be opened. */
    + result = purple_uri_escape_for_open("https://[123:4567:89a::::]");
    + g_assert_cmpstr("https://[123:4567:89a::::]", ==, result);
    + g_free(result);
    +}
    +
    +/******************************************************************************
    * MANE
    *****************************************************************************/
    gint
    @@ -570,5 +594,8 @@
    g_test_add_func("/util/test_strdup_withhtml",
    test_util_strdup_withhtml);
    + g_test_add_func("/util/test_uri_escape_for_open",
    + test_uri_escape_for_open);
    +
    return g_test_run();
    }
    --- a/libpurple/theme-loader.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/libpurple/theme-loader.h Fri Nov 03 18:27:03 2017 +0100
    @@ -58,8 +58,8 @@
    {
    GObjectClass parent_class;
    - PurpleTheme *(*purple_theme_loader_build)(const gchar*);
    - gboolean (*probe_directory)(const gchar *);
    + PurpleTheme *(*purple_theme_loader_build)(const gchar *dir);
    + gboolean (*probe_directory)(const gchar *dir);
    /*< private >*/
    void (*purple_reserved1)(void);
    --- a/libpurple/theme-manager.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/libpurple/theme-manager.h Fri Nov 03 18:27:03 2017 +0100
    @@ -34,7 +34,7 @@
    #include "theme.h"
    #include "theme-loader.h"
    -typedef void (*PurpleThemeFunc) (PurpleTheme *);
    +typedef void (*PurpleThemeFunc) (PurpleTheme *theme);
    typedef struct _PurpleThemeManager PurpleThemeManager;
    typedef struct _PurpleThemeManagerClass PurpleThemeManagerClass;
    --- a/libpurple/util.c Mon Oct 02 13:27:23 2017 +0200
    +++ b/libpurple/util.c Fri Nov 03 18:27:03 2017 +0100
    @@ -1472,7 +1472,7 @@
    pln = "\302\256"; /* or use g_unichar_to_utf8(0xae); */
    else if(IS_ENTITY("&apos;"))
    pln = "\'";
    - else if(text[1] == '#' && g_ascii_isxdigit(text[2])) {
    + else if(text[1] == '#' && (g_ascii_isxdigit(text[2]) || text[2] == 'x')) {
    static char buf[7];
    const char *start = text + 2;
    char *end;
    @@ -4271,6 +4271,17 @@
    return result;
    }
    +char *
    +purple_uri_escape_for_open(const char *unescaped)
    +{
    + /* Replace some special characters like $ with their percent-encoded value.
    + * This shouldn't be necessary because we shell-escape the entire arg before
    + * exec'ing the browser, however, we had a report that a URL containing
    + * $(xterm) was causing xterm to start on his system. This is obviously a
    + * bug on his system, but it's pretty easy for us to protect against it. */
    + return g_uri_escape_string(unescaped, "[]:;/%#,+?=&@", FALSE);
    +}
    +
    /**************************************************************************
    * UTF8 String Functions
    **************************************************************************/
    --- a/libpurple/util.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/libpurple/util.h Fri Nov 03 18:27:03 2017 +0100
    @@ -1329,6 +1329,17 @@
    */
    GList *purple_uri_list_extract_filenames(const gchar *uri_list);
    +/**
    + * This function escapes any characters that might be interpreted by the shell
    + * when executing a program to open a URI on some systems.
    + *
    + * @param unescaped The unescaped URI.
    + *
    + * @return A newly allocated string with any shell metacharacters replaced with
    + * their escaped equivalents.
    + */
    +char *purple_uri_escape_for_open(const char *unescaped);
    +
    /**************************************************************************
    * UTF8 String Functions
    **************************************************************************/
    --- a/libpurple/win32/libc_interface.c Mon Oct 02 13:27:23 2017 +0200
    +++ b/libpurple/win32/libc_interface.c Fri Nov 03 18:27:03 2017 +0100
    @@ -33,6 +33,7 @@
    #include <glib.h>
    #include "debug.h"
    #include "libc_internal.h"
    +#include "util.h"
    #include <glib/gstdio.h>
    #include "util.h"
    --- a/pidgin/Makefile.am Mon Oct 02 13:27:23 2017 +0200
    +++ b/pidgin/Makefile.am Fri Nov 03 18:27:03 2017 +0100
    @@ -79,6 +79,7 @@
    gtksound.c \
    gtkstatus-icon-theme.c \
    gtkstatusbox.c \
    + gtkstyle.c \
    gtkutils.c \
    gtkwebview.c \
    gtkwebviewtoolbar.c \
    @@ -128,6 +129,7 @@
    gtksound.h \
    gtkstatus-icon-theme.h \
    gtkstatusbox.h \
    + gtkstyle.h \
    pidginstock.h \
    gtkutils.h \
    gtkwebview.h \
    --- a/pidgin/gtkblist.c Mon Oct 02 13:27:23 2017 +0200
    +++ b/pidgin/gtkblist.c Fri Nov 03 18:27:03 2017 +0100
    @@ -55,6 +55,7 @@
    #include "gtkstatusbox.h"
    #include "gtkscrollbook.h"
    #include "gtksmiley-manager.h"
    +#include "gtkstyle.h"
    #include "gtkblist-theme.h"
    #include "gtkblist-theme-loader.h"
    #include "gtkutils.h"
    @@ -4251,7 +4252,7 @@
    gchar *
    pidgin_blist_get_name_markup(PurpleBuddy *b, gboolean selected, gboolean aliased)
    {
    - const char *name, *name_color, *name_font, *status_color, *status_font;
    + const char *name, *name_color, *name_font, *status_color, *status_font, *dim_grey;
    char *text = NULL;
    PurpleProtocol *protocol = NULL;
    PurpleContact *contact;
    @@ -4354,13 +4355,15 @@
    theme = pidgin_blist_get_theme();
    name_color = NULL;
    + dim_grey = pidgin_style_is_dark(NULL) ? "light slate grey" : "dim grey";
    +
    if (theme) {
    if (purple_presence_is_idle(presence)) {
    namefont = statusfont = pidgin_blist_theme_get_idle_text_info(theme);
    - name_color = "dim grey";
    + name_color = dim_grey;
    } else if (!purple_presence_is_online(presence)) {
    namefont = pidgin_blist_theme_get_offline_text_info(theme);
    - name_color = "dim grey";
    + name_color = dim_grey;
    statusfont = pidgin_blist_theme_get_status_text_info(theme);
    } else if (purple_presence_is_available(presence)) {
    namefont = pidgin_blist_theme_get_online_text_info(theme);
    @@ -4374,14 +4377,14 @@
    && (purple_presence_is_idle(presence)
    || !purple_presence_is_online(presence)))
    {
    - name_color = "dim grey";
    + name_color = dim_grey;
    }
    }
    name_color = theme_font_get_color_default(namefont, name_color);
    name_font = theme_font_get_face_default(namefont, "");
    - status_color = theme_font_get_color_default(statusfont, "dim grey");
    + status_color = theme_font_get_color_default(statusfont, dim_grey);
    status_font = theme_font_get_face_default(statusfont, "");
    if (aliased && selected) {
    @@ -6554,7 +6557,7 @@
    textcolor = pidgin_theme_font_get_color_describe(pair);
    else
    /* If no theme them default to making idle buddy names grey */
    - textcolor = "dim grey";
    + textcolor = pidgin_style_is_dark(NULL) ? "light slate grey" : "dim grey";
    if (textcolor) {
    idle = g_strdup_printf("<span color='%s' font_desc='%s'>%d:%02d</span>",
    --- a/pidgin/gtkblist.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/pidgin/gtkblist.h Fri Nov 03 18:27:03 2017 +0100
    @@ -241,7 +241,7 @@
    * This may be an existing pixbuf that has been given an additional ref,
    * so it shouldn't be modified.
    *
    - * Returns: A GdkPixbuf for the emblem to show, or NULL
    + * Returns: (transfer full): A GdkPixbuf for the emblem to show, or NULL
    */
    GdkPixbuf *
    pidgin_blist_get_emblem(PurpleBlistNode *node);
    @@ -250,6 +250,8 @@
    * pidgin_blist_get_status_icon:
    *
    * Useful for the buddy ticker
    + *
    + * Returns: (transfer full): A #GdkPixbuf of status icon.
    */
    GdkPixbuf *pidgin_blist_get_status_icon(PurpleBlistNode *node,
    PidginStatusIconSize size);
    @@ -317,7 +319,7 @@
    *
    * Gets Pidgin's current buddy list theme
    *
    - * Returns: the current theme
    + * Returns: (transfer none): the current theme
    */
    PidginBlistTheme *pidgin_blist_get_theme(void);
    @@ -332,7 +334,7 @@
    *
    * Gets the current list of sort methods.
    *
    - * Returns: A GSlist of sort methods
    + * Returns: (transfer none) (element-type PidginBlistSortMethod): A GSlist of sort methods
    */
    GList *pidgin_blist_get_sort_methods(void);
    @@ -348,7 +350,7 @@
    * pidgin_blist_sort_method_reg:
    * @id: The unique ID of the sorting method
    * @name: The method's name.
    - * @func: A pointer to the function.
    + * @func: (scope call): A pointer to the function.
    *
    * Registers a buddy list sorting method.
    */
    --- a/pidgin/gtkconv-theme.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/pidgin/gtkconv-theme.h Fri Nov 03 18:27:03 2017 +0100
    @@ -179,7 +179,7 @@
    *
    * Get a list of available variants for a conversation theme.
    *
    - * Returns: The list of variants. This GList and the string data are owned by
    + * Returns: (element-type utf8): The list of variants. This GList and the string data are owned by
    * the theme and should not be freed by the caller.
    */
    const GList *pidgin_conversation_theme_get_variants(PidginConvTheme *theme);
    @@ -210,7 +210,7 @@
    *
    * Get (and reference) the array of nick colors
    *
    - * Returns: Pointer to GArray of nick colors, or NULL if no colors in theme
    + * Returns: (transfer container) (element-type GdkRGBA): Pointer to GArray of nick colors, or NULL if no colors in theme
    */
    GArray *pidgin_conversation_theme_get_nick_colors(PidginConvTheme *theme);
    --- a/pidgin/gtkconv.c Mon Oct 02 13:27:23 2017 +0200
    +++ b/pidgin/gtkconv.c Fri Nov 03 18:27:03 2017 +0100
    @@ -61,6 +61,7 @@
    #include "gtkpounce.h"
    #include "gtkprefs.h"
    #include "gtkprivacy.h"
    +#include "gtkstyle.h"
    #include "gtkutils.h"
    #include "gtkwebview.h"
    #include "pidginstock.h"
    @@ -8940,6 +8941,57 @@
    e2ee_stock = NULL;
    }
    +/* Invalidate the first tab color set */
    +static gboolean tab_color_fuse = TRUE;
    +
    +static void
    +pidgin_conversations_set_tab_colors(void)
    +{
    + /* Set default tab colors */
    + GString *str = g_string_new(NULL);
    + GtkSettings *settings = gtk_settings_get_default();
    + GtkStyle *parent = gtk_rc_get_style_by_paths(settings, "tab-container.tab-label*", NULL, G_TYPE_NONE), *now;
    + struct {
    + const char *stylename;
    + const char *labelname;
    + const char *color;
    + } styles[] = {
    + {"pidgin_tab_label_typing_default", "tab-label-typing", "#4e9a06"},
    + {"pidgin_tab_label_typed_default", "tab-label-typed", "#c4a000"},
    + {"pidgin_tab_label_attention_default", "tab-label-attention", "#006aff"},
    + {"pidgin_tab_label_unreadchat_default", "tab-label-unreadchat", "#cc0000"},
    + {"pidgin_tab_label_event_default", "tab-label-event", "#888a85"},
    + {NULL, NULL, NULL}
    + };
    + int iter;
    +
    + if(tab_color_fuse) {
    + tab_color_fuse = FALSE;
    + return;
    + }
    +
    + for (iter = 0; styles[iter].stylename; iter++) {
    + now = gtk_rc_get_style_by_paths(settings, styles[iter].labelname, NULL, G_TYPE_NONE);
    + if (parent == now ||
    + (parent && now && parent->rc_style == now->rc_style)) {
    + GdkColor color;
    + gdk_color_parse(styles[iter].color, &color);
    + pidgin_style_adjust_contrast(gtk_widget_get_default_style(), &color);
    +
    + g_string_append_printf(str, "style \"%s\" {\n"
    + "fg[ACTIVE] = \"%s\"\n"
    + "}\n"
    + "widget \"*%s\" style \"%s\"\n",
    + styles[iter].stylename,
    + gdk_color_to_string(&color),
    + styles[iter].labelname, styles[iter].stylename);
    + }
    + }
    + gtk_rc_parse_string(str->str);
    + g_string_free(str, TRUE);
    + gtk_rc_reset_styles(settings);
    +}
    +
    void
    pidgin_conversations_uninit(void)
    {
    @@ -10247,6 +10299,9 @@
    purple_signal_emit(pidgin_conversations_get_handle(),
    "conversation-window-created", win);
    + /* Fix colours */
    + pidgin_conversations_set_tab_colors();
    +
    return win;
    }
    @@ -11210,6 +11265,9 @@
    gdk_rgba_parse(&nick_highlight, DEFAULT_HIGHLIGHT_COLOR);
    gdk_rgba_parse(&send_color, DEFAULT_SEND_COLOR);
    + pidgin_style_adjust_contrast(NULL, &nick_highlight);
    + pidgin_style_adjust_contrast(NULL, &send_color);
    +
    srand(background.red * 65535 + background.green * 65535 + background.blue * 65535 + 1);
    breakout_time = time(NULL) + 3;
    --- a/pidgin/gtkconv.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/pidgin/gtkconv.h Fri Nov 03 18:27:03 2017 +0100
    @@ -180,7 +180,7 @@
    *
    * Returns the default theme for GTK+ conversations.
    *
    - * Returns: The default GTK+ conversation theme.
    + * Returns: (transfer none): The default GTK+ conversation theme.
    */
    PurpleTheme *pidgin_conversations_get_default_theme(void);
    @@ -222,7 +222,7 @@
    * converations returned if greater than zero. The returned list should
    * be freed by the caller.
    *
    - * Returns: List of PurpleConversation matching criteria, or %NULL.
    + * Returns: (transfer container) (element-type PurpleConversation): List of PurpleConversation matching criteria, or %NULL.
    */
    GList *
    pidgin_conversations_get_unseen_all(PidginUnseenState min_state,
    @@ -243,7 +243,7 @@
    * returned if greater than zero. The returned list should be freed by the
    * caller.
    *
    - * Returns: List of PurpleIMConversation matching criteria, or %NULL.
    + * Returns: (transfer container) (element-type PurpleConversation): List of PurpleIMConversation matching criteria, or %NULL.
    */
    GList *
    pidgin_conversations_get_unseen_ims(PidginUnseenState min_state,
    @@ -264,7 +264,7 @@
    * returned if greater than zero. The returned list should be freed by the
    * caller.
    *
    - * Returns: List of PurpleChatConversation matching criteria, or %NULL.
    + * Returns: (transfer container) (element-type PurpleConversation): List of PurpleChatConversation matching criteria, or %NULL.
    */
    GList *
    pidgin_conversations_get_unseen_chats(PidginUnseenState min_state,
    @@ -273,8 +273,8 @@
    /**
    * pidgin_conversations_fill_menu:
    - * @menu: Menu widget to add items to.
    - * @convs: List of PurpleConversation to add to menu.
    + * @menu: Menu widget to add items to.
    + * @convs: (element-type PurpleConversation): List of PurpleConversation to add to menu.
    *
    * Fill a menu with a list of conversations. Clicking the conversation
    * menu item will present that conversation to the user.
    @@ -315,7 +315,7 @@
    * @conv: The conversation.
    * @small_icon: Whether to get the small icon.
    *
    - * Returns: The tab icon.
    + * Returns: (transfer full): The tab icon.
    */
    GdkPixbuf *pidgin_conv_get_tab_icon(PurpleConversation *conv, gboolean small_icon);
    --- a/pidgin/gtkconvwin.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/pidgin/gtkconvwin.h Fri Nov 03 18:27:03 2017 +0100
    @@ -206,7 +206,7 @@
    * pidgin_conv_window_get_active_conversation:
    * @win: The conversation window
    *
    - * Returns: The active #PurpleConversation in @win.
    + * Returns: (transfer none): The active #PurpleConversation in @win.
    */
    PurpleConversation *pidgin_conv_window_get_active_conversation(const PidginConvWindow *win);
    @@ -283,10 +283,23 @@
    * GTK+ Conversation Placement API
    **************************************************************************/
    -typedef void (*PidginConvPlacementFunc)(PidginConversation *);
    +/**
    + * PidginConvPlacementFunc: (skip)
    + */
    +typedef void (*PidginConvPlacementFunc)(PidginConversation *conv);
    +/**
    + * pidgin_conv_placement_get_options: (skip)
    + */
    GList *pidgin_conv_placement_get_options(void);
    +/**
    + * pidgin_conv_placement_get_name: (skip)
    + */
    const char *pidgin_conv_placement_get_name(const char *id);
    +
    +/**
    + * pidgin_conv_placement_place: (skip)
    + */
    void pidgin_conv_placement_place(PidginConversation *gtkconv);
    /**
    --- a/pidgin/gtkdialogs.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/pidgin/gtkdialogs.h Fri Nov 03 18:27:03 2017 +0100
    @@ -39,17 +39,17 @@
    void pidgin_dialogs_destroy_all(void);
    void pidgin_dialogs_plugins_info(void);
    void pidgin_dialogs_im(void);
    -void pidgin_dialogs_im_with_user(PurpleAccount *, const char *);
    +void pidgin_dialogs_im_with_user(PurpleAccount *account, const char *username);
    void pidgin_dialogs_info(void);
    void pidgin_dialogs_log(void);
    -void pidgin_dialogs_alias_buddy(PurpleBuddy *);
    -void pidgin_dialogs_alias_chat(PurpleChat *);
    -void pidgin_dialogs_remove_buddy(PurpleBuddy *);
    -void pidgin_dialogs_remove_group(PurpleGroup *);
    -void pidgin_dialogs_remove_chat(PurpleChat *);
    -void pidgin_dialogs_remove_contact(PurpleContact *);
    -void pidgin_dialogs_merge_groups(PurpleGroup *, const char *);
    +void pidgin_dialogs_alias_buddy(PurpleBuddy *buddy);
    +void pidgin_dialogs_alias_chat(PurpleChat *chat);
    +void pidgin_dialogs_remove_buddy(PurpleBuddy *buddy);
    +void pidgin_dialogs_remove_group(PurpleGroup *group);
    +void pidgin_dialogs_remove_chat(PurpleChat *chat);
    +void pidgin_dialogs_remove_contact(PurpleContact *contact);
    +void pidgin_dialogs_merge_groups(PurpleGroup *group, const char *name);
    G_END_DECLS
    --- a/pidgin/gtkdocklet.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/pidgin/gtkdocklet.h Fri Nov 03 18:27:03 2017 +0100
    @@ -45,7 +45,7 @@
    /**
    * pidgin_docklet_get_status_icon:
    *
    - * Returns: The #GtkStatusIcon used for the docklet.
    + * Returns: (transfer none): The #GtkStatusIcon used for the docklet.
    */
    GtkStatusIcon *pidgin_docklet_get_status_icon(void);
    --- a/pidgin/gtkmenutray.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/pidgin/gtkmenutray.h Fri Nov 03 18:27:03 2017 +0100
    @@ -82,7 +82,7 @@
    *
    * Gets the box for the PidginMenuTray
    *
    - * Returns: The box that this menu tray is using
    + * Returns: (transfer none): The box that this menu tray is using
    */
    GtkWidget *pidgin_menu_tray_get_box(PidginMenuTray *menu_tray);
    --- a/pidgin/gtknotify.c Mon Oct 02 13:27:23 2017 +0200
    +++ b/pidgin/gtknotify.c Fri Nov 03 18:27:03 2017 +0100
    @@ -1336,13 +1336,7 @@
    GSList *argv = NULL, *argv_remote = NULL;
    gchar **usercmd_argv = NULL;
    - /* Replace some special characters like $ with their percent-encoded
    - value. This shouldn't be necessary because we shell-escape the entire
    - arg before exec'ing the browser, however, we had a report that a URL
    - containing $(xterm) was causing xterm to start on his system. This is
    - obviously a bug on his system, but it's pretty easy for us to protect
    - against it. */
    - uri_escaped = g_uri_escape_string(uri, ":;/%#,+?=&@", FALSE);
    + uri_escaped = purple_uri_escape_for_open(uri);
    web_browser = purple_prefs_get_string(PIDGIN_PREFS_ROOT
    "/browsers/browser");
    --- a/pidgin/gtknotify.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/pidgin/gtknotify.h Fri Nov 03 18:27:03 2017 +0100
    @@ -83,8 +83,6 @@
    * pidgin_notify_emails_present:
    *
    * Presents mail dialog to the user.
    - *
    - * Returns: void.
    */
    void pidgin_notify_emails_present(void *data);
    --- a/pidgin/gtkplugin.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/pidgin/gtkplugin.h Fri Nov 03 18:27:03 2017 +0100
    @@ -41,7 +41,7 @@
    typedef struct _PidginPluginInfo PidginPluginInfo;
    typedef struct _PidginPluginInfoClass PidginPluginInfoClass;
    -typedef GtkWidget *(*PidginPluginConfigFrameCb)(PurplePlugin *);
    +typedef GtkWidget *(*PidginPluginConfigFrameCb)(PurplePlugin *plugin);
    /**
    * PidginPluginInfo:
    --- a/pidgin/gtkpluginpref.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/pidgin/gtkpluginpref.h Fri Nov 03 18:27:03 2017 +0100
    @@ -41,7 +41,7 @@
    *
    * Creates a Gtk Preference frame for a PurplePluginPrefFrame
    *
    - * Returns: The gtk preference frame
    + * Returns: (transfer full): The gtk preference frame
    */
    GtkWidget *pidgin_plugin_pref_create_frame(PurplePluginPrefFrame *frame);
    --- a/pidgin/gtkprefs.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/pidgin/gtkprefs.h Fri Nov 03 18:27:03 2017 +0100
    @@ -54,6 +54,8 @@
    * @page: The page to which the new checkbox will be added
    *
    * Add a new checkbox for a boolean preference
    + *
    + * Returns: (transfer full): The new checkbox
    */
    GtkWidget *pidgin_prefs_checkbox(const char *title, const char *key,
    GtkWidget *page);
    @@ -69,9 +71,9 @@
    *
    * Add a new spin button representing an int preference
    *
    - * Returns: An hbox containing both the label and the spinner. Can be
    - * used to set the widgets to sensitive or insensitive based on the
    - * value of a checkbox.
    + * Returns: (transfer full): An hbox containing both the label and the spinner. Can be
    + * used to set the widgets to sensitive or insensitive based on the
    + * value of a checkbox.
    */
    GtkWidget *pidgin_prefs_labeled_spin_button(GtkWidget *page,
    const gchar *title, const char *key, int min, int max, GtkSizeGroup *sg);
    @@ -85,9 +87,9 @@
    *
    * Add a new entry representing a string preference
    *
    - * Returns: An hbox containing both the label and the entry. Can be used to set
    - * the widgets to sensitive or insensitive based on the value of a
    - * checkbox.
    + * Returns: (transfer full) :An hbox containing both the label and the entry. Can be used to set
    + * the widgets to sensitive or insensitive based on the value of a
    + * checkbox.
    */
    GtkWidget *pidgin_prefs_labeled_entry(GtkWidget *page, const gchar *title,
    const char *key, GtkSizeGroup *sg);
    @@ -102,9 +104,9 @@
    * Add a new entry representing a password (string) preference
    * The entry will use a password-style text entry (the text is substituded)
    *
    - * Returns: An hbox containing both the label and the entry. Can be used to set
    - * the widgets to sensitive or insensitive based on the value of a
    - * checkbox.
    + * Returns: (transfer full): An hbox containing both the label and the entry. Can be used to set
    + * the widgets to sensitive or insensitive based on the value of a
    + * checkbox.
    */
    GtkWidget *pidgin_prefs_labeled_password(GtkWidget *page, const gchar *title,
    const char *key, GtkSizeGroup *sg);
    @@ -119,6 +121,8 @@
    * paired as label/value
    *
    * Add a new dropdown representing a preference of the specified type
    + *
    + * Returns: (transfer full): The new dropdown.
    */
    GtkWidget *pidgin_prefs_dropdown(GtkWidget *page, const gchar *title,
    PurplePrefType type, const char *key, ...);
    @@ -130,9 +134,11 @@
    * @type: The type of preference to be stored in the dropdown
    * @key: The key of the pref that will be represented by the dropdown
    * @menuitems: The choices to be added to the dropdown, choices should
    - * be paired as label/value
    + * be paired as label/value
    *
    * Add a new dropdown representing a preference of the specified type
    + *
    + * Returns: (transfer full): The new dropdown.
    */
    GtkWidget *pidgin_prefs_dropdown_from_list(GtkWidget *page,
    const gchar * title, PurplePrefType type, const char *key,
    --- a/pidgin/gtkrequest.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/pidgin/gtkrequest.h Fri Nov 03 18:27:03 2017 +0100
    @@ -47,7 +47,7 @@
    *
    * Gets dialog window for specified libpurple request.
    *
    - * Returns: The dialog window.
    + * Returns: (transfer none): The dialog window.
    */
    GtkWindow *
    pidgin_request_get_dialog_window(void *ui_handle);
    --- a/pidgin/gtksavedstatuses.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/pidgin/gtksavedstatuses.h Fri Nov 03 18:27:03 2017 +0100
    @@ -70,12 +70,12 @@
    /**
    * pidgin_status_menu:
    * @status: The default saved_status to show as 'selected'
    - * @callback: The callback to call when the selection changes
    + * @callback: (scope call): The callback to call when the selection changes
    *
    * Creates a dropdown menu of saved statuses and calls a callback
    * when one is selected
    *
    - * Returns: The menu widget
    + * Returns: (transfer full): The menu widget
    */
    GtkWidget *pidgin_status_menu(PurpleSavedStatus *status, GCallback callback);
    --- a/pidgin/gtksmiley-theme.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/pidgin/gtksmiley-theme.h Fri Nov 03 18:27:03 2017 +0100
    @@ -148,7 +148,7 @@
    *
    * Returns the list of currently available smiley themes.
    *
    - * Returns: (transfer none): the #GList of #PidginSmileyTheme's.
    + * Returns: (transfer none) (element-type PidginSmileyTheme): the #GList of #PidginSmileyTheme's.
    */
    GList *
    pidgin_smiley_theme_get_all(void);
    --- a/pidgin/gtkstatusbox.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/pidgin/gtkstatusbox.h Fri Nov 03 18:27:03 2017 +0100
    @@ -159,7 +159,7 @@
    GType pidgin_status_box_get_type (void) G_GNUC_CONST;
    GtkWidget *pidgin_status_box_new (void);
    -GtkWidget *pidgin_status_box_new_with_account (PurpleAccount *);
    +GtkWidget *pidgin_status_box_new_with_account (PurpleAccount *account);
    void
    pidgin_status_box_add(PidginStatusBox *status_box, PidginStatusBoxItemType type, GdkPixbuf *pixbuf, const char *text, const char *sec_text, gpointer data);
    --- /dev/null Thu Jan 01 00:00:00 1970 +0000
    +++ b/pidgin/gtkstyle.c Fri Nov 03 18:27:03 2017 +0100
    @@ -0,0 +1,70 @@
    +/*
    + * @file gtkstyle.c GTK+ Style utility functions
    + * @ingroup pidgin
    + */
    +
    +/* pidgin
    + *
    + * Pidgin is the legal property of its developers, whose names are too numerous
    + * to list here. Please refer to the COPYRIGHT file distributed with this
    + * source distribution.
    + *
    + * This program is free software; you can redistribute it and/or modify
    + * 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 "gtkstyle.h"
    +
    +/* Assume light mode */
    +static gboolean dark_mode_cache = FALSE;
    +
    +gboolean
    +pidgin_style_is_dark(GtkStyle *style) {
    + GdkColor bg;
    +
    + if (!style) {
    + return dark_mode_cache;
    + }
    +
    + bg = style->base[GTK_STATE_NORMAL];
    +
    + if (bg.red != 0xFFFF || bg.green != 0xFFFF || bg.blue != 0xFFFF) {
    + dark_mode_cache = ((int) bg.red + (int) bg.green + (int) bg.blue) < (65536 * 3 / 2);
    + }
    +
    + return dark_mode_cache;
    +}
    +
    +void
    +pidgin_style_adjust_contrast(GtkStyle *style, GdkColor *color) {
    + if (pidgin_style_is_dark(style)) {
    + gdouble r, g, b, h, s, v;
    +
    + r = ((gdouble) color->red) / 65535.0;
    + g = ((gdouble) color->green) / 65535.0;
    + b = ((gdouble) color->blue) / 65535.0;
    +
    + gtk_rgb_to_hsv(r, g, b, &h, &s, &v);
    +
    + v += 0.3;
    + v = v > 1.0 ? 1.0 : v;
    + s = 0.7;
    +
    + gtk_hsv_to_rgb(h, s, v, &r, &g, &b);
    +
    + color->red = (guint16) (r * 65535.0);
    + color->green = (guint16) (g * 65535.0);
    + color->blue = (guint16) (b * 65535.0);
    + }
    +}
    --- /dev/null Thu Jan 01 00:00:00 1970 +0000
    +++ b/pidgin/gtkstyle.h Fri Nov 03 18:27:03 2017 +0100
    @@ -0,0 +1,59 @@
    +/**
    + * @file gtkstyle.h GTK+ Style utility functions
    + * @ingroup pidgin
    + */
    +
    +/* pidgin
    + *
    + * Pidgin is the legal property of its developers, whose names are too numerous
    + * to list here. Please refer to the COPYRIGHT file distributed with this
    + * source distribution.
    + *
    + * 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
    + */
    +#ifndef _PIDGINSTYLE_H_
    +#define _PIDGINSTYLE_H_
    +
    +#include <gtk/gtk.h>
    +
    +G_BEGIN_DECLS
    +
    +/*@{*/
    +
    +/**
    + * Returns TRUE if dark mode is enabled and foreground colours should be invertred
    + *
    + * @param style The GtkStyle in use, or NULL to use a cached version.
    + *
    + * @return @c TRUE if dark mode, @c FALSE otherwise
    + */
    +
    +gboolean pidgin_style_is_dark(GtkStyle *style);
    +
    +/**
    + * Lighten a color if dark mode is enabled.
    + *
    + * @param style The GtkStyle in use.
    + *
    + * @param color Color to be lightened. Transformed color will be written here.
    + */
    +
    +void pidgin_style_adjust_contrast(GtkStyle *style, GdkColor *color);
    +
    +/*@}*/
    +
    +G_END_DECLS
    +
    +#endif /* _PIDGINSTYLE_H_ */
    --- a/pidgin/gtkutils.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/pidgin/gtkutils.h Fri Nov 03 18:27:03 2017 +0100
    @@ -104,7 +104,7 @@
    * function puts both widgets in a nice GtkFrame. They're separated by an
    * attractive GtkSeparator.
    *
    - * Returns: The GtkFrame containing the toolbar and webview.
    + * Returns: (transfer full): The GtkFrame containing the toolbar and webview.
    */
    GtkWidget *pidgin_create_webview(gboolean editable, GtkWidget **webview_ret, GtkWidget **sw_ret);
    @@ -114,7 +114,7 @@
    *
    * Creates a small button
    *
    - * Returns: A GtkButton created from the image.
    + * Returns: (transfer full): A GtkButton created from the image.
    */
    GtkWidget *pidgin_create_small_button(GtkWidget *image);
    @@ -126,6 +126,8 @@
    * @resizable: Whether the window should be resizable (%TRUE) or not (%FALSE)
    *
    * Creates a new window
    + *
    + * Returns: (transfer full): A new window.
    */
    GtkWidget *pidgin_create_window(const char *title, guint border_width, const char *role, gboolean resizable);
    @@ -137,6 +139,8 @@
    * @resizable: Whether the window should be resizable (%TRUE) or not (%FALSE)
    *
    * Creates a new dialog window
    + *
    + * Returns: (transfer full): A new dialog window.
    */
    GtkWidget *pidgin_create_dialog(const char *title, guint border_width, const char *role, gboolean resizable);
    @@ -144,6 +148,8 @@
    * pidgin_create_video_widget:
    *
    * Creates a new drawing area suitable for displaying a video
    + *
    + * Returns: (transfer full): A new drawing area for displaying video.
    */
    GtkWidget *pidgin_create_video_widget(void);
    @@ -154,6 +160,8 @@
    * @spacing: the number of pixels to place by default between children
    *
    * Retrieves the main content box (vbox) from a pidgin dialog window
    + *
    + * Returns: (transfer none): The main vbox from @dialog.
    */
    GtkWidget *pidgin_dialog_get_vbox_with_properties(GtkDialog *dialog, gboolean homogeneous, gint spacing);
    @@ -162,19 +170,21 @@
    * @dialog: The dialog window
    *
    * Retrieves the main content box (vbox) from a pidgin dialog window
    + *
    + * Returns: (transfer none): the main vbox from @dialog.
    */
    GtkWidget *pidgin_dialog_get_vbox(GtkDialog *dialog);
    /**
    * pidgin_dialog_add_button:
    - * @dialog: The dialog window
    - * @label: The stock-id or the label for the button
    - * @callback: The callback function for the button
    - * @callbackdata: The user data for the callback function
    + * @dialog: The dialog window
    + * @label: The stock-id or the label for the button
    + * @callback: (scope call): The callback function for the button
    + * @callbackdata: The user data for the callback function
    *
    * Add a button to a dialog created by #pidgin_create_dialog.
    *
    - * Returns: The created button.
    + * Returns: (transfer full): The created button.
    */
    GtkWidget *pidgin_dialog_add_button(GtkDialog *dialog, const char *label,
    GCallback callback, gpointer callbackdata);
    @@ -184,6 +194,8 @@
    * @dialog: The dialog window
    *
    * Retrieves the action area (button box) from a pidgin dialog window
    + *
    + * Returns: (transfer none): The action area (button box) from @dialog.
    */
    GtkWidget *pidgin_dialog_get_action_area(GtkDialog *dialog);
    @@ -210,7 +222,7 @@
    /**
    * pidgin_toggle_sensitive_array:
    * @w: %NULL. Used for signal handlers.
    - * @data: The array containing the widgets to toggle.
    + * @data: (element-type GtkWidget): The array containing the widgets to toggle.
    *
    * Toggles the sensitivity of all widgets in a pointer array.
    */
    @@ -231,21 +243,21 @@
    *
    * Adds a separator to a menu.
    *
    - * Returns: The separator.
    + * Returns: (transfer full): The separator.
    */
    GtkWidget *pidgin_separator(GtkWidget *menu);
    /**
    * pidgin_new_check_item:
    - * @menu: The menu to which to append the check menu item.
    - * @str: The title to use for the newly created menu item.
    - * @cb: A function to call when the menu item is activated.
    - * @data: Data to pass to the signal function.
    - * @checked: The initial state of the check item
    + * @menu: The menu to which to append the check menu item.
    + * @str: The title to use for the newly created menu item.
    + * @cb: (scope call): A function to call when the menu item is activated.
    + * @data: Data to pass to the signal function.
    + * @checked: The initial state of the check item
    *
    * Creates a check menu item.
    *
    - * Returns: The newly created menu item.
    + * Returns: (transfer full): The newly created menu item.
    */
    GtkWidget *pidgin_new_check_item(GtkWidget *menu, const char *str,
    GCallback cb, gpointer data, gboolean checked);
    @@ -256,12 +268,12 @@
    * @mnemonic: The title for the menu item.
    * @icon: An icon to place to the left of the menu item,
    * or %NULL for no icon.
    - * @cb: A function to call when the menu item is activated.
    + * @cb: (scope call): A function to call when the menu item is activated.
    * @data: Data to pass to the signal function.
    *
    * Creates a menu item.
    *
    - * Returns: The newly created menu item.
    + * Returns: (transfer full): The newly created menu item.
    */
    GtkWidget *pidgin_new_menu_item(GtkWidget *menu, const char *mnemonic,
    const char *icon, GCallback cb, gpointer data);
    @@ -274,7 +286,7 @@
    *
    * Creates a button with the specified text and stock icon.
    *
    - * Returns: The button.
    + * Returns: (transfer full): The button.
    */
    GtkWidget *pidgin_pixbuf_button_from_stock(const char *text, const char *icon,
    PidginButtonOrientation style);
    @@ -285,7 +297,7 @@
    *
    * Creates a toolbar button with the stock icon.
    *
    - * Returns: The button.
    + * Returns: (transfer full): The button.
    */
    GtkWidget *pidgin_pixbuf_toolbar_button_from_stock(const char *stock);
    @@ -296,19 +308,19 @@
    *
    * Creates a HIG preferences frame.
    *
    - * Returns: The vbox to put things into.
    + * Returns: (transfer full): The vbox to put things into.
    */
    GtkWidget *pidgin_make_frame(GtkWidget *parent, const char *title);
    /**
    * pidgin_protocol_option_menu_new:
    - * @id: The protocol to select by default.
    - * @cb: The callback to call when a protocol is selected.
    + * @id: The protocol to select by default.
    + * @cb: (scope call): The callback to call when a protocol is selected.
    * @user_data: Data to pass to the callback function.
    *
    * Creates a drop-down option menu filled with protocols.
    *
    - * Returns: The drop-down option menu.
    + * Returns: (transfer full): The drop-down option menu.
    */
    GtkWidget *pidgin_protocol_option_menu_new(const char *id,
    GCallback cb,
    @@ -328,16 +340,16 @@
    /**
    * pidgin_account_option_menu_new:
    * @default_account: The account to select by default.
    - * @show_all: Whether or not to show all accounts, or just
    - * active accounts.
    - * @cb: The callback to call when an account is selected.
    - * @filter_func: A function for checking if an account should
    - * be shown. This can be NULL.
    - * @user_data: Data to pass to the callback function.
    + * @show_all: Whether or not to show all accounts, or just
    + * active accounts.
    + * @cb: (scope call): The callback to call when an account is selected.
    + * @filter_func: (scope call): A function for checking if an account should
    + * be shown. This can be NULL.
    + * @user_data: Data to pass to the callback function.
    *
    * Creates a drop-down option menu filled with accounts.
    *
    - * Returns: The drop-down option menu.
    + * Returns: (transfer full): The drop-down option menu.
    */
    GtkWidget *pidgin_account_option_menu_new(PurpleAccount *default_account,
    gboolean show_all, GCallback cb,
    @@ -350,7 +362,7 @@
    *
    * Gets the currently selected account from an account drop down box.
    *
    - * Returns: Returns the PurpleAccount that is currently selected.
    + * Returns: (transfer none): Returns the PurpleAccount that is currently selected.
    */
    PurpleAccount *pidgin_account_option_menu_get_selected(GtkWidget *optmenu);
    @@ -370,7 +382,7 @@
    * @optmenu: A menu for accounts, returned by pidgin_account_option_menu_new().
    * If @optmenu is not %NULL, it'll be updated when a username is chosen
    * from the autocomplete list.
    - * @filter_func: A function for checking if an autocomplete entry
    + * @filter_func: (scope call): A function for checking if an autocomplete entry
    * should be shown. This can be %NULL.
    * @user_data: The data to be passed to the filter_func function.
    *
    @@ -525,7 +537,7 @@
    * Returns the base image to represent the account, based on
    * the currently selected theme.
    *
    - * Returns: A newly-created pixbuf with a reference count of 1,
    + * Returns: (transfer full): A newly-created pixbuf with a reference count of 1,
    * or NULL if any of several error conditions occurred:
    * the file could not be opened, there was no loader
    * for the file's format, there was not enough memory
    @@ -542,7 +554,7 @@
    *
    * Creates a status icon for a given primitve
    *
    - * Returns: A GdkPixbuf, created from stock
    + * Returns: (transfer full): A GdkPixbuf, created from stock
    */
    GdkPixbuf * pidgin_create_status_icon(PurpleStatusPrimitive primitive, GtkWidget *w, const char *size);
    @@ -574,7 +586,7 @@
    *
    * Append a PurpleMenuAction to a menu.
    *
    - * Returns: The menuitem added.
    + * Returns: (transfer full): The menuitem added.
    */
    GtkWidget *pidgin_append_menu_action(GtkWidget *menu, PurpleMenuAction *act,
    gpointer gobject);
    @@ -614,7 +626,7 @@
    *
    * Creates a File Selection widget for choosing a buddy icon
    *
    - * Returns: The file dialog
    + * Returns: (transfer full): The file dialog
    */
    GtkWidget *pidgin_buddy_icon_chooser_new(GtkWindow *parent, void(*callback)(const char*,gpointer), gpointer data);
    @@ -646,7 +658,7 @@
    *
    * The type of callbacks passed to pidgin_make_mini_dialog().
    */
    -typedef void (*PidginUtilMiniDialogCallback)(gpointer user_data, GtkButton *);
    +typedef void (*PidginUtilMiniDialogCallback)(gpointer user_data, GtkButton *button);
    /**
    * pidgin_make_mini_dialog:
    @@ -673,7 +685,7 @@
    *
    * See <link linkend="pidgin-pidginstock">Stock Resources</link>.
    *
    - * Returns: A #PidginMiniDialog, suitable for passing to
    + * Returns: (transfer full): A #PidginMiniDialog, suitable for passing to
    * pidgin_blist_add_alert().
    */
    GtkWidget *pidgin_make_mini_dialog(PurpleConnection *handle,
    @@ -682,9 +694,24 @@
    /**
    * pidgin_make_mini_dialog_with_custom_icon:
    + * @custom_icon: A custom GdkPixbuf to use.
    + * @primary: The primary text
    + * @secondary: The secondary text, or %NULL for no description.
    + * @user_data: Data to pass to the callbacks
    + * @...: a %NULL-terminated list of button labels
    + * (<type>char *</type>) and callbacks
    + * (#PidginUtilMiniDialogCallback). @user_data will be
    + * passed as the first argument. (Callbacks may lack a
    + * second argument, or be %NULL to take no action when
    + * the corresponding button is pressed.) When a button is
    + * pressed, the callback (if any) will be called; when
    + * the callback returns the dialog will be destroyed.
    *
    * Does exactly what pidgin_make_mini_dialog() does, except you can specify
    * a custom icon for the dialog.
    + *
    + * Returns: (transfer full): A #PidginMiniDialog, suitable for passing to
    + * pidgin_blist_add_alert().
    */
    GtkWidget *pidgin_make_mini_dialog_with_custom_icon(PurpleConnection *gc,
    GdkPixbuf *custom_icon,
    @@ -748,13 +775,13 @@
    /**
    * pidgin_text_combo_box_entry_new:
    - * @default_item: Initial contents of GtkEntry
    - * @items: GList containing strings to add to GtkComboBox
    + * @default_item: Initial contents of GtkEntry
    + * @items: (element-type utf8): GList containing strings to add to GtkComboBox
    *
    * Create a simple text GtkComboBoxEntry equivalent
    *
    - * Returns: A newly created text GtkComboBox containing a GtkEntry
    - * child.
    + * Returns: (transfer full): A newly created text GtkComboBox containing a GtkEntry
    + * child.
    */
    GtkWidget *pidgin_text_combo_box_entry_new(const char *default_item, GList *items);
    @@ -798,7 +825,7 @@
    *
    * Add a labelled widget to a GtkBox
    *
    - * Returns: A GtkBox already added to the GtkBox containing the GtkLabel and the GtkWidget.
    + * Returns: (transfer full): A GtkBox already added to the GtkBox containing the GtkLabel and the GtkWidget.
    */
    GtkWidget *pidgin_add_widget_to_vbox(GtkBox *vbox, const char *widget_label, GtkSizeGroup *sg, GtkWidget *widget, gboolean expand, GtkWidget **p_label);
    @@ -809,7 +836,7 @@
    *
    * Create a GdkPixbuf from a chunk of image data.
    *
    - * Returns: A GdkPixbuf created from the image data, or NULL if
    + * Returns: (transfer full): A GdkPixbuf created from the image data, or NULL if
    * there was an error parsing the data.
    */
    GdkPixbuf *pidgin_pixbuf_from_data(const guchar *buf, gsize count);
    @@ -821,7 +848,7 @@
    *
    * Create a GdkPixbufAnimation from a chunk of image data.
    *
    - * Returns: A GdkPixbufAnimation created from the image data, or NULL if
    + * Returns: (transfer full): A GdkPixbufAnimation created from the image data, or NULL if
    * there was an error parsing the data.
    */
    GdkPixbufAnimation *pidgin_pixbuf_anim_from_data(const guchar *buf, gsize count);
    @@ -832,7 +859,7 @@
    *
    * Create a GdkPixbuf from a PurpleImage.
    *
    - * Returns: a GdkPixbuf created from the @image.
    + * Returns: (transfer full): a GdkPixbuf created from the @image.
    */
    GdkPixbuf *
    pidgin_pixbuf_from_image(PurpleImage *image);
    @@ -856,7 +883,7 @@
    * gdk-pixbuf where the aforementioned bug is fixed. However, it might be
    * nice to keep this function around for the debug message that it logs.
    *
    - * Returns: The GdkPixbuf if successful. Otherwise NULL is returned and
    + * Returns: (transfer full): The GdkPixbuf if successful. Otherwise NULL is returned and
    * a warning is logged.
    */
    GdkPixbuf *pidgin_pixbuf_new_from_file(const char *filename);
    @@ -882,7 +909,7 @@
    * gdk-pixbuf where the aforementioned bug is fixed. However, it might be
    * nice to keep this function around for the debug message that it logs.
    *
    - * Returns: The GdkPixbuf if successful. Otherwise NULL is returned and
    + * Returns: (transfer full): The GdkPixbuf if successful. Otherwise NULL is returned and
    * a warning is logged.
    */
    GdkPixbuf *pidgin_pixbuf_new_from_file_at_size(const char *filename, int width, int height);
    @@ -909,7 +936,7 @@
    * gdk-pixbuf where the aforementioned bug is fixed. However, it might be
    * nice to keep this function around for the debug message that it logs.
    *
    - * Returns: The GdkPixbuf if successful. Otherwise NULL is returned and
    + * Returns: (transfer full): The GdkPixbuf if successful. Otherwise NULL is returned and
    * a warning is logged.
    */
    GdkPixbuf *pidgin_pixbuf_new_from_file_at_scale(const char *filename, int width, int height, gboolean preserve_aspect_ratio);
    @@ -928,7 +955,7 @@
    * If new image is created, @src reference cound will be decreased and new image
    * with a ref count of 1 will be returned.
    *
    - * Returns: The image with proper sizing. %NULL in case of error.
    + * Returns: (transfer full): The image with proper sizing. %NULL in case of error.
    */
    GdkPixbuf *
    pidgin_pixbuf_scale_down(GdkPixbuf *src, guint max_width, guint max_height,
    @@ -944,6 +971,8 @@
    * @height: Desired widget height, or -1 for default
    *
    * Add scrollbars to a widget
    + *
    + * Returns: (transfer full): A scrolled window with @child packed inside of it.
    */
    GtkWidget *pidgin_make_scrollable(GtkWidget *child, GtkPolicyType hscrollbar_policy, GtkPolicyType vscrollbar_policy, GtkShadowType shadow_type, int width, int height);
    --- a/pidgin/gtkwebview.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/pidgin/gtkwebview.h Fri Nov 03 18:27:03 2017 +0100
    @@ -101,13 +101,13 @@
    GList *protocols;
    - void (*buttons_update)(PidginWebView *, PidginWebViewButtons);
    - void (*toggle_format)(PidginWebView *, PidginWebViewButtons);
    - void (*clear_format)(PidginWebView *);
    - void (*update_format)(PidginWebView *);
    - void (*changed)(PidginWebView *);
    - void (*html_appended)(PidginWebView *, WebKitDOMRange *);
    - gboolean (*insert_image)(PidginWebView *, PurpleImage *);
    + void (*buttons_update)(PidginWebView *webview, PidginWebViewButtons buttons);
    + void (*toggle_format)(PidginWebView *webview, PidginWebViewButtons buttons);
    + void (*clear_format)(PidginWebView *webview);
    + void (*update_format)(PidginWebView *webview);
    + void (*changed)(PidginWebView *webview);
    + void (*html_appended)(PidginWebView *webview, WebKitDOMRange *range);
    + gboolean (*insert_image)(PidginWebView *webview, PurpleImage *image);
    };
    G_BEGIN_DECLS
    @@ -602,7 +602,7 @@
    pidgin_webview_get_DOM_height(PidginWebView *webview);
    /**
    - * pidgin_webview_get_DOM_height:
    + * pidgin_webview_get_font_size:
    * @webview: the PidginWebView.
    *
    * Look for the font size used on the current webview
    @@ -666,7 +666,7 @@
    *
    * Returns the toolbar associated with the webview.
    *
    - * Returns: the toolbar.
    + * Returns: (transfer none): the toolbar.
    */
    GtkWidget *
    pidgin_webview_get_toolbar(PidginWebView *webview);
    --- a/pidgin/gtkwebviewtoolbar.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/pidgin/gtkwebviewtoolbar.h Fri Nov 03 18:27:03 2017 +0100
    @@ -110,7 +110,7 @@
    *
    * Returns the wide toolbar variant widget for the given @toolbar.
    *
    - * Returns: the wide toolbar variant.
    + * Returns: (transfer none): the wide toolbar variant.
    */
    GtkWidget *
    pidgin_webviewtoolbar_get_wide_view(PidginWebViewToolbar *toolbar);
    @@ -121,7 +121,7 @@
    *
    * Returns the lean toolbar variant widget for the given @toolbar.
    *
    - * Returns: the lean toolbar variant.
    + * Returns: (transfer none): the lean toolbar variant.
    */
    GtkWidget *
    pidgin_webviewtoolbar_get_lean_view(PidginWebViewToolbar *toolbar);
    --- a/pidgin/meson.build Mon Oct 02 13:27:23 2017 +0200
    +++ b/pidgin/meson.build Fri Nov 03 18:27:03 2017 +0100
    @@ -35,6 +35,7 @@
    'gtksound.c',
    'gtkstatus-icon-theme.c',
    'gtkstatusbox.c',
    + 'gtkstyle.c',
    'gtkutils.c',
    'gtkwebview.c',
    'gtkwebviewtoolbar.c',
    @@ -84,6 +85,7 @@
    'gtksound.h',
    'gtkstatus-icon-theme.h',
    'gtkstatusbox.h',
    + 'gtkstyle.h',
    'pidginstock.h',
    'gtkutils.h',
    'gtkwebview.h',
    @@ -219,7 +221,7 @@
    gnome.generate_gir(libpidgin,
    sources : introspection_sources,
    - includes : ['GObject-2.0', 'Gtk-3.0', libpurple_gir[0]],
    + includes : ['GObject-2.0', 'Gtk-3.0', libpurple_gir[0], 'WebKit-3.0'],
    namespace : 'Pidgin',
    symbol_prefix : 'pidgin',
    identifier_prefix : 'Pidgin',
    --- a/pidgin/minidialog.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/pidgin/minidialog.h Fri Nov 03 18:27:03 2017 +0100
    @@ -187,7 +187,7 @@
    /**
    * pidgin_mini_dialog_set_link_callback:
    * @mini_dialog: a mini-dialog
    - * @cb: the callback to invoke
    + * @cb: (scope call): the callback to invoke
    * @user_data: the user data to pass to the callback
    *
    * Sets a callback which gets invoked when a hyperlink in the dialog's description is clicked on.
    @@ -218,7 +218,7 @@
    * pidgin_mini_dialog_add_button:
    * @mini_dialog: a mini-dialog
    * @text: the text to display on the new button
    - * @clicked_cb: the function to call when the button is clicked
    + * @clicked_cb: (scope call): the function to call when the button is clicked
    * @user_data: arbitrary data to pass to @clicked_cb when it is
    * called.
    *
    @@ -232,6 +232,11 @@
    /**
    * pidgin_mini_dialog_add_non_closing_button:
    + * @mini_dialog: a mini-dialog
    + * @text: the text to display on the new button
    + * @clicked_cb: (scope call): the function to call when the button is clicked
    + * @user_data: arbitrary data to pass to @clicked_cb when it is
    + * called.
    *
    * Equivalent to pidgin_mini_dialog_add_button(), the only difference
    * is that the mini-dialog won't be closed after the button is clicked.
    --- a/pidgin/pidgintooltip.h Mon Oct 02 13:27:23 2017 +0200
    +++ b/pidgin/pidgintooltip.h Fri Nov 03 18:27:03 2017 +0100
    @@ -70,10 +70,10 @@
    /**
    * pidgin_tooltip_setup_for_treeview:
    - * @tree: The treeview
    - * @userdata: The userdata to send to the callback functions
    - * @create_cb: Callback function to create the tooltip for a GtkTreePath
    - * @paint_cb: Callback function to paint the tooltip
    + * @tree: The treeview
    + * @userdata: The userdata to send to the callback functions
    + * @create_cb: (scope call): Callback function to create the tooltip for a GtkTreePath
    + * @paint_cb: (scope call): Callback function to paint the tooltip
    *
    * Setup tooltip drawing functions for a treeview.
    *
    @@ -84,10 +84,10 @@
    /**
    * pidgin_tooltip_setup_for_widget:
    - * @widget: The widget
    - * @userdata: The userdata to send to the callback functions
    - * @create_cb: Callback function to create the tooltip for the widget
    - * @paint_cb: Callback function to paint the tooltip
    + * @widget: The widget
    + * @userdata: The userdata to send to the callback functions
    + * @create_cb: (scope call): Callback function to create the tooltip for the widget
    + * @paint_cb: (scope call): Callback function to paint the tooltip
    *
    * Setup tooltip drawing functions for any widget.
    *
    @@ -107,8 +107,8 @@
    * pidgin_tooltip_show:
    * @widget: The widget the tooltip is for
    * @userdata: The userdata to send to the callback functions
    - * @create_cb: Callback function to create the tooltip from the GtkTreePath
    - * @paint_cb: Callback function to paint the tooltip
    + * @create_cb: (scope call): Callback function to create the tooltip from the GtkTreePath
    + * @paint_cb: (scope call): Callback function to paint the tooltip
    *
    * Create and show a tooltip.
    */