--- a/pidgin/pidginabout.c Mon Jan 16 22:02:08 2023 -0600
+++ b/pidgin/pidginabout.c Mon Jan 16 22:05:03 2023 -0600
@@ -51,11 +51,9 @@
GtkTextBuffer *main_buffer;
- GtkWidget *developers_treeview;
- GtkTreeStore *developers_store;
+ AdwPreferencesPage *developers_page; - GtkWidget *translators_treeview;
- GtkTreeStore *translators_store;
+ AdwPreferencesPage *translators_page; AdwPreferencesGroup *build_info_group;
AdwPreferencesGroup *runtime_info_group;
@@ -126,7 +124,9 @@
-pidgin_about_dialog_load_json(GtkTreeStore *store, const gchar *json_section) {
+pidgin_about_dialog_load_json(AdwPreferencesPage *page, + const char *json_section) GInputStream *istream = NULL;
GList *l = NULL, *sections = NULL;
@@ -154,35 +154,23 @@
sections = json_array_get_elements(sections_array);
for(l = sections; l; l = l->next) {
- GtkTreeIter section_iter;
JsonObject *section = json_node_get_object(l->data);
JsonArray *people = NULL;
const gchar *title = NULL;
- guint idx = 0, n_people = 0;
+ AdwPreferencesGroup *group = NULL; title = json_object_get_string_member(section, "title");
- markup = g_strdup_printf("<b><big>%s</big></b>", title);
- gtk_tree_store_append(store, §ion_iter, NULL);
- gtk_tree_store_set(store, §ion_iter,
+ group = ADW_PREFERENCES_GROUP(adw_preferences_group_new()); + adw_preferences_group_set_title(group, title); + adw_preferences_page_add(page, group); people = json_object_get_array_member(section, "people");
n_people = json_array_get_length(people);
- for(idx = 0; idx < n_people; idx++) {
- GtkTreeIter person_iter;
- gtk_tree_store_append(store, &person_iter, §ion_iter);
- gtk_tree_store_set(store, &person_iter,
- 0, json_array_get_string_element(people, idx),
+ for(guint idx = 0; idx < n_people; idx++) { + const char *name = json_array_get_string_element(people, idx); + pidgin_about_dialog_group_add_row(group, name, NULL); @@ -196,12 +184,12 @@
pidgin_about_dialog_load_developers(PidginAboutDialog *about) {
- pidgin_about_dialog_load_json(about->developers_store, "developers");
+ pidgin_about_dialog_load_json(about->developers_page, "developers"); pidgin_about_dialog_load_translators(PidginAboutDialog *about) {
- pidgin_about_dialog_load_json(about->translators_store, "languages");
+ pidgin_about_dialog_load_json(about->translators_page, "languages"); @@ -451,14 +439,10 @@
gtk_widget_class_bind_template_child(widget_class, PidginAboutDialog,
- gtk_widget_class_bind_template_child(widget_class, PidginAboutDialog,
gtk_widget_class_bind_template_child(widget_class, PidginAboutDialog,
- gtk_widget_class_bind_template_child(widget_class, PidginAboutDialog,
gtk_widget_class_bind_template_child(widget_class, PidginAboutDialog,
@@ -491,11 +475,9 @@
/* setup the developers stuff */
pidgin_about_dialog_load_developers(about);
- gtk_tree_view_expand_all(GTK_TREE_VIEW(about->developers_treeview));
/* setup the translators stuff */
pidgin_about_dialog_load_translators(about);
- gtk_tree_view_expand_all(GTK_TREE_VIEW(about->translators_treeview));
/* setup the build info page */
pidgin_about_dialog_load_build_configuration(about);
--- a/pidgin/resources/About/about.ui Mon Jan 16 22:02:08 2023 -0600
+++ b/pidgin/resources/About/about.ui Mon Jan 16 22:05:03 2023 -0600
@@ -26,23 +26,7 @@
<!-- interface-name Pidgin -->
<!-- interface-description Internet Messenger -->
<!-- interface-copyright Pidgin Developers <devel@pidgin.im> -->
- <object class="GtkTreeStore" id="developers_store">
- <!-- column-name markup -->
- <column type="gchararray"/>
- <!-- column-name align -->
- <column type="gfloat"/>
<object class="TalkatuMarkdownBuffer" id="main_buffer"/>
- <object class="GtkTreeStore" id="translators_store">
- <!-- column-name markup -->
- <column type="gchararray"/>
- <!-- column-name align -->
- <column type="gfloat"/>
<template class="PidginAboutDialog" parent="GtkDialog">
<property name="default-height">600</property>
<signal name="response" handler="pidgin_about_dialog_response_cb" swapped="no"/>
@@ -107,33 +91,7 @@
<property name="name">developers</property>
<property name="title" translatable="1">Developers</property>
- <object class="GtkScrolledWindow">
- <property name="focusable">1</property>
- <property name="hscrollbar-policy">never</property>
- <property name="child">
- <object class="GtkTreeView" id="developers_treeview">
- <property name="focusable">1</property>
- <property name="model">developers_store</property>
- <property name="headers-visible">0</property>
- <property name="show-expanders">0</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection"/>
- <object class="GtkTreeViewColumn" id="developers_column">
- <property name="resizable">1</property>
- <property name="sizing">autosize</property>
- <object class="GtkCellRendererText" id="developers_cell_renderer"/>
- <attribute name="xalign">1</attribute>
- <attribute name="markup">0</attribute>
+ <object class="AdwPreferencesPage" id="developers_page"> @@ -143,30 +101,7 @@
<property name="name">translators</property>
<property name="title" translatable="1">Translators</property>
- <object class="GtkScrolledWindow">
- <property name="focusable">1</property>
- <property name="child">
- <object class="GtkTreeView" id="translators_treeview">
- <property name="focusable">1</property>
- <property name="model">translators_store</property>
- <property name="headers-visible">0</property>
- <property name="show-expanders">0</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection"/>
- <object class="GtkTreeViewColumn" id="translators_column">
- <object class="GtkCellRendererText" id="translators_cell_renderer"/>
- <attribute name="xalign">1</attribute>
- <attribute name="markup">0</attribute>
+ <object class="AdwPreferencesPage" id="translators_page">