Backport an upstream patch to fix the enterprise login dialog

https://bugzilla.redhat.com/show_bug.cgi?id=2123494
This commit is contained in:
Kalev Lember 2022-09-06 18:06:29 +02:00
parent 68dc058603
commit df06062d55
2 changed files with 426 additions and 0 deletions

421
159.patch Normal file
View File

@ -0,0 +1,421 @@
From ab0636afe1622373fd9f0d5b9a55f7a4da6a4c3d Mon Sep 17 00:00:00 2001
From: Will Thompson <wjt@endlessos.org>
Date: Tue, 6 Sep 2022 14:34:00 +0100
Subject: [PATCH 1/5] account: Show actions in enterprise login dialog
Since 13de947f4ff3444e7085007ff353e97bd74832ae ("account: Port to GTK4")
this GtkBox would obliterate the default contents of the dialog, and as
a result the action widgets were not shown.
Correctly pack the dialog contents into the content area.
Fixes https://gitlab.gnome.org/GNOME/gnome-initial-setup/-/issues/152
Part-of: <https://gitlab.gnome.org/GNOME/gnome-initial-setup/-/merge_requests/159>
---
.../pages/account/gis-account-page-enterprise.ui | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gnome-initial-setup/pages/account/gis-account-page-enterprise.ui b/gnome-initial-setup/pages/account/gis-account-page-enterprise.ui
index aca904a4..b2556837 100644
--- a/gnome-initial-setup/pages/account/gis-account-page-enterprise.ui
+++ b/gnome-initial-setup/pages/account/gis-account-page-enterprise.ui
@@ -124,7 +124,7 @@
<property name="modal">True</property>
<property name="destroy_with_parent">True</property>
<property name="title"></property>
- <child>
+ <child internal-child="content_area">
<object class="GtkBox" id="dialog-vbox1">
<property name="orientation">vertical</property>
<property name="spacing">2</property>
--
GitLab
From 4dd82319e1cc608506bbc0c6b2ac5f28d5b36cd3 Mon Sep 17 00:00:00 2001
From: Will Thompson <wjt@endlessos.org>
Date: Tue, 6 Sep 2022 14:41:33 +0100
Subject: [PATCH 2/5] account: Fix buttons in enterprise login dialog
Since 13de947f4ff3444e7085007ff353e97bd74832ae ("account: Port to GTK4")
the label on the cancel button was lost, as was the use_underline property
for the continue button.
gtk-cancel is no more, but happily the translatable string "_Cancel" is
already present elsewhere in this project.
While we are here, mark the Continue button as the suggested action.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-initial-setup/-/merge_requests/159>
---
.../pages/account/gis-account-page-enterprise.ui | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/gnome-initial-setup/pages/account/gis-account-page-enterprise.ui b/gnome-initial-setup/pages/account/gis-account-page-enterprise.ui
index b2556837..38992f05 100644
--- a/gnome-initial-setup/pages/account/gis-account-page-enterprise.ui
+++ b/gnome-initial-setup/pages/account/gis-account-page-enterprise.ui
@@ -261,11 +261,18 @@
</object>
</child>
<child type="action">
- <object class="GtkButton" id="button_cancel"/>
+ <object class="GtkButton" id="button_cancel">
+ <property name="label">_Cancel</property>
+ <property name="use_underline">True</property>
+ </object>
</child>
<child type="action">
<object class="GtkButton" id="button_ok">
<property name="label" translatable="yes">C_ontinue</property>
+ <property name="use_underline">True</property>
+ <style>
+ <class name="suggested-action"/>
+ </style>
</object>
</child>
<action-widgets>
--
GitLab
From 1e5bb1eb5f8074768805f88107f258898dfff3b7 Mon Sep 17 00:00:00 2001
From: Will Thompson <wjt@endlessos.org>
Date: Tue, 6 Sep 2022 14:44:11 +0100
Subject: [PATCH 3/5] account: Readd margin to enterprise login dialog
In 13de947f4ff3444e7085007ff353e97bd74832ae ("account: Port to GTK4")
the use of GtkContainer:border-width was removed, but no alternative
margin was added. Readd a margin. This margin is a little wider but I
think looks fine, and is the same used in at least one dialog in
gnome-control-center.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-initial-setup/-/merge_requests/159>
---
.../pages/account/gis-account-page-enterprise.ui | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gnome-initial-setup/pages/account/gis-account-page-enterprise.ui b/gnome-initial-setup/pages/account/gis-account-page-enterprise.ui
index 38992f05..01379314 100644
--- a/gnome-initial-setup/pages/account/gis-account-page-enterprise.ui
+++ b/gnome-initial-setup/pages/account/gis-account-page-enterprise.ui
@@ -131,6 +131,10 @@
<child>
<object class="GtkBox" id="box2">
<property name="orientation">vertical</property>
+ <property name="margin-top">18</property>
+ <property name="margin-bottom">18</property>
+ <property name="margin-start">18</property>
+ <property name="margin-end">18</property>
<property name="spacing">10</property>
<child>
<object class="GtkLabel" id="label71">
--
GitLab
From ac1514d95f019cc54934ec17eb0521f911871d42 Mon Sep 17 00:00:00 2001
From: Will Thompson <wjt@endlessos.org>
Date: Tue, 6 Sep 2022 14:59:23 +0100
Subject: [PATCH 4/5] account: Set title on enterprise login dialog
While not strictly necessary, this is a moderate visual improvement.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-initial-setup/-/merge_requests/159>
---
.../pages/account/gis-account-page-enterprise.ui | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/gnome-initial-setup/pages/account/gis-account-page-enterprise.ui b/gnome-initial-setup/pages/account/gis-account-page-enterprise.ui
index 01379314..c53d8a62 100644
--- a/gnome-initial-setup/pages/account/gis-account-page-enterprise.ui
+++ b/gnome-initial-setup/pages/account/gis-account-page-enterprise.ui
@@ -123,7 +123,7 @@
<property name="resizable">False</property>
<property name="modal">True</property>
<property name="destroy_with_parent">True</property>
- <property name="title"></property>
+ <property name="title" translatable="yes">Domain Administrator Login</property>
<child internal-child="content_area">
<object class="GtkBox" id="dialog-vbox1">
<property name="orientation">vertical</property>
@@ -136,15 +136,6 @@
<property name="margin-start">18</property>
<property name="margin-end">18</property>
<property name="spacing">10</property>
- <child>
- <object class="GtkLabel" id="label71">
- <property name="label" translatable="yes">Domain Administrator Login</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- <attribute name="scale" value="1.2"/>
- </attributes>
- </object>
- </child>
<child>
<object class="GtkLabel" id="label12">
<property name="xalign">0.5</property>
--
GitLab
From 721491856f8e9b2d5003937ad73d87c17adc5145 Mon Sep 17 00:00:00 2001
From: Will Thompson <wjt@endlessos.org>
Date: Tue, 6 Sep 2022 14:48:56 +0100
Subject: [PATCH 5/5] account: Remove redundant box in enterprise login dialog
The GtkDialog's own content_area vbox is plenty, no need to nest another
one within it.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-initial-setup/-/merge_requests/159>
---
.../account/gis-account-page-enterprise.ui | 226 +++++++++---------
1 file changed, 110 insertions(+), 116 deletions(-)
diff --git a/gnome-initial-setup/pages/account/gis-account-page-enterprise.ui b/gnome-initial-setup/pages/account/gis-account-page-enterprise.ui
index c53d8a62..d60e69e7 100644
--- a/gnome-initial-setup/pages/account/gis-account-page-enterprise.ui
+++ b/gnome-initial-setup/pages/account/gis-account-page-enterprise.ui
@@ -127,128 +127,122 @@
<child internal-child="content_area">
<object class="GtkBox" id="dialog-vbox1">
<property name="orientation">vertical</property>
- <property name="spacing">2</property>
+ <property name="margin-top">18</property>
+ <property name="margin-bottom">18</property>
+ <property name="margin-start">18</property>
+ <property name="margin-end">18</property>
+ <property name="spacing">10</property>
<child>
- <object class="GtkBox" id="box2">
- <property name="orientation">vertical</property>
- <property name="margin-top">18</property>
- <property name="margin-bottom">18</property>
- <property name="margin-start">18</property>
- <property name="margin-end">18</property>
- <property name="spacing">10</property>
+ <object class="GtkLabel" id="label12">
+ <property name="xalign">0.5</property>
+ <property name="yalign">0</property>
+ <property name="wrap">True</property>
+ <property name="max-width-chars">60</property>
+ <property name="label" translatable="yes">In order to use enterprise logins, this computer needs to be enrolled in a domain. Please have your network administrator type the domain password here, and choose a unique computer name for your computer.</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkGrid" id="grid1">
+ <property name="margin-start">12</property>
+ <property name="hexpand">True</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label13">
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">_Domain</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">join_domain</property>
+ <layout>
+ <property name="column">0</property>
+ <property name="row">0</property>
+ </layout>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="join_domain">
+ <property name="margin_top">5</property>
+ <property name="margin_bottom">5</property>
+ <property name="xalign">0</property>
+ <layout>
+ <property name="column">1</property>
+ <property name="row">0</property>
+ </layout>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label18">
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">_Computer</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">join_computer</property>
+ <layout>
+ <property name="column">0</property>
+ <property name="row">1</property>
+ </layout>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkEntry" id="join_computer">
+ <property name="hexpand">True</property>
+ <layout>
+ <property name="column">1</property>
+ <property name="row">1</property>
+ </layout>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label14">
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">Administrator _Name</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">join_name</property>
+ <layout>
+ <property name="column">0</property>
+ <property name="row">2</property>
+ </layout>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkEntry" id="join_name">
+ <property name="hexpand">True</property>
+ <layout>
+ <property name="column">1</property>
+ <property name="row">2</property>
+ </layout>
+ </object>
+ </child>
<child>
- <object class="GtkLabel" id="label12">
- <property name="xalign">0.5</property>
- <property name="yalign">0</property>
- <property name="wrap">True</property>
- <property name="max-width-chars">60</property>
- <property name="label" translatable="yes">In order to use enterprise logins, this computer needs to be enrolled in a domain. Please have your network administrator type the domain password here, and choose a unique computer name for your computer.</property>
+ <object class="GtkLabel" id="label15">
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">Administrator Password</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">join_password</property>
+ <layout>
+ <property name="column">0</property>
+ <property name="row">3</property>
+ </layout>
+ <style>
+ <class name="dim-label"/>
+ </style>
</object>
</child>
<child>
- <object class="GtkGrid" id="grid1">
- <property name="margin-start">12</property>
+ <object class="GtkPasswordEntry" id="join_password">
<property name="hexpand">True</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">12</property>
- <child>
- <object class="GtkLabel" id="label13">
- <property name="xalign">1</property>
- <property name="label" translatable="yes">_Domain</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">join_domain</property>
- <layout>
- <property name="column">0</property>
- <property name="row">0</property>
- </layout>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="join_domain">
- <property name="margin_top">5</property>
- <property name="margin_bottom">5</property>
- <property name="xalign">0</property>
- <layout>
- <property name="column">1</property>
- <property name="row">0</property>
- </layout>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="label18">
- <property name="xalign">1</property>
- <property name="label" translatable="yes">_Computer</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">join_computer</property>
- <layout>
- <property name="column">0</property>
- <property name="row">1</property>
- </layout>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- </child>
- <child>
- <object class="GtkEntry" id="join_computer">
- <property name="hexpand">True</property>
- <layout>
- <property name="column">1</property>
- <property name="row">1</property>
- </layout>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="label14">
- <property name="xalign">1</property>
- <property name="label" translatable="yes">Administrator _Name</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">join_name</property>
- <layout>
- <property name="column">0</property>
- <property name="row">2</property>
- </layout>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- </child>
- <child>
- <object class="GtkEntry" id="join_name">
- <property name="hexpand">True</property>
- <layout>
- <property name="column">1</property>
- <property name="row">2</property>
- </layout>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="label15">
- <property name="xalign">1</property>
- <property name="label" translatable="yes">Administrator Password</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">join_password</property>
- <layout>
- <property name="column">0</property>
- <property name="row">3</property>
- </layout>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- </child>
- <child>
- <object class="GtkPasswordEntry" id="join_password">
- <property name="hexpand">True</property>
- <layout>
- <property name="column">1</property>
- <property name="row">3</property>
- </layout>
- </object>
- </child>
+ <layout>
+ <property name="column">1</property>
+ <property name="row">3</property>
+ </layout>
</object>
</child>
</object>
--
GitLab

View File

@ -16,6 +16,11 @@ URL: https://wiki.gnome.org/Design/OS/InitialSetup
Source0: https://download.gnome.org/sources/%{name}/43/%{name}-%{tarball_version}.tar.xz
Source1: vendor.conf
# Backported from upstream
# https://bugzilla.redhat.com/show_bug.cgi?id=2123494
# https://gitlab.gnome.org/GNOME/gnome-initial-setup/-/merge_requests/159
Patch0: 159.patch
BuildRequires: desktop-file-utils
BuildRequires: gcc
BuildRequires: meson