Completed page 1 of the Pidgin Account Assistant
--- a/libpurple/protocol.c Tue Jun 08 22:34:45 2021 -0500
+++ b/libpurple/protocol.c Thu Jul 15 01:01:40 2021 +0530
@@ -28,6 +28,7 @@
@@ -36,7 +37,7 @@
PurpleProtocolOptions options;
@@ -69,6 +70,17 @@
+purple_protocol_set_description(PurpleProtocol *protocol, const gchar *description) { + PurpleProtocolPrivate *priv = NULL; + priv = purple_protocol_get_instance_private(protocol); + g_free(priv->description); + priv->description = g_strdup(description); + g_object_notify_by_pspec(G_OBJECT(protocol), properties[PROP_DESCRIPTION]); purple_protocol_set_options(PurpleProtocol *protocol,
PurpleProtocolOptions options)
@@ -96,6 +108,9 @@
g_value_set_string(value, purple_protocol_get_name(protocol));
+ g_value_set_string(value, purple_protocol_get_description(protocol)); g_value_set_flags(value, purple_protocol_get_options(protocol));
@@ -118,6 +133,9 @@
purple_protocol_set_name(protocol, g_value_get_string(value));
+ purple_protocol_set_description(protocol, g_value_get_string(value)); purple_protocol_set_options(protocol, g_value_get_flags(value));
@@ -141,7 +159,7 @@
g_clear_pointer(&priv->id, g_free);
g_clear_pointer(&priv->name, g_free);
+ g_clear_pointer(&priv->description, g_free); /* I'm not sure that we can finalize a protocol plugin if an account is
* still using it.. Right now accounts don't ref protocols, but maybe
@@ -203,6 +221,17 @@
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
+ * PurpleProtocol::description: + * The description to show in user interface for the protocol. + properties[PROP_DESCRIPTION] = g_param_spec_string( + "description", "description", + "The description of the protocol to show in the user interface", + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); * PurpleProtocol::options:
* The #PurpleProtocolOptions for the protocol.
@@ -242,6 +271,17 @@
+purple_protocol_get_description(PurpleProtocol *protocol) { + PurpleProtocolPrivate *priv = NULL; + g_return_val_if_fail(PURPLE_IS_PROTOCOL(protocol), NULL); + priv = purple_protocol_get_instance_private(protocol); + return priv->description; purple_protocol_get_options(PurpleProtocol *protocol) {
PurpleProtocolPrivate *priv = NULL;
--- a/libpurple/protocol.h Tue Jun 08 22:34:45 2021 -0500
+++ b/libpurple/protocol.h Thu Jul 15 01:01:40 2021 +0530
@@ -199,6 +199,18 @@
const gchar *purple_protocol_get_name(PurpleProtocol *protocol);
+ * purple_protocol_get_description: + * @protocol: The #PurpleProtocol instance. + * Gets the description of a protocol. + * Returns: The Description of the protocol. +const gchar *purple_protocol_get_description(PurpleProtocol *protocol); * purple_protocol_get_options:
* @protocol: The #PurpleProtocol instance.
--- a/libpurple/protocols/bonjour/bonjour.c Tue Jun 08 22:34:45 2021 -0500
+++ b/libpurple/protocols/bonjour/bonjour.c Thu Jul 15 01:01:40 2021 +0530
@@ -753,6 +753,7 @@
+ "description","Bonjour is a serverless protocol, developed by Apple", "options", OPT_PROTO_NO_PASSWORD,
--- a/libpurple/protocols/facebook/facebook.c Tue Jun 08 22:34:45 2021 -0500
+++ b/libpurple/protocols/facebook/facebook.c Thu Jul 15 01:01:40 2021 +0530
@@ -1706,6 +1706,7 @@
fb_protocol = g_object_new(FACEBOOK_TYPE_PROTOCOL,
+ "description","Facebook is a chat app", "options", OPT_PROTO_CHAT_TOPIC,
--- a/libpurple/protocols/gg/gg.c Tue Jun 08 22:34:45 2021 -0500
+++ b/libpurple/protocols/gg/gg.c Thu Jul 15 01:01:40 2021 +0530
@@ -1209,6 +1209,7 @@
+ "description", "Gadu-Gadu is a Polish instant messaging client", --- a/libpurple/protocols/irc/irc.c Tue Jun 08 22:34:45 2021 -0500
+++ b/libpurple/protocols/irc/irc.c Thu Jul 15 01:01:40 2021 +0530
@@ -1135,6 +1135,7 @@
+ "description","IRC is a messaging client", "options", OPT_PROTO_CHAT_TOPIC | OPT_PROTO_PASSWORD_OPTIONAL |
OPT_PROTO_SLASH_COMMANDS_NATIVE,
--- a/libpurple/protocols/jabber/xmpp.c Tue Jun 08 22:34:45 2021 -0500
+++ b/libpurple/protocols/jabber/xmpp.c Thu Jul 15 01:01:40 2021 +0530
@@ -146,6 +146,7 @@
+ "description", "Extensible Messaging and Presence Protocol for IM, voice and video", --- a/libpurple/protocols/novell/novell.c Tue Jun 08 22:34:45 2021 -0500
+++ b/libpurple/protocols/novell/novell.c Thu Jul 15 01:01:40 2021 +0530
@@ -3625,6 +3625,7 @@
+ "description","GroupWise is a messaging and collaboration platform from Micro Focus", --- a/libpurple/protocols/sametime/sametime.c Tue Jun 08 22:34:45 2021 -0500
+++ b/libpurple/protocols/sametime/sametime.c Thu Jul 15 01:01:40 2021 +0530
@@ -68,6 +68,7 @@
#define PROTOCOL_ID "prpl-meanwhile"
#define PROTOCOL_NAME "Sametime"
+#define PROTOCOL_DESCRIPTION "Sametime chat by Lotus" /* considering that there's no display of this information for protocols,
@@ -5385,6 +5386,7 @@
+ "description", PROTOCOL_DESCRIPTION, --- a/libpurple/protocols/silc/silc.c Tue Jun 08 22:34:45 2021 -0500
+++ b/libpurple/protocols/silc/silc.c Thu Jul 15 01:01:40 2021 +0530
@@ -2341,6 +2341,7 @@
SILCPURPLE_TYPE_PROTOCOL,
+ "description", "SILC - Secure Internet Live Conferencing protocol", "options", OPT_PROTO_CHAT_TOPIC | OPT_PROTO_UNIQUE_CHATNAME |
OPT_PROTO_PASSWORD_OPTIONAL |
OPT_PROTO_SLASH_COMMANDS_NATIVE,
--- a/libpurple/protocols/zephyr/zephyr.c Tue Jun 08 22:34:45 2021 -0500
+++ b/libpurple/protocols/zephyr/zephyr.c Thu Jul 15 01:01:40 2021 +0530
@@ -1713,6 +1713,7 @@
+ "description", "Zephyr is an instant messaging protocol, created at MIT", "options", OPT_PROTO_CHAT_TOPIC | OPT_PROTO_NO_PASSWORD,
--- a/pidgin/assistant/pidginaccountassistant.c Tue Jun 08 22:34:45 2021 -0500
+++ b/pidgin/assistant/pidginaccountassistant.c Thu Jul 15 01:01:40 2021 +0530
@@ -23,7 +23,7 @@
#include "pidginaccountassistant.h"
+#include "pidginassistantprotocolpage.h" struct _PidginAccountAssistant {
@@ -69,6 +69,19 @@
/******************************************************************************
+ *****************************************************************************/ +pidgin_account_assistant_constructed(GObject *object) + G_OBJECT_CLASS(pidgin_account_assistant_parent_class)->constructed(object); + gtk_assistant_append_page(GTK_ASSISTANT(object), pidgin_assistant_protocol_page_new()); +/****************************************************************************** *****************************************************************************/
@@ -80,8 +93,11 @@
pidgin_account_assistant_class_init(PidginAccountAssistantClass *klass)
+ GObjectClass *obj_class = G_OBJECT_CLASS(klass); GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass);
+ obj_class->constructed = pidgin_account_assistant_constructed; gtk_widget_class_set_template_from_resource(
"/im/pidgin/Pidgin/Assistant/accountassistant.ui"
--- a/pidgin/assistant/pidginaccountassistant.h Tue Jun 08 22:34:45 2021 -0500
+++ b/pidgin/assistant/pidginaccountassistant.h Thu Jul 15 01:01:40 2021 +0530
@@ -56,7 +56,7 @@
* PidginAccountAssistant:
- * A widget that displays a credential provider.
+ * A widget that helps users create accounts. --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pidgin/assistant/pidginassistantprotocolpage.c Thu Jul 15 01:01:40 2021 +0530
@@ -0,0 +1,154 @@
+ * Pidgin - Internet Messenger + * Copyright (C) Pidgin Developers <devel@pidgin.im> + * 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 + * 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 "pidginassistantprotocolpage.h" +#include "pidginassistantprotocolrow.h" +struct _PidginAssistantProtocolPage { + HdyPreferencesPage parent; + GtkWidget *protocol_list; +G_DEFINE_TYPE(PidginAssistantProtocolPage, pidgin_assistant_protocol_page, + HDY_TYPE_PREFERENCES_PAGE) +/****************************************************************************** + *****************************************************************************/ +pidgin_assistant_protocol_page_create_row(PurpleProtocol *protocol, + GtkListBox *box = GTK_LIST_BOX(data); + row = pidgin_assistant_protocol_row_new(protocol); + gtk_list_box_prepend(box, row); +pidgin_assistant_protocol_page_sort_rows(GtkListBoxRow *row1, GtkListBoxRow *row2, + G_GNUC_UNUSED gpointer user_data) +pidgin_assistant_protocol_page_set_selected_protocol(PidginAssistantProtocolPage *page, + rows = gtk_container_get_children(GTK_CONTAINER(page->protocol_list)); + for (; rows; rows = g_list_delete_link(rows, rows)) { + PidginAssistantProtocolRow *row = NULL; + PurpleProtocol *protocol = NULL; + const gchar *id = NULL; + row = PIDGIN_ASSISTANT_PROTOCOL_ROW(rows->data); + protocol = pidgin_assistant_protocol_row_get_protocol(row); + id = purple_protocol_get_id(protocol); + pidgin_assistant_protocol_row_set_selected(row, + purple_strequal(new_id, id)); +pidgin_assistant_protocol_page_selected_protocol_changed_cb(const gchar *name, + PidginAssistantProtocolPage *page = PIDGIN_ASSISTANT_PROTOCOL_PAGE(data); + pidgin_assistant_protocol_page_set_selected_protocol(page, (const gchar *)value); +/****************************************************************************** + * GObject Implementation + *****************************************************************************/ +pidgin_assistant_protocol_page_finalize(GObject *obj) { + G_OBJECT_CLASS(pidgin_assistant_protocol_page_parent_class)->finalize(obj); +pidgin_assistant_protocol_page_init(PidginAssistantProtocolPage *page) { + PurpleProtocolManager *manager = NULL; + const gchar *selected = NULL; + GList *protocols = NULL; + manager = purple_protocol_manager_get_default(); + protocols = purple_protocol_manager_get_all(manager); + gtk_widget_init_template(GTK_WIDGET(page)); + g_list_foreach(protocols, pidgin_assistant_protocol_page_create_row, + g_list_free(protocols); + // purple_protocol_manager_get_all(manager); + gtk_list_box_set_sort_func(GTK_LIST_BOX(page->protocol_list), + pidgin_assistant_protocol_page_sort_rows,NULL, NULL); + selected = purple_protocol_get_name(protocols); + pidgin_assistant_protocol_page_set_selected_protocol(page, selected); +pidgin_assistant_protocol_page_class_init(PidginAssistantProtocolPageClass *klass) { + GObjectClass *obj_class = G_OBJECT_CLASS(klass); + GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass); + obj_class->finalize = pidgin_assistant_protocol_page_finalize; + gtk_widget_class_set_template_from_resource( + "/im/pidgin/Pidgin/Assistant/assistantprotocolpage.ui" + gtk_widget_class_bind_template_child(widget_class, PidginAssistantProtocolPage, + gtk_widget_class_bind_template_callback(widget_class, + pidgin_assistant_protocol_page_selected_protocol_changed_cb); +/****************************************************************************** + *****************************************************************************/ +pidgin_assistant_protocol_page_new(void) { + return GTK_WIDGET(g_object_new(PIDGIN_TYPE_ASSISTANT_PROTOCOL_PAGE, NULL)); --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pidgin/assistant/pidginassistantprotocolpage.h Thu Jul 15 01:01:40 2021 +0530
@@ -0,0 +1,81 @@
+ * Pidgin - Internet Messenger + * Copyright (C) Pidgin Developers <devel@pidgin.im> + * 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 + * 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(PIDGIN_GLOBAL_HEADER_INSIDE) && !defined(PIDGIN_COMPILATION) +# error "only <pidgin.h> may be included directly" +#ifndef PIDGIN_ASSISTANT_PROTOCOL_PAGE_H +#define PIDGIN_ASSISTANT_PROTOCOL_PAGE_H + * SECTION:pidginassistantprotocolpage + * @section_id: pidgin-pidginassistantprotocolpage + * @short_description: The protocol widget for selecting protocol from asssistant. + * @title: Protocol selection widget + * #PidginAssistantProtocolPage is a widget for the account assistant window to let users + * choose and configure their protocol provider. + * PIDGIN_TYPE_ASSISTANT_PROTOCOL_PAGE: + * The standard _get_type macro for #PidginAssistantProtocolPage. +#define PIDGIN_TYPE_ASSISTANT_PROTOCOL_PAGE (pidgin_assistant_protocol_page_get_type()) +G_DECLARE_FINAL_TYPE(PidginAssistantProtocolPage, + pidgin_assistant_protocol_page, + PIDGIN, ASSISTANT_PROTOCOL_PAGE, + * PidginAssistantProtocolPage: + * A widget that displays a page of protocols in assistant. + * pidgin_assistant_protocol_page_new: + * Creates a new #PidginAssistantProtocolPage instance. + * Returns: (transfer full): The new #PidginAssistantProtocolPage instance. +GtkWidget *pidgin_assistant_protocol_page_new(void); +#endif /* PIDGIN_ASSISTANT_PROTOCOL_PAGE_H */ \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pidgin/assistant/pidginassistantprotocolrow.c Thu Jul 15 01:01:40 2021 +0530
@@ -0,0 +1,205 @@
+ * Pidgin - Internet Messenger + * Copyright (C) Pidgin Developers <devel@pidgin.im> + * 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 + * 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 "pidginassistantprotocolrow.h" +struct _PidginAssistantProtocolRow { + PurpleProtocol *protocol; +static GParamSpec *properties[N_PROPERTIES] = { NULL, }; +G_DEFINE_TYPE(PidginAssistantProtocolRow, pidgin_assistant_protocol_row, +/****************************************************************************** + *****************************************************************************/ +pidgin_assistant_protocol_row_set_protocol(PidginAssistantProtocolRow *row, + PurpleProtocol *protocol) + if(!g_set_object(&row->protocol, protocol)) { + if(PURPLE_IS_PROTOCOL(protocol)) { + hdy_preferences_row_set_title( + HDY_PREFERENCES_ROW(row), + purple_protocol_get_name(protocol)); + hdy_action_row_set_subtitle( + purple_protocol_get_description(protocol)); + /* Notify that we changed. */ + g_object_notify_by_pspec(G_OBJECT(row), properties[PROP_PROTOCOL]); +/****************************************************************************** + * GObject Implementation + *****************************************************************************/ +pidgin_assistant_protocol_row_get_property(GObject *obj, guint param_id, GValue *value, + PidginAssistantProtocolRow *protocol = PIDGIN_ASSISTANT_PROTOCOL_ROW(obj); + g_value_set_object(value, pidgin_assistant_protocol_row_get_protocol(protocol)); + g_value_set_boolean(value, pidgin_assistant_protocol_row_get_protocol(protocol)); + G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec); +pidgin_assistant_protocol_row_set_property(GObject *obj, guint param_id, const GValue *value, + PidginAssistantProtocolRow *protocol = PIDGIN_ASSISTANT_PROTOCOL_ROW(obj); + pidgin_assistant_protocol_row_set_protocol(protocol, g_value_get_object(value)); + pidgin_assistant_protocol_row_set_selected(protocol, g_value_get_boolean(value)); + G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec); +pidgin_assistant_protocol_row_finalize(GObject *obj) + PidginAssistantProtocolRow *row = PIDGIN_ASSISTANT_PROTOCOL_ROW(obj); + g_clear_object(&row->protocol); +pidgin_assistant_protocol_row_init(PidginAssistantProtocolRow *row) { + gtk_widget_init_template(GTK_WIDGET(row)); +pidgin_assistant_protocol_row_class_init(PidginAssistantProtocolRowClass *klass) { + GObjectClass *obj_class = G_OBJECT_CLASS(klass); + GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass); + obj_class->get_property = pidgin_assistant_protocol_row_get_property; + obj_class->set_property = pidgin_assistant_protocol_row_set_property; + obj_class->finalize = pidgin_assistant_protocol_row_finalize; + * PidginAssistantProtocolRow::id: + * The identifier for the protocol. + properties[PROP_PROTOCOL] = g_param_spec_object( + "protocol", "protocol", + "The identifier for the protocol", + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); + * PidginAssistantProtocolRow::selected + * Whether the #PurpleProtocol is currently selected. + properties[PROP_SELECTED] = g_param_spec_boolean( + "selected", "selected", + "Marks the selected PurpleProtocol", + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); + g_object_class_install_properties(obj_class, N_PROPERTIES, properties); + gtk_widget_class_set_template_from_resource( + "/im/pidgin/Pidgin/Assistant/assistantprotocolrow.ui" + gtk_widget_class_bind_template_child(widget_class, + PidginAssistantProtocolRow, +/****************************************************************************** + *****************************************************************************/ +pidgin_assistant_protocol_row_new(PurpleProtocol *protocol) { + g_return_val_if_fail(PURPLE_IS_PROTOCOL(protocol), NULL); + return GTK_WIDGET(g_object_new(PIDGIN_TYPE_ASSISTANT_PROTOCOL_ROW, + "protocol", protocol, NULL)); +pidgin_assistant_protocol_row_get_protocol(PidginAssistantProtocolRow *row) { +pidgin_assistant_protocol_row_get_selected(PidginAssistantProtocolRow *row) { + g_return_val_if_fail(PIDGIN_IS_ASSISTANT_PROTOCOL_ROW(row), FALSE); + return gtk_widget_get_visible(row->selected); +pidgin_assistant_protocol_row_set_selected(PidginAssistantProtocolRow *row, + g_return_if_fail(PIDGIN_IS_ASSISTANT_PROTOCOL_ROW(row)); + gtk_widget_set_visible(row->selected, selected); + g_object_notify_by_pspec(G_OBJECT(row), properties[PROP_SELECTED]); --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pidgin/assistant/pidginassistantprotocolrow.h Thu Jul 15 01:01:40 2021 +0530
@@ -0,0 +1,118 @@
+ * Pidgin - Internet Messenger + * Copyright (C) Pidgin Developers <devel@pidgin.im> + * 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 + * 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(PIDGIN_GLOBAL_HEADER_INSIDE) && !defined(PIDGIN_COMPILATION) +# error "only <pidgin.h> may be included directly" +#ifndef PIDGIN_ASSISTANT_PROTOCOL_ROW_H +#define PIDGIN_ASSISTANT_PROTOCOL_ROW_H + * SECTION:pidginassistantprotocolrow + * @section_id: pidgin-pidginassistantprotocolrow + * @short_description: The protocol widget for selecting protocol from asssistant. + * @title: Protocol selection widget + * #PidginAssistantProtocolRow is a widget for the account assistant window to let users + * choose and configure their protocol provider. + * PIDGIN_TYPE_ASSISTANT_PROTOCOL_ROW: + * The standard _get_type macro for #PidginAssistantProtocolRow. +#define PIDGIN_TYPE_ASSISTANT_PROTOCOL_ROW (pidgin_assistant_protocol_row_get_type()) +G_DECLARE_FINAL_TYPE(PidginAssistantProtocolRow, + pidgin_assistant_protocol_row, + PIDGIN, ASSISTANT_PROTOCOL_ROW, HdyActionRow) + * PidginAssistantProtocolRow: + * A widget that displays a page of protocols in assistant. + * pidgin_assistant_protocol_row_new: + * Creates a new #PidginAssistantProtocolRow instance. + * Returns: (transfer full): The new #PidginAssistantProtocol instance. +GtkWidget *pidgin_assistant_protocol_row_new(PurpleProtocol *protocol); + * pidgin_assistant_protocol_row_get_provider: + * @row: The row instance. + * Gets the #PidginAssistantProtocol displayed by this widget. + * Returns: (transfer none): The displayed #PidginAssistantProtocol. +PurpleProtocol *pidgin_assistant_protocol_row_get_protocol(PidginAssistantProtocolRow *row); + * pidgin_assistant_protocol_row_get_selected: + * @row: The row instance. + * Gets whether the row is displayed as selected. + * Returns: Whether the row is selected. +gboolean pidgin_assistant_protocol_row_get_selected(PidginAssistantProtocolRow *row); + * pidgin_assistant_protocol_row_set_selected: + * @row: The row instance. + * @selected: Whether to display as selected. + * Sets whether the row is displayed as selected. +void pidgin_assistant_protocol_row_set_selected(PidginAssistantProtocolRow *row, gboolean selected); +#endif /* PIDGIN_ASSISTANT_PROTOCOL_ROW_H */ --- a/pidgin/meson.build Tue Jun 08 22:34:45 2021 -0500
+++ b/pidgin/meson.build Thu Jul 15 01:01:40 2021 +0530
@@ -1,5 +1,7 @@
'assistant/pidginaccountassistant.c',
+ 'assistant/pidginassistantprotocolpage.c', + 'assistant/pidginassistantprotocolrow.c', @@ -71,6 +73,8 @@
'assistant/pidginaccountassistant.h',
+ 'assistant/pidginassistantprotocolpage.h', + 'assistant/pidginassistantprotocolrow.h', --- a/pidgin/resources/Assistant/accountassistant.ui Tue Jun 08 22:34:45 2021 -0500
+++ b/pidgin/resources/Assistant/accountassistant.ui Thu Jul 15 01:01:40 2021 +0530
@@ -1,5 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.38.2 -->
+<!-- Generated with glade 3.38.2 +Pidgin - Internet Messenger +Copyright (C) Pidgin Developers <devel@pidgin.im> +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 02110-1301, USA. <requires lib="gtk+" version="3.24"/>
<template class="PidginAccountAssistant" parent="GtkAssistant">
@@ -7,48 +26,17 @@
<signal name="cancel" handler="pidgin_account_assistant_cancel_cb" swapped="no"/>
<signal name="delete-event" handler="pidgin_account_assistant_delete_cb" swapped="no"/>
- <object class="GtkLabel">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes">Introduction page</property>
- <property name="page-type">intro</property>
- <property name="has-padding">False</property>
- <object class="GtkLabel">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes">Content page</property>
- <property name="has-padding">False</property>
- <object class="GtkLabel">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes">Confirmation page</property>
- <property name="page-type">confirm</property>
- <property name="has-padding">False</property>
<child internal-child="action_area">
<property name="can-focus">False</property>
- <property name="halign">end</property>
- <property name="margin-left">6</property>
- <property name="margin-right">6</property>
- <property name="margin-start">6</property>
- <property name="margin-end">6</property>
- <property name="margin-top">6</property>
- <property name="margin-bottom">6</property>
- <property name="spacing">6</property>
<property name="has-padding">False</property>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pidgin/resources/Assistant/assistantprotocolpage.ui Thu Jul 15 01:01:40 2021 +0530
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.38.2 +Pidgin - Internet Messenger +Copyright (C) Pidgin Developers <devel@pidgin.im> +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 02110-1301, USA. + <requires lib="gtk+" version="3.24"/> + <requires lib="libhandy" version="0.0"/> + <template class="PidginAssistantProtocolPage" parent="HdyPreferencesPage"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="title" translatable="yes">Protocols</property> + <object class="HdyPreferencesGroup"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="description" translatable="yes">Pidgin Supports all the protocols available below</property> + <property name="title" translatable="yes">Supported Protocols</property> + <object class="GtkListBox" id="protocol_list"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <class name="content"/> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pidgin/resources/Assistant/assistantprotocolrow.ui Thu Jul 15 01:01:40 2021 +0530
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.38.2 +Pidgin - Internet Messenger +Copyright (C) Pidgin Developers <devel@pidgin.im> +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 02110-1301, USA. + <requires lib="gtk+" version="3.24"/> + <requires lib="libhandy" version="0.0"/> + <template class="PidginAssistantProtocolRow" parent="HdyActionRow"> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="activatable">False</property> + <object class="GtkImage" id="selected"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="valign">center</property> + <property name="xpad">6</property> + <property name="ypad">6</property> + <property name="icon-name">emblem-default-symbolic</property> --- a/pidgin/resources/pidgin.gresource.xml Tue Jun 08 22:34:45 2021 -0500
+++ b/pidgin/resources/pidgin.gresource.xml Thu Jul 15 01:01:40 2021 +0530
@@ -10,6 +10,8 @@
<file compressed="true">Accounts/entry.css</file>
<file compressed="true">Accounts/menu.ui</file>
<file compressed="true">Assistant/accountassistant.ui</file>
+ <file compressed="true">Assistant/assistantprotocolpage.ui</file> + <file compressed="true">Assistant/assistantprotocolrow.ui</file> <file compressed="true">Avatar/avatar.ui</file>
<file compressed="true">Avatar/menu.ui</file>
<file compressed="true">BuddyList/window.ui</file>