qulogic/pidgin

c86302777faf
Parents 3f1004d7772a
Children bde60654600e
Replace the TalkatuView with a GtkLabel in the about box

We probably should have done this earlier, but we just got the idea to use a
label with pango markup today.

Testing Done:
Opened the about box and everything worked great.

Reviewed at https://reviews.imfreedom.org/r/2747/
--- a/pidgin/pidginabout.c Fri Oct 27 01:46:24 2023 -0500
+++ b/pidgin/pidginabout.c Fri Oct 27 01:47:29 2023 -0500
@@ -33,7 +33,6 @@
#include <json-glib/json-glib.h>
#include <adwaita.h>
-#include <talkatu.h>
#include "pidginabout.h"
@@ -47,8 +46,6 @@
GtkWidget *application_name;
- GtkTextBuffer *main_buffer;
-
AdwPreferencesPage *developers_page;
AdwPreferencesPage *translators_page;
@@ -74,36 +71,6 @@
}
static void
-pidgin_about_dialog_load_main_page(PidginAboutDialog *about) {
- GtkTextIter start;
- GInputStream *istream = NULL;
- GString *str = NULL;
- gchar buffer[8192];
- gssize read = 0, size = 0;
-
- /* now load the html */
- istream = g_resource_open_stream(pidgin_get_resource(),
- "/im/pidgin/Pidgin3/About/about.md",
- G_RESOURCE_LOOKUP_FLAGS_NONE, NULL);
-
- str = g_string_new("");
-
- while((read = g_input_stream_read(istream, buffer, sizeof(buffer), NULL, NULL)) > 0) {
- g_string_append_len(str, (gchar *)buffer, read);
- size += read;
- }
-
- gtk_text_buffer_get_start_iter(about->main_buffer, &start);
-
- talkatu_markdown_insert(TALKATU_BUFFER(about->main_buffer), &start,
- str->str, size);
-
- g_string_free(str, TRUE);
-
- g_input_stream_close(istream, NULL, NULL);
-}
-
-static void
pidgin_about_dialog_group_add_row(AdwPreferencesGroup *group,
const char *title, const char *value)
{
@@ -584,16 +551,6 @@
}
static void
-pidgin_about_dialog_open_url_cb(G_GNUC_UNUSED TalkatuView *view,
- const char *url, gpointer data)
-{
- GtkUriLauncher *launcher = NULL;
- launcher = gtk_uri_launcher_new(url);
- gtk_uri_launcher_launch(launcher, GTK_WINDOW(data), NULL, NULL, NULL);
- g_object_unref(launcher);
-}
-
-static void
pidgin_about_dialog_copy_button_cb(GtkButton *button,
gpointer data)
{
@@ -678,9 +635,6 @@
application_name);
gtk_widget_class_bind_template_child(widget_class, PidginAboutDialog,
- main_buffer);
-
- gtk_widget_class_bind_template_child(widget_class, PidginAboutDialog,
developers_page);
gtk_widget_class_bind_template_child(widget_class, PidginAboutDialog,
@@ -702,8 +656,6 @@
gtk_widget_class_bind_template_callback(widget_class,
pidgin_about_dialog_response_cb);
gtk_widget_class_bind_template_callback(widget_class,
- pidgin_about_dialog_open_url_cb);
- gtk_widget_class_bind_template_callback(widget_class,
pidgin_about_dialog_copy_button_cb);
}
@@ -714,9 +666,6 @@
/* setup the application name label */
pidgin_about_dialog_load_application_name(about);
- /* setup the main page */
- pidgin_about_dialog_load_main_page(about);
-
/* setup the developers stuff */
pidgin_about_dialog_load_developers(about);
--- a/pidgin/resources/About/about.md Fri Oct 27 01:46:24 2023 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-## Pidgin
-
-Pidgin is a messaging client based on libpurple which is capable of connecting to multiple messaging services at once. Pidgin is written in C using GTK. Pidgin is released, and may be modified and redistributed, under the terms of the GPL version 2 (or later). A copy of the GPL is distributed with Pidgin. Pidgin is copyrighted by its contributors, a list of whom is also distributed with Pidgin. There is no warranty for Pidgin.
-
-### Helpful Resources
-
- * [Website](https://pidgin.im)
- * [Frequently Asked Questions](https://pidgin.im/help/)
- * IRC Channel: #pidgin on irc.libera.chat
- * XMPP MUC: devel@conference.pidgin.im
-
-#### Help for Oracle Employees
-
-Help is available from your normal internal helpdesk or IT department. The Pidgin developer and user communities cannot assist you in the configuration or use of Pidgin within Oracle, as we know nothing of Oracle's infrastructure.
-
-#### Help from other Pidgin users
-
-Help is available on [our Discourse](https://discourse.imfreedom.org/c/pidgin/5).
-
-We can't help with third-party protocols or plugins, but you may be able to find support via the [Third Party Plugins Page](https://pidgin.im/plugins/).
-
-The Discourse's primary language is English. You are welcome to post in another language, but the responses may be less helpful.
--- a/pidgin/resources/About/about.ui Fri Oct 27 01:46:24 2023 -0500
+++ b/pidgin/resources/About/about.ui Fri Oct 27 01:47:29 2023 -0500
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.38.2
-
+<!--
Pidgin - Internet Messenger
Copyright (C) Pidgin Developers <devel@pidgin.im>
@@ -15,25 +14,14 @@
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.
-
+along with this library; if not, see <https://www.gnu.org/licenses/>.
-->
<interface>
<requires lib="gtk" version="4.0"/>
- <requires lib="Talkatu" version="0.2.0"/>
<!-- interface-license-type gplv2 -->
<!-- interface-name Pidgin -->
<!-- interface-description Internet Messenger -->
<!-- interface-copyright Pidgin Developers <devel@pidgin.im> -->
- <object class="TalkatuBuffer" id="main_buffer">
- <property name="action-group">
- <object class="TalkatuActionGroup">
- <property name="format">markdown</property>
- <property name="buffer">main_buffer</property>
- </object>
- </property>
- </object>
<template class="PidginAboutDialog" parent="GtkDialog">
<property name="default-height">600</property>
<signal name="response" handler="pidgin_about_dialog_response_cb" swapped="no"/>
@@ -83,16 +71,38 @@
<property name="css-classes">view</property>
<property name="margin-bottom">24</property>
<child>
- <object class="TalkatuView" id="main_page">
- <property name="focusable">1</property>
- <property name="editable">0</property>
+ <object class="GtkLabel">
+ <property name="use-markup">1</property>
<property name="margin-top">12</property>
<property name="margin-bottom">12</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
<property name="wrap-mode">word</property>
- <property name="buffer">main_buffer</property>
- <signal name="open-url" handler="pidgin_about_dialog_open_url_cb" swapped="no"/>
+ <property name="wrap">1</property>
+ <property name="label">
+<![CDATA[<span font-size="x-large"><b>Pidgin</b></span>
+
+Pidgin is a messaging client based on libpurple which is capable of connecting to multiple messaging services at once. Pidgin is written in C using GTK. Pidgin is released, and may be modified and redistributed, under the terms of the GPL version 2 (or later). A copy of the GPL is distributed with Pidgin. Pidgin is copyrighted by its contributors, a list of whom is also distributed with Pidgin. There is no warranty for Pidgin.
+
+<span font-size="large"><b>Helpful Resources</b></span>
+
+ • <a href="https://pidgin.im">Website</a>
+ • <a href="https://pidgin.im/help/">Frequently Asked Questions</a>
+ • IRC Channel: #pidgin on irc.libera.chat
+ • XMPP MUC: devel@conference.pidgin.im
+
+<span font-size="medium"><b>Help for Oracle Employees</b></span>
+
+Help is available from your normal internal helpdesk or IT department. The Pidgin developer and user communities cannot assist you in the configuration or use of Pidgin within Oracle, as we know nothing of Oracle's infrastructure.
+
+<span font-size="medium"><b>Help from other Pidgin users</b></span>
+
+Help is available on <a href="https://discourse.imfreedom.org/c/pidgin/5">our Discourse</a>.
+
+We can't help with third-party protocols or plugins, but you may be able to find support via the <a href="https://pidgin.im/plugins/">Third Party Plugins Page</a>.
+
+The Discourse's primary language is English. You are welcome to post in another language, but the responses may be less helpful.]]>
+ </property>
</object>
</child>
</object>
--- a/pidgin/resources/pidgin.gresource.xml Fri Oct 27 01:46:24 2023 -0500
+++ b/pidgin/resources/pidgin.gresource.xml Fri Oct 27 01:47:29 2023 -0500
@@ -2,7 +2,6 @@
<gresources>
<gresource prefix="/im/pidgin/Pidgin3/">
<file compressed="true" preprocess="xml-stripblanks">About/about.ui</file>
- <file compressed="true">About/about.md</file>
<file compressed="true" preprocess="json-stripblanks">About/credits.json</file>
<file compressed="true" preprocess="xml-stripblanks">Accounts/chooser.ui</file>
<file compressed="true" preprocess="xml-stripblanks">Accounts/display.ui</file>