about dialog: Fix page visibility

The handling of page visibility broke when the dialog
was ported to GtkStackPage in 52b83ac553.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1877
This commit is contained in:
Matthias Clasen 2019-05-12 18:19:36 +00:00
parent 04754d753b
commit 1318d3748a
2 changed files with 4 additions and 2 deletions

View File

@ -684,7 +684,7 @@ update_credits_button_visibility (GtkAboutDialog *about)
gboolean show; gboolean show;
GtkStackPage *page; GtkStackPage *page;
page = gtk_stack_get_page (GTK_STACK (priv->stack), priv->system_page); page = gtk_stack_get_page (GTK_STACK (priv->stack), priv->credits_page);
show = (priv->authors != NULL || show = (priv->authors != NULL ||
priv->documenters != NULL || priv->documenters != NULL ||
@ -2155,7 +2155,6 @@ add_credits_section (GtkAboutDialog *about,
gtk_widget_set_halign (label, GTK_ALIGN_END); gtk_widget_set_halign (label, GTK_ALIGN_END);
gtk_widget_set_valign (label, GTK_ALIGN_CENTER); gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
gtk_grid_attach (grid, label, 0, *row, 1, 1); gtk_grid_attach (grid, label, 0, *row, 1, 1);
gtk_widget_show (label);
for (p = people; *p; p++) for (p = people; *p; p++)
{ {

View File

@ -111,6 +111,7 @@
<child> <child>
<object class="GtkStackPage"> <object class="GtkStackPage">
<property name="name">credits</property> <property name="name">credits</property>
<property name="visible">0</property>
<property name="title" translatable="yes">Credits</property> <property name="title" translatable="yes">Credits</property>
<property name="child"> <property name="child">
<object class="GtkBox" id="credits_page"> <object class="GtkBox" id="credits_page">
@ -147,6 +148,7 @@
<child> <child>
<object class="GtkStackPage"> <object class="GtkStackPage">
<property name="name">license</property> <property name="name">license</property>
<property name="visible">0</property>
<property name="title" translatable="yes">License</property> <property name="title" translatable="yes">License</property>
<property name="child"> <property name="child">
<object class="GtkBox" id="license_page"> <object class="GtkBox" id="license_page">
@ -189,6 +191,7 @@
<child> <child>
<object class="GtkStackPage"> <object class="GtkStackPage">
<property name="name">system</property> <property name="name">system</property>
<property name="visible">0</property>
<property name="title" translatable="yes">System</property> <property name="title" translatable="yes">System</property>
<property name="child"> <property name="child">
<object class="GtkBox" id="system_page"> <object class="GtkBox" id="system_page">