--- a/doc/reference/libpurple/libpurple-docs.xml Sat Jan 23 20:31:28 2021 -0600
+++ b/doc/reference/libpurple/libpurple-docs.xml Sun Jan 24 02:46:43 2021 -0600
@@ -60,7 +60,6 @@
<xi:include href="xml/nat-pmp.xml" />
<xi:include href="xml/network.xml" />
<xi:include href="xml/notify.xml" />
- <xi:include href="xml/options.xml" />
<xi:include href="xml/plugins.xml" />
<xi:include href="xml/prefs.xml" />
<xi:include href="xml/pluginpref.xml" />
@@ -79,6 +78,7 @@
<xi:include href="xml/purpleimconversation.xml" />
<xi:include href="xml/purplekeyvaluepair.xml" />
<xi:include href="xml/purplemarkup.xml" />
+ <xi:include href="xml/purpleoptions.xml" /> <xi:include href="xml/purplepresence.xml" />
<xi:include href="xml/purpleprotocolattention.xml" />
<xi:include href="xml/purpleprotocolchat.xml" />
--- a/libpurple/meson.build Sat Jan 23 20:31:28 2021 -0600
+++ b/libpurple/meson.build Sun Jan 24 02:46:43 2021 -0600
@@ -36,7 +36,6 @@
@@ -57,6 +56,7 @@
'purpleprotocolattention.c',
@@ -126,7 +126,6 @@
@@ -147,6 +146,7 @@
'purpleprotocolattention.h',
--- a/libpurple/options.c Sat Jan 23 20:31:28 2021 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
- * Purple is the legal property of its developers, whose names are too numerous
- * to list here. Please refer to the COPYRIGHT file distributed with this
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
-#include <glib/gi18n-lib.h>
-/******************************************************************************
- *****************************************************************************/
-debug_cb(const gchar *option_name, const gchar *value,
- gpointer data, GError **error)
- purple_debug_set_enabled(TRUE);
- if (purple_strequal(value, "colored")) {
- purple_debug_set_colored(TRUE);
-force_online_cb(const gchar *option_name, const gchar *value,
- gpointer data, GError **error)
- purple_network_force_online();
-/******************************************************************************
- *****************************************************************************/
- * purple_get_option_group:
- * Returns a #GOptionGroup for the commandline arguments recognized by
- * LibPurple. You should add this option group to your #GOptionContext with
- * g_option_context_add_group(), if you are using g_option_context_parse() to
- * parse your commandline arguments.
- * Return Value: (transfer full): a #GOptionGroup for the commandline arguments
- * recognized by LibPurple.
-purple_get_option_group(void) {
- GOptionGroup *group = NULL;
- GOptionEntry entries[] = {
- "debug", 'd', G_OPTION_FLAG_OPTIONAL_ARG,
- G_OPTION_ARG_CALLBACK, &debug_cb,
- _("print debugging messages to stdout"),
- "force-online", 'f', G_OPTION_FLAG_NO_ARG,
- G_OPTION_ARG_CALLBACK, &force_online_cb,
- _("force online, regardless of network status"),
- group = g_option_group_new(
- _("LibPurple options"),
- _("Show LibPurple Options"),
- g_option_group_add_entries(group, entries);
--- a/libpurple/options.h Sat Jan 23 20:31:28 2021 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
- * Purple is the legal property of its developers, whose names are too numerous
- * to list here. Please refer to the COPYRIGHT file distributed with this
- * 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
-#if !defined(PURPLE_GLOBAL_HEADER_INSIDE) && !defined(PURPLE_COMPILATION)
-# error "only <purple.h> may be included directly"
-#ifndef PURPLE_OPTIONS_H
-#define PURPLE_OPTIONS_H
- * @section_id: libpurple-options
- * @short_description: <filename>options.h</filename>
- * The functions defined here are to help in handling command line options.
-GOptionGroup *purple_get_option_group(void);
-#endif /* PURPLE_OPTIONS_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/libpurple/purpleoptions.c Sun Jan 24 02:46:43 2021 -0600
@@ -0,0 +1,89 @@
+ * Purple - Internet Messaging Library + * Copyright (C) Pidgin Developers <devel@pidgin.im> + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * 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, see <https://www.gnu.org/licenses/>. +#include <glib/gi18n-lib.h> +#include "purpleoptions.h" +/****************************************************************************** + *****************************************************************************/ +purple_options_debug_cb(const gchar *option_name, const gchar *value, + gpointer data, GError **error) + purple_debug_set_enabled(TRUE); + if (purple_strequal(value, "colored")) { + purple_debug_set_colored(TRUE); +purple_options_force_online_cb(const gchar *option_name, const gchar *value, + gpointer data, GError **error) + purple_network_force_online(); +/****************************************************************************** + *****************************************************************************/ +purple_get_option_group(void) { + GOptionGroup *group = NULL; + GOptionEntry entries[] = { + "debug", 'd', G_OPTION_FLAG_OPTIONAL_ARG, + G_OPTION_ARG_CALLBACK, &purple_options_debug_cb, + _("print debugging messages to stdout"), + "force-online", 'f', G_OPTION_FLAG_NO_ARG, + G_OPTION_ARG_CALLBACK, &purple_options_force_online_cb, + _("force online, regardless of network status"), + group = g_option_group_new( + _("LibPurple options"), + _("Show LibPurple Options"), + g_option_group_add_entries(group, entries); --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/libpurple/purpleoptions.h Sun Jan 24 02:46:43 2021 -0600
@@ -0,0 +1,58 @@
+ * Purple - Internet Messaging Library + * Copyright (C) Pidgin Developers <devel@pidgin.im> + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * 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, see <https://www.gnu.org/licenses/>. +#if !defined(PURPLE_GLOBAL_HEADER_INSIDE) && !defined(PURPLE_COMPILATION) +# error "only <purple.h> may be included directly" +#ifndef PURPLE_OPTIONS_H +#define PURPLE_OPTIONS_H + * SECTION:purpleoptions + * @section_id: libpurple-purpleoptions + * @short_description: Command line argument integration + * @title: Command Line Argument Integration + * The functions defined here are to help in handling command line options. + * purple_get_option_group: + * Returns a #GOptionGroup for the commandline arguments recognized by + * LibPurple. You should add this option group to your #GOptionContext with + * g_option_context_add_group(), if you are using g_option_context_parse() to + * parse your commandline arguments. + * Returns: (transfer full): a #GOptionGroup for the commandline arguments + * recognized by LibPurple. +GOptionGroup *purple_get_option_group(void); +#endif /* PURPLE_OPTIONS_H */ --- a/po/POTFILES.in Sat Jan 23 20:31:28 2021 -0600
+++ b/po/POTFILES.in Sun Jan 24 02:46:43 2021 -0600
@@ -61,7 +61,6 @@
libpurple/plugins/autoaccept.c
libpurple/plugins/buddynote.c
@@ -254,6 +253,7 @@
libpurple/purplekeyvaluepair.c
libpurple/purplemessage.c
+libpurple/purpleoptions.c libpurple/purplepresence.c
libpurple/purpleprotocolattention.c
libpurple/purpleprotocolchat.c