!19 power: set no-show-all to TRUE on wifi and mobile rows

From: @chenwei_kernel 
Reviewed-by: @dwl301 
Signed-off-by: @dwl301
This commit is contained in:
openeuler-ci-bot 2022-12-10 03:32:02 +00:00 committed by Gitee
commit 02b40722ce
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 53 additions and 2 deletions

View File

@ -0,0 +1,47 @@
From e44ec937b0fa2f6c7a55bf5793024f0c3112b154 Mon Sep 17 00:00:00 2001
From: Chen Wei <chenwei@xfusion.com>
Date: Sat, 10 Dec 2022 09:48:47 +0800
Subject: [PATCH] power: set no-show-all to TRUE on wifi and mobile rows
From b8e2fd92154a56795b49b434b8b72bcc29c2677f Mon Sep 17 00:00:00 2001
From: Jonathan Kang <jonathankang@gnome.org>
Date: Sun, 30 Sep 2018 14:30:22 +0800
Subject: [PATCH] power: set no-show-all to TRUE on wifi and mobile rows
The Wi-Fi and mobile broadband row's visibility depends on related
device status. But calling gtk_widget_show_all on the whole list box
makes them visible even related device is not avialbe. Fix that by
setting no-show-all of these two widgets as TRUE.
https://gitlab.gnome.org/GNOME/gnome-control-center/issues/189
Signed-off-by: Chen Wei <chenwei@xfusion.com>
---
panels/power/cc-power-panel.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/panels/power/cc-power-panel.c b/panels/power/cc-power-panel.c
index b4c96e1..bfac953 100644
--- a/panels/power/cc-power-panel.c
+++ b/panels/power/cc-power-panel.c
@@ -1893,6 +1893,8 @@ add_power_saving_section (CcPowerPanel *self)
gtk_label_set_mnemonic_widget (GTK_LABEL (label), self->wifi_switch);
gtk_container_add (GTK_CONTAINER (widget), row);
gtk_size_group_add_widget (self->row_sizegroup, row);
+ gtk_widget_show_all (row);
+ gtk_widget_set_no_show_all (self->wifi_row, TRUE);
self->mobile_row = row = no_prelight_row_new ();
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 50);
@@ -1923,6 +1925,8 @@ add_power_saving_section (CcPowerPanel *self)
gtk_label_set_mnemonic_widget (GTK_LABEL (label), self->mobile_switch);
gtk_container_add (GTK_CONTAINER (widget), row);
gtk_size_group_add_widget (self->row_sizegroup, row);
+ gtk_widget_show_all (row);
+ gtk_widget_set_no_show_all (self->mobile_row, TRUE);
g_signal_connect (G_OBJECT (self->mobile_switch), "notify::active",
G_CALLBACK (mobile_switch_changed), self);
--
2.33.0

View File

@ -1,8 +1,8 @@
Name: gnome-control-center
Version: 3.30.1
Release: 11
Release: 12
Summary: GNOME Settings is GNOME's main interface for configuration of various aspects of your desktop.
License: GPLv2+ and CC-BY-SA
License: GPLv2+ and CC-BY-3.0
URL: http://www.gnome.org
Source0: https://github.com/GNOME/gnome-control-center/releases/tag/%{name}-%{version}.tar.xz
@ -39,6 +39,7 @@ Patch9003: gnome-control-center-change-translation-when-changing-password.p
Patch9004: bugfix-duplicate-Current-passwd.patch
Patch9005: gnome-control-center-remove-country-in-the-name-of-timezone.patch
Patch9006: Fix-crashes-when-retrieving-disk-size.patch
Patch9007: backport-bugfix-power-set-no-show-all-to-TRUE-on-wifi-and.patch
%description
Gnome-control-center is a graphical user interface to configure
@ -103,6 +104,9 @@ chrpath --delete %{buildroot}%{_bindir}/gnome-control-center
%{_mandir}/man1/*.gz
%changelog
* Sat Dec 10 2022 Wei Chen <chenwei@xfusion.com> - 3.30.1-12
- power: fix no-show-all to TRUE on wifi and mobile rows
* Sat Aug 29 2020 jinzhimin <jinzhimin2@huawei.com> - 3.30.1-11
- Delete BuildRequires libXxf86misc-devel