1 Star 1 Fork 107

ctyunsystem/anaconda

forked from src-openEuler/anaconda 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Fix-hiding-of-network-device-activation-switch.patch 1.22 KB
一键复制 编辑 原始数据 按行查看 历史
t.feng 提交于 2020-06-29 15:28 . update version to 33.19
From 3216e5fc1c39354e66c977f76465303ea2a11859 Mon Sep 17 00:00:00 2001
From: t_feng <fengtao40@huawei.com>
Date: Thu, 18 Jun 2020 16:45:27 +0800
Subject: [PATCH] Fix hiding of network device activation switch
---
pyanaconda/ui/gui/spokes/network.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/network.py b/pyanaconda/ui/gui/spokes/network.py
index d6c1e4b..1318e17 100644
--- a/pyanaconda/ui/gui/spokes/network.py
+++ b/pyanaconda/ui/gui/spokes/network.py
@@ -1019,8 +1019,10 @@ class NetworkControlBox(GObject.GObject):
switch = self.builder.get_object("device_%s_off_switch" % dev_type_str)
if dev_type_str == "wired":
- switch.set_visible(state not in (NM.DeviceState.UNAVAILABLE,
- NM.DeviceState.UNMANAGED))
+ visible = state not in (NM.DeviceState.UNAVAILABLE, NM.DeviceState.UNMANAGED)
+ switch.set_visible(visible)
+ if not visible:
+ switch.set_no_show_all(True)
self._updating_device = True
switch.set_active(state not in (NM.DeviceState.UNMANAGED,
NM.DeviceState.UNAVAILABLE,
--
2.23.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ctyunsystem/anaconda.git
git@gitee.com:ctyunsystem/anaconda.git
ctyunsystem
anaconda
anaconda
master

搜索帮助