Thu, 17 Aug 2017 22:02:45 -0500
Clean up the main page on the about dialog
| pidgin/about.html | file | annotate | diff | comparison | revisions | |
| pidgin/about.md | file | annotate | diff | comparison | revisions | |
| pidgin/about.ui | file | annotate | diff | comparison | revisions | |
| pidgin/pidgin.gresource.xml | file | annotate | diff | comparison | revisions | |
| pidgin/pidginabout.c | file | annotate | diff | comparison | revisions |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pidgin/about.html Thu Aug 17 22:02:45 2017 -0500 @@ -0,0 +1,22 @@ +<h2>Pidgin</h2> + +<p>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.</p> + +<h3>Helpful Resources</h3> + +<ul> +<li><a href="https://pidgin.im">Website</a></li> +<li><a href="https://developer.pidgin.im/wiki/FAQ">Frequently Asked Questions</a></li> +<li>IRC Channel: #pidgin on irc.freenode.net</li> +<li>XMPP MUC: devel@conference.pidgin.im</li> +</ul> + +<p><strong>Help for Oracle Employees</strong> 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.</p> + +<p><strong>Help from other Pidgin users</strong> is available by e-mailing <a href="mailto:support@pidgin.im">support@pidgin.im</a>.</p> + +<p>This is a <strong>public</strong> mailing list with a <strong>public</strong> <a href="https://pidgin.im/pipermail/support/">archive</a>.</p> + +<p>We can't help with third-party protocols or plugins!</p> + +<p>The list's primary language is English. You are welcome to post in another language, but the responses may be less helpful.</p>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pidgin/about.md Thu Aug 17 22:02:45 2017 -0500 @@ -0,0 +1,20 @@ +## 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://developer.pidgin.im/wiki/FAQ) + * IRC Channel: #pidgin on irc.freenode.net + * XMPP MUC: devel@conference.pidgin.im + +**Help for Oracle Employees** 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** is available by e-mailing [support@pidgin.im](mailto:support@pidgin.im). + +This is a **public** mailing list with a **public** [archive](https://pidgin.im/pipermail/support/). + +We can't help with third-party protocols or plugins! + +The list's primary language is English. You are welcome to post in another language, but the responses may be less helpful.
--- a/pidgin/about.ui Thu Aug 17 20:11:49 2017 -0500 +++ b/pidgin/about.ui Thu Aug 17 22:02:45 2017 -0500 @@ -128,7 +128,7 @@ </packing> </child> <child> - <object class="GtkLabel" id="application-name"> + <object class="GtkLabel" id="application_name"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="label" translatable="yes">Pidgin</property> @@ -153,56 +153,22 @@ <property name="margin_bottom">2</property> <property name="transition_type">slide-up</property> <child> - <object class="GtkBox" id="about_page"> + <placeholder/> + </child> + <child> + <object class="GtkScrolledWindow" id="main_scrolled_window"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - <child> - <object class="GtkLabel"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">3.0.0devel</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> + <property name="can_focus">True</property> + <property name="hscrollbar_policy">never</property> + <property name="shadow_type">in</property> <child> - <object class="GtkLabel"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes"><a href="https://pidgin.im/">pidgin.im</a></property> - <property name="use_markup">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - <child> - <object class="GtkLabel"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">This program comes with absolutely no warranty. -See the <a href="http://www.gnu.org/licenses/old-licenses/gpl-2.0.html">GNU General Public License, version 2 or later</a> for details.</property> - <property name="use_markup">True</property> - <property name="justify">center</property> - <property name="track_visited_links">False</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="pack_type">end</property> - <property name="position">2</property> - </packing> + <placeholder/> </child> </object> <packing> <property name="name">main</property> <property name="title" translatable="yes">main</property> + <property name="position">1</property> </packing> </child> <child> @@ -241,7 +207,7 @@ <packing> <property name="name">developers</property> <property name="title" translatable="yes">developers</property> - <property name="position">1</property> + <property name="position">2</property> </packing> </child> <child> @@ -277,7 +243,7 @@ <packing> <property name="name">translators</property> <property name="title" translatable="yes">translators</property> - <property name="position">2</property> + <property name="position">3</property> </packing> </child> <child> @@ -325,7 +291,7 @@ <packing> <property name="name">build-info</property> <property name="title" translatable="yes">build-info</property> - <property name="position">3</property> + <property name="position">4</property> </packing> </child> </object>
--- a/pidgin/pidgin.gresource.xml Thu Aug 17 20:11:49 2017 -0500 +++ b/pidgin/pidgin.gresource.xml Thu Aug 17 22:02:45 2017 -0500 @@ -8,6 +8,7 @@ </gresource> <gresource prefix="/im/pidgin/Pidgin/About"> <file compressed="true">about.ui</file> + <file compressed="true">about.html</file> <file compressed="true">credits.json</file> </gresource> </gresources>
--- a/pidgin/pidginabout.c Thu Aug 17 20:11:49 2017 -0500 +++ b/pidgin/pidginabout.c Thu Aug 17 22:02:45 2017 -0500 @@ -4,6 +4,8 @@ #include "pidginabout.h" #include "pidginresources.h" #include "internal.h" +#include "gtkutils.h" +#include "gtkwebview.h" #include <stdio.h> @@ -15,8 +17,11 @@ #endif struct _PidginAboutDialogPrivate { + GtkWidget *application_name; GtkWidget *stack; + GtkWidget *main_scrolled_window; + GtkWidget *developers_button; GtkWidget *developers_page; GtkWidget *developers_treeview; @@ -66,6 +71,42 @@ } static void +_pidgin_about_dialog_load_main_page(PidginAboutDialog *about) { + GtkWidget *webview = NULL; + GInputStream *istream = NULL; + GString *str = NULL; + gchar buffer[8192]; + gssize read = 0; + + /* create our webview */ + webview = pidgin_webview_new(FALSE); + pidgin_setup_webview(webview); + pidgin_webview_set_format_functions(PIDGIN_WEBVIEW(webview), PIDGIN_WEBVIEW_ALL ^ PIDGIN_WEBVIEW_SMILEY); + + gtk_container_add(GTK_CONTAINER(about->priv->main_scrolled_window), webview); + + /* now load the html */ + istream = g_resource_open_stream( + pidgin_get_resource(), + "/im/pidgin/Pidgin/About/about.html", + 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); + } + + pidgin_webview_append_html(PIDGIN_WEBVIEW(webview), str->str); + + g_string_free(str, TRUE); + + g_input_stream_close(istream, NULL, NULL); +} + +static void _pidgin_about_dialog_load_developers(PidginAboutDialog *about) { GInputStream *istream = NULL; GList *l = NULL, *sections = NULL; @@ -465,8 +506,11 @@ "/im/pidgin/Pidgin/About/about.ui" ); + gtk_widget_class_bind_template_child_private(widget_class, PidginAboutDialog, application_name); gtk_widget_class_bind_template_child_private(widget_class, PidginAboutDialog, stack); + gtk_widget_class_bind_template_child_private(widget_class, PidginAboutDialog, main_scrolled_window); + gtk_widget_class_bind_template_child_private(widget_class, PidginAboutDialog, developers_button); gtk_widget_class_bind_template_child_private(widget_class, PidginAboutDialog, developers_page); gtk_widget_class_bind_template_child_private(widget_class, PidginAboutDialog, developers_store); @@ -491,6 +535,9 @@ gtk_widget_init_template(GTK_WIDGET(about)); + /* setup the main page */ + _pidgin_about_dialog_load_main_page(about); + /* setup the developers stuff */ g_signal_connect( about->priv->developers_button,