diff options
author | Pablo Correa Gómez <ablocorrea@hotmail.com> | 2022-07-01 12:06:20 +0200 |
---|---|---|
committer | alice <alice@ayaya.dev> | 2022-07-02 04:19:26 +0000 |
commit | 540bb9c2cb957f0e7f144cd44c78aa1913a14951 (patch) | |
tree | a05d0668dcfe4c15f253edbac72f51f363da958d | |
parent | 5869c3c009213742631b6abd32fa8317b26cc366 (diff) |
community/gnome-control-center: upgrade to 42.3
One patch has been merged upstream, the new one is in the merge
queue, works and fixes quite a serious bug for mobile use.
-rw-r--r-- | community/gnome-control-center/APKBUILD | 8 | ||||
-rw-r--r-- | community/gnome-control-center/fix-change-password.patch | 92 | ||||
-rw-r--r-- | community/gnome-control-center/fix-user-back-panel.patch | 131 |
3 files changed, 135 insertions, 96 deletions
diff --git a/community/gnome-control-center/APKBUILD b/community/gnome-control-center/APKBUILD index a0a1f051c9d..e8123009320 100644 --- a/community/gnome-control-center/APKBUILD +++ b/community/gnome-control-center/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Rasmus Thomsen <oss@cogitri.dev> # Maintainer: Pablo Correa Gomez <ablocorrea@hotmail.com> pkgname=gnome-control-center -pkgver=42.2 +pkgver=42.3 pkgrel=0 pkgdesc="GNOME control center" url="https://gitlab.gnome.org/GNOME/gnome-control-center" @@ -56,7 +56,7 @@ install="$pkgname.pre-install $pkgname.pre-upgrade" subpackages="$pkgname-dbg $pkgname-dev $pkgname-lang $pkgname-doc $pkgname-bash-completion" source="https://download.gnome.org/sources/gnome-control-center/${pkgver%.*}/gnome-control-center-$pkgver.tar.xz README.alpine - fix-change-password.patch + fix-user-back-panel.patch removable-media-fit-narrow.patch 0001-common-Wrap-CcPermissionInfobar-labels-to-fit-in-nar.patch 0002-display-Wrap-Night-Light-GtkInfoBar-label-to-fit-in-.patch @@ -90,9 +90,9 @@ package() { } sha512sums=" -f8fda1a501939788de62a33d1570e45b95392165d23f90cb4c1ae94c92f61d5f5d72d1e25df1a9fb355ea88abecf7bf38bc67c69fb2b3495d027365deb44f21c gnome-control-center-42.2.tar.xz +eb82f65b580637fa057196daed836b3ea24a223b9932a2063b2879357f8a62626a6939835dc165a6d3c5706d16b99192301d4de021e68faaabb8d2ecc2a317a3 gnome-control-center-42.3.tar.xz 350aa443149c71851ad4de0976c7fc5cb626ba0c57a8d41e6ef80da1c65ed84a4dfa2483ae92630a3b611c4bfa9360ded82b55e8cd0e3907294c025e4f6b1671 README.alpine -eb964c6494edfb904509cbd14d73ec2ee1f0ba7fb74b67a1468e68c59876a1d26a7b8ec8d59c534910c4038f1f543b6ed566d34b31bbb659f01a34169587676f fix-change-password.patch +cc2748b5cfdce6cf4a6eae0a0b723bff49397278f9acda470a5b13dc6f9560ac73e222fc380a8aff02a715a99326204132e7229a16e1ff73927e88e395bdfab0 fix-user-back-panel.patch 507a3d3bdf79cce908a17cd6779bad0d787b6d707fe7c96f92d2310b0c20a772f6c50b951a4c7d7edd50fbbd89c39ac7c38aebe490192825b37d4283bfbd4010 removable-media-fit-narrow.patch b0ba1e5b3431029d98b87d461f9f29bc142cc6460dd6df902f1773f174beb911495d2ece80737425cd8325129fb8579bdf6bc5f1fd06548ed159153fc000a286 0001-common-Wrap-CcPermissionInfobar-labels-to-fit-in-nar.patch 6e8ba6a1422a0103b7bc4c6e87df6fe64e9454e3960d116e088794e78d096a4e887d0c562809482b1ab414399b1863495075076a85825baf4357d7fdad5e1b55 0002-display-Wrap-Night-Light-GtkInfoBar-label-to-fit-in-.patch diff --git a/community/gnome-control-center/fix-change-password.patch b/community/gnome-control-center/fix-change-password.patch deleted file mode 100644 index e38c62d3c20..00000000000 --- a/community/gnome-control-center/fix-change-password.patch +++ /dev/null @@ -1,92 +0,0 @@ -commit 16a490068 -Author: Pablo Correa Gómez <ablocorrea@hotmail.com> -Date: Tue May 17 12:19:08 2022 +0200 - - user-accounts: run-passwd: Redirect stderr to stdout in the child - - The previous code was prone to race conditions if the child already - started writing to stdout before the dup2 call happened. This has - been detected in postmarketOS[1] and I also reproduced it in Alpine - Linux. Since passwd writes to stderr and linux-pam to stdout, the - redirection was needed. However, linux-pam was failing with - "Conversation error" since an fprintf(stdout, ...) call wasn't - able to write to an already-closed stdout. - - This problem is fixed by setting the redirection in the child setup - function and ignoring the stderr pipe. It also fixes a leak, where - the stderr fd was simply ignored and never closed. - - [1] https://gitlab.com/postmarketOS/pmaports/-/issues/1449 - - Backported from https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1325 - -diff --git a/panels/user-accounts/run-passwd.c b/panels/user-accounts/run-passwd.c -index 86f53d4fc..edbc99830 100644 ---- a/panels/user-accounts/run-passwd.c -+++ b/panels/user-accounts/run-passwd.c -@@ -32,6 +32,7 @@ - - #include <unistd.h> - #include <errno.h> -+#include <stdio.h> - #include <string.h> - #include <sys/wait.h> - -@@ -136,9 +137,10 @@ child_watch_cb (GPid pid, gint status, PasswdHandler *passwd_handler) - } - - static void --ignore_sigpipe (gpointer data) -+child_setup_cb (gpointer data) - { -- signal (SIGPIPE, SIG_IGN); -+ signal (SIGPIPE, SIG_IGN); -+ dup2 (fileno (stdout), fileno (stderr)); - } - - /* Spawn passwd backend -@@ -148,7 +150,7 @@ spawn_passwd (PasswdHandler *passwd_handler, GError **error) - { - gchar *argv[2]; - gchar **envp; -- gint my_stdin, my_stdout, my_stderr; -+ gint my_stdin, my_stdout; - - argv[0] = "/usr/bin/passwd"; /* Is it safe to rely on a hard-coded path? */ - argv[1] = NULL; -@@ -160,12 +162,12 @@ spawn_passwd (PasswdHandler *passwd_handler, GError **error) - argv, /* Argument vector */ - envp, /* Environment */ - G_SPAWN_DO_NOT_REAP_CHILD, /* Flags */ -- ignore_sigpipe, /* Child setup */ -+ child_setup_cb, /* Child setup */ - NULL, /* Data to child setup */ - &passwd_handler->backend_pid, /* PID */ - &my_stdin, /* Stdin */ - &my_stdout, /* Stdout */ -- &my_stderr, /* Stderr */ -+ NULL, /* Stderr */ - error)) { /* GError */ - - /* An error occurred */ -@@ -178,20 +180,6 @@ spawn_passwd (PasswdHandler *passwd_handler, GError **error) - - g_strfreev (envp); - -- /* 2>&1 */ -- if (dup2 (my_stderr, my_stdout) == -1) { -- /* Failed! */ -- g_set_error_literal (error, -- PASSWD_ERROR, -- PASSWD_ERROR_BACKEND, -- strerror (errno)); -- -- /* Clean up */ -- stop_passwd (passwd_handler); -- -- return FALSE; -- } -- - /* Open IO Channels */ - passwd_handler->backend_stdin = g_io_channel_unix_new (my_stdin); - passwd_handler->backend_stdout = g_io_channel_unix_new (my_stdout); diff --git a/community/gnome-control-center/fix-user-back-panel.patch b/community/gnome-control-center/fix-user-back-panel.patch new file mode 100644 index 00000000000..26f88f655a0 --- /dev/null +++ b/community/gnome-control-center/fix-user-back-panel.patch @@ -0,0 +1,131 @@ +From 2f24858f0cfe830a1fc168ccc0033d4b7091cbbd Mon Sep 17 00:00:00 2001 +From: Mpho Jele <mphokjele@gmail.com> +Date: Sun, 19 Jun 2022 16:45:45 +0200 +Subject: [PATCH 1/2] user-accounts: Show the back button when window leaflet + folds + +Currently the back button is only shown when viewing a user from the +"other users" list. +These changes show the back button when the window AdwLeaflet is +folded or when the selected is from the "other users" list but never +when the window is not folded and the selected user is the current +user. + +Fixes: #1719 +--- + panels/user-accounts/cc-user-panel.c | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + +diff --git a/panels/user-accounts/cc-user-panel.c b/panels/user-accounts/cc-user-panel.c +index d2481a48f..244ce71e9 100644 +--- a/panels/user-accounts/cc-user-panel.c ++++ b/panels/user-accounts/cc-user-panel.c +@@ -789,6 +789,19 @@ update_fingerprint_row_state (CcUserPanel *self, GParamSpec *spec, CcFingerprint + gtk_label_set_text (self->fingerprint_state_label, _("Disabled")); + } + ++static void ++show_or_hide_back_button (CcUserPanel *self) ++{ ++ gboolean show; ++ gboolean folded; ++ ++ g_object_get(self, "folded", &folded, NULL); ++ ++ show = folded || act_user_get_uid (self->selected_user) != getuid(); ++ ++ gtk_widget_set_visible (GTK_WIDGET (self->back_button), show); ++} ++ + static void + show_user (ActUser *user, CcUserPanel *self) + { +@@ -888,6 +901,7 @@ show_user (ActUser *user, CcUserPanel *self) + gtk_widget_set_visible (GTK_WIDGET (self->account_settings_box), !show); + gtk_widget_set_visible (GTK_WIDGET (self->remove_user_button), !show); + gtk_widget_set_visible (GTK_WIDGET (self->back_button), !show); ++ show_or_hide_back_button(self); + gtk_widget_set_visible (GTK_WIDGET (self->other_users), show); + + /* Last login: show when administrator or current user */ +@@ -1447,6 +1461,11 @@ cc_user_panel_init (CcUserPanel *self) + self->login_screen_settings = settings_or_null ("org.gnome.login-screen"); + + setup_main_window (self); ++ ++ g_signal_connect_swapped (self, ++ "notify::folded", ++ G_CALLBACK (show_or_hide_back_button), ++ self); + } + + static void +-- +GitLab + + +From b1d99420d41a8cfd7f68f5325cbe68081d013148 Mon Sep 17 00:00:00 2001 +From: Mpho Jele <mphokjele@gmail.com> +Date: Sun, 19 Jun 2022 16:55:02 +0200 +Subject: [PATCH 2/2] user-accounts: Make back button switch to current user or + panels list + +When the window AdwLeaflet is folded the back button should either +switch to the panels list if the selected user is the current user +or switch to the current user if the selected user is from the +"other users" list +--- + panels/user-accounts/cc-user-panel.c | 17 ++++++++++++++++- + panels/user-accounts/cc-user-panel.ui | 2 +- + 2 files changed, 17 insertions(+), 2 deletions(-) + +diff --git a/panels/user-accounts/cc-user-panel.c b/panels/user-accounts/cc-user-panel.c +index 244ce71e9..6b750d926 100644 +--- a/panels/user-accounts/cc-user-panel.c ++++ b/panels/user-accounts/cc-user-panel.c +@@ -185,6 +185,21 @@ show_current_user (CcUserPanel *self) + show_user (user, self); + } + ++ ++static void ++on_back_button_clicked_cb (CcUserPanel *self) ++{ ++ ++ if (act_user_get_uid (self->selected_user) == getuid ()) { ++ gtk_widget_activate_action (GTK_WIDGET (self), ++ "window.navigate", ++ "i", ++ ADW_NAVIGATION_DIRECTION_BACK); ++ } else { ++ show_current_user (self); ++ } ++} ++ + static const gchar * + get_real_or_user_name (ActUser *user) + { +@@ -1549,6 +1564,6 @@ cc_user_panel_class_init (CcUserPanelClass *klass) + gtk_widget_class_bind_template_callback (widget_class, dismiss_notification); + gtk_widget_class_bind_template_callback (widget_class, restart_now); + gtk_widget_class_bind_template_callback (widget_class, set_selected_user); +- gtk_widget_class_bind_template_callback (widget_class, show_current_user); ++ gtk_widget_class_bind_template_callback (widget_class, on_back_button_clicked_cb); + gtk_widget_class_bind_template_callback (widget_class, show_history); + } +diff --git a/panels/user-accounts/cc-user-panel.ui b/panels/user-accounts/cc-user-panel.ui +index ca65e7f70..7a578d8c0 100644 +--- a/panels/user-accounts/cc-user-panel.ui ++++ b/panels/user-accounts/cc-user-panel.ui +@@ -30,7 +30,7 @@ + <object class="GtkButton" id="back_button"> + <property name="visible">False</property> + <property name="icon-name">go-previous-symbolic</property> +- <signal name="clicked" handler="show_current_user" object="CcUserPanel" swapped="yes"/> ++ <signal name="clicked" handler="on_back_button_clicked_cb" object="CcUserPanel" swapped="yes"/> + </object> + </child> + </object> +-- +GitLab + |