# HG changeset patch
# Node ID e46891016d20
# Parent  9fff043835ee
diff --git a/pidgin/prefs/pidginproxyprefs.c b/pidgin/prefs/pidginproxyprefs.c
--- a/pidgin/prefs/pidginproxyprefs.c
+++ b/pidgin/prefs/pidginproxyprefs.c
@@ -32,12 +32,14 @@
 struct _PidginProxyPrefs {
 	AdwPreferencesPage parent;
 
-	GtkWidget *stack;
 	/* GNOME version */
+	GtkWidget *gnome;
 	GtkWidget *gnome_not_found;
 	GtkWidget *gnome_program;
 	gchar *gnome_program_path;
+
 	/* Non-GNOME version */
+	GtkWidget *nongnome;
 	GtkWidget *socks4_remotedns;
 	PidginPrefCombo type;
 	GtkWidget *options;
@@ -128,11 +130,14 @@ pidgin_proxy_prefs_class_init(PidginProx
 	);
 
 	gtk_widget_class_bind_template_child(
-			widget_class, PidginProxyPrefs, stack);
+			widget_class, PidginProxyPrefs, gnome);
 	gtk_widget_class_bind_template_child(
 			widget_class, PidginProxyPrefs, gnome_not_found);
 	gtk_widget_class_bind_template_child(
 			widget_class, PidginProxyPrefs, gnome_program);
+
+	gtk_widget_class_bind_template_child(
+			widget_class, PidginProxyPrefs, nongnome);
 	gtk_widget_class_bind_template_child(
 			widget_class, PidginProxyPrefs, socks4_remotedns);
 	gtk_widget_class_bind_template_child(
@@ -163,8 +168,8 @@ pidgin_proxy_prefs_init(PidginProxyPrefs
 	if(purple_running_gnome()) {
 		gchar *path = NULL;
 
-		gtk_stack_set_visible_child_name(GTK_STACK(prefs->stack),
-				"gnome");
+		gtk_widget_set_visible(prefs->gnome, TRUE);
+		gtk_widget_set_visible(prefs->nongnome, FALSE);
 
 		path = g_find_program_in_path("gnome-network-properties");
 		if (path == NULL) {
@@ -182,9 +187,10 @@ pidgin_proxy_prefs_init(PidginProxyPrefs
 		prefs->gnome_program_path = path;
 		gtk_widget_set_visible(prefs->gnome_not_found, path == NULL);
 		gtk_widget_set_visible(prefs->gnome_program, path != NULL);
+
 	} else {
-		gtk_stack_set_visible_child_name(GTK_STACK(prefs->stack),
-				"nongnome");
+		gtk_widget_set_visible(prefs->gnome, FALSE);
+		gtk_widget_set_visible(prefs->nongnome, TRUE);
 
 		/* This is a global option that affects SOCKS4 usage even with
 		 * account-specific proxy settings */
diff --git a/pidgin/resources/Prefs/proxy.ui b/pidgin/resources/Prefs/proxy.ui
--- a/pidgin/resources/Prefs/proxy.ui
+++ b/pidgin/resources/Prefs/proxy.ui
@@ -64,198 +64,186 @@ along with this program; if not, see <ht
   </object>
   <template class="PidginProxyPrefs" parent="AdwPreferencesPage">
     <child>
-      <object class="AdwPreferencesGroup">
+      <object class="AdwPreferencesGroup" id="gnome">
+        <property name="title" translatable="1">Proxy Server</property>
+        <property name="description" translatable="1">Proxy preferences are configured in GNOME preferences</property>
+        <child>
+          <object class="GtkBox">
+            <property name="orientation">vertical</property>
+            <property name="spacing">6</property>
+            <child>
+              <object class="GtkLabel">
+                <property name="xalign">0</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkBox">
+                <property name="spacing">6</property>
+                <child>
+                  <object class="GtkLabel" id="gnome_not_found">
+                    <property name="label" translatable="1">Proxy configuration program was not found.</property>
+                    <attributes>
+                      <attribute name="weight" value="bold"></attribute>
+                    </attributes>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkButton" id="gnome_program">
+                    <property name="label" translatable="1">Configure _Proxy</property>
+                    <property name="focusable">1</property>
+                    <property name="receives-default">1</property>
+                    <property name="use-underline">1</property>
+                    <signal name="clicked" handler="proxy_button_clicked_cb" object="PidginProxyPrefs" swapped="no"/>
+                  </object>
+                </child>
+              </object>
+            </child>
+          </object>
+        </child>
+      </object>
+    </child>
+    <child>
+      <object class="AdwPreferencesGroup" id="nongnome">
         <property name="title" translatable="1">Proxy Server</property>
         <child>
-          <object class="GtkStack" id="stack">
-            <property name="margin-start">12</property>
-            <property name="hhomogeneous">0</property>
-            <property name="vhomogeneous">0</property>
+          <object class="GtkBox">
+            <property name="orientation">vertical</property>
+            <property name="spacing">6</property>
+            <child>
+              <object class="GtkCheckButton" id="socks4_remotedns">
+                <property name="label" translatable="1">Use remote _DNS with SOCKS4 proxies</property>
+                <property name="focusable">1</property>
+                <property name="use-underline">1</property>
+              </object>
+            </child>
             <child>
-              <object class="GtkStackPage">
-                <property name="name">gnome</property>
-                <property name="child">
-                  <object class="GtkBox">
-                    <property name="orientation">vertical</property>
-                    <property name="spacing">6</property>
-                    <child>
-                      <object class="GtkLabel">
-                        <property name="label" translatable="1">Proxy preferences are configured in GNOME preferences</property>
-                        <property name="xalign">0</property>
-                      </object>
-                    </child>
+              <object class="GtkBox">
+                <property name="spacing">6</property>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="label" translatable="1">Proxy t_ype:</property>
+                    <property name="use-underline">1</property>
+                    <property name="mnemonic-widget">type.combo</property>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkComboBox" id="type.combo">
+                    <property name="model">type.store</property>
                     <child>
-                      <object class="GtkBox">
-                        <property name="spacing">6</property>
-                        <child>
-                          <object class="GtkLabel" id="gnome_not_found">
-                            <property name="label" translatable="1">Proxy configuration program was not found.</property>
-                            <attributes>
-                              <attribute name="weight" value="bold"></attribute>
-                            </attributes>
-                          </object>
-                        </child>
-                        <child>
-                          <object class="GtkButton" id="gnome_program">
-                            <property name="label" translatable="1">Configure _Proxy</property>
-                            <property name="focusable">1</property>
-                            <property name="receives-default">1</property>
-                            <property name="use-underline">1</property>
-                            <signal name="clicked" handler="proxy_button_clicked_cb" object="PidginProxyPrefs" swapped="no"/>
-                          </object>
-                        </child>
-                      </object>
+                      <object class="GtkCellRendererText"/>
+                      <attributes>
+                        <attribute name="text">0</attribute>
+                      </attributes>
                     </child>
                   </object>
-                </property>
+                </child>
               </object>
             </child>
             <child>
-              <object class="GtkStackPage">
-                <property name="name">nongnome</property>
-                <property name="child">
-                  <object class="GtkBox">
-                    <property name="orientation">vertical</property>
-                    <property name="spacing">6</property>
-                    <child>
-                      <object class="GtkCheckButton" id="socks4_remotedns">
-                        <property name="label" translatable="1">Use remote _DNS with SOCKS4 proxies</property>
-                        <property name="focusable">1</property>
-                        <property name="use-underline">1</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkBox">
-                        <property name="spacing">6</property>
-                        <child>
-                          <object class="GtkLabel">
-                            <property name="label" translatable="1">Proxy t_ype:</property>
-                            <property name="use-underline">1</property>
-                            <property name="mnemonic-widget">type.combo</property>
-                          </object>
-                        </child>
-                        <child>
-                          <object class="GtkComboBox" id="type.combo">
-                            <property name="model">type.store</property>
-                            <child>
-                              <object class="GtkCellRendererText"/>
-                              <attributes>
-                                <attribute name="text">0</attribute>
-                              </attributes>
-                            </child>
-                          </object>
-                        </child>
-                      </object>
-                    </child>
-                    <child>
-                      <!-- n-columns=4 n-rows=3 -->
-                      <object class="GtkGrid" id="options">
-                        <property name="row-spacing">10</property>
-                        <property name="column-spacing">5</property>
-                        <child>
-                          <object class="GtkLabel" id="host-label">
-                            <property name="label" translatable="1">_Host:</property>
-                            <property name="use-underline">1</property>
-                            <property name="mnemonic-widget">host</property>
-                            <property name="xalign">1</property>
-                            <layout>
-                              <property name="column">0</property>
-                              <property name="row">0</property>
-                            </layout>
-                          </object>
-                        </child>
-                        <child>
-                          <object class="GtkEntry" id="host">
-                            <property name="focusable">1</property>
-                            <signal name="changed" handler="proxy_print_option" object="PidginProxyPrefs" swapped="no"/>
-                            <accessibility>
-                              <relation name="labelled-by">host-label</relation>
-                            </accessibility>
-                            <layout>
-                              <property name="column">1</property>
-                              <property name="row">0</property>
-                            </layout>
-                          </object>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="port-label">
-                            <property name="label" translatable="1">P_ort:</property>
-                            <property name="use-underline">1</property>
-                            <property name="xalign">1</property>
-                            <layout>
-                              <property name="column">2</property>
-                              <property name="row">0</property>
-                            </layout>
-                          </object>
-                        </child>
-                        <child>
-                          <object class="GtkSpinButton" id="port">
-                            <property name="focusable">1</property>
-                            <property name="text" translatable="1">0</property>
-                            <property name="adjustment">port.adjustment</property>
-                            <property name="numeric">1</property>
-                            <signal name="changed" handler="proxy_print_option" object="PidginProxyPrefs" swapped="no"/>
-                            <accessibility>
-                              <relation name="labelled-by">port-label</relation>
-                            </accessibility>
-                            <layout>
-                              <property name="column">3</property>
-                              <property name="row">0</property>
-                            </layout>
-                          </object>
-                        </child>
-                        <child>
-                          <object class="GtkLabel">
-                            <property name="label" translatable="1">User_name:</property>
-                            <property name="use-underline">1</property>
-                            <property name="mnemonic-widget">username</property>
-                            <property name="xalign">1</property>
-                            <layout>
-                              <property name="column">0</property>
-                              <property name="row">1</property>
-                            </layout>
-                          </object>
-                        </child>
-                        <child>
-                          <object class="GtkEntry" id="username">
-                            <property name="focusable">1</property>
-                            <signal name="changed" handler="proxy_print_option" object="PidginProxyPrefs" swapped="no"/>
-                            <layout>
-                              <property name="column">1</property>
-                              <property name="row">1</property>
-                            </layout>
-                          </object>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="password-label">
-                            <property name="label" translatable="1">Pa_ssword:</property>
-                            <property name="use-underline">1</property>
-                            <property name="mnemonic-widget">password</property>
-                            <property name="xalign">1</property>
-                            <layout>
-                              <property name="column">2</property>
-                              <property name="row">1</property>
-                            </layout>
-                          </object>
-                        </child>
-                        <child>
-                          <object class="GtkPasswordEntry" id="password">
-                            <property name="focusable">1</property>
-                            <property name="show-peek-icon">1</property>
-                            <signal name="changed" handler="proxy_print_option" object="PidginProxyPrefs" swapped="no"/>
-                            <accessibility>
-                              <relation name="labelled-by">password-label</relation>
-                            </accessibility>
-                            <layout>
-                              <property name="column">3</property>
-                              <property name="row">1</property>
-                            </layout>
-                          </object>
-                        </child>
-                      </object>
-                    </child>
+              <!-- n-columns=4 n-rows=3 -->
+              <object class="GtkGrid" id="options">
+                <property name="row-spacing">10</property>
+                <property name="column-spacing">5</property>
+                <child>
+                  <object class="GtkLabel" id="host-label">
+                    <property name="label" translatable="1">_Host:</property>
+                    <property name="use-underline">1</property>
+                    <property name="mnemonic-widget">host</property>
+                    <property name="xalign">1</property>
+                    <layout>
+                      <property name="column">0</property>
+                      <property name="row">0</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkEntry" id="host">
+                    <property name="focusable">1</property>
+                    <signal name="changed" handler="proxy_print_option" object="PidginProxyPrefs" swapped="no"/>
+                    <accessibility>
+                      <relation name="labelled-by">host-label</relation>
+                    </accessibility>
+                    <layout>
+                      <property name="column">1</property>
+                      <property name="row">0</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="port-label">
+                    <property name="label" translatable="1">P_ort:</property>
+                    <property name="use-underline">1</property>
+                    <property name="xalign">1</property>
+                    <layout>
+                      <property name="column">2</property>
+                      <property name="row">0</property>
+                    </layout>
                   </object>
-                </property>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="port">
+                    <property name="focusable">1</property>
+                    <property name="text" translatable="1">0</property>
+                    <property name="adjustment">port.adjustment</property>
+                    <property name="numeric">1</property>
+                    <signal name="changed" handler="proxy_print_option" object="PidginProxyPrefs" swapped="no"/>
+                    <accessibility>
+                      <relation name="labelled-by">port-label</relation>
+                    </accessibility>
+                    <layout>
+                      <property name="column">3</property>
+                      <property name="row">0</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="label" translatable="1">User_name:</property>
+                    <property name="use-underline">1</property>
+                    <property name="mnemonic-widget">username</property>
+                    <property name="xalign">1</property>
+                    <layout>
+                      <property name="column">0</property>
+                      <property name="row">1</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkEntry" id="username">
+                    <property name="focusable">1</property>
+                    <signal name="changed" handler="proxy_print_option" object="PidginProxyPrefs" swapped="no"/>
+                    <layout>
+                      <property name="column">1</property>
+                      <property name="row">1</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="password-label">
+                    <property name="label" translatable="1">Pa_ssword:</property>
+                    <property name="use-underline">1</property>
+                    <property name="mnemonic-widget">password</property>
+                    <property name="xalign">1</property>
+                    <layout>
+                      <property name="column">2</property>
+                      <property name="row">1</property>
+                    </layout>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkPasswordEntry" id="password">
+                    <property name="focusable">1</property>
+                    <property name="show-peek-icon">1</property>
+                    <signal name="changed" handler="proxy_print_option" object="PidginProxyPrefs" swapped="no"/>
+                    <accessibility>
+                      <relation name="labelled-by">password-label</relation>
+                    </accessibility>
+                    <layout>
+                      <property name="column">3</property>
+                      <property name="row">1</property>
+                    </layout>
+                  </object>
+                </child>
               </object>
             </child>
           </object>
