|
|
9e2a93b |
From e786f58127bed4fc980a6f9cf2796947942066c2 Mon Sep 17 00:00:00 2001
|
|
|
9e2a93b |
From: Jiri Konecny <jkonecny@redhat.com>
|
|
|
9e2a93b |
Date: Thu, 17 Feb 2022 21:12:14 +0100
|
|
|
9e2a93b |
Subject: [PATCH 5/6] Disable layout_indicator in Anaconda
|
|
|
9e2a93b |
|
|
|
9e2a93b |
Let's remove the layout indicator in if we can't change the keyboard. It's only
|
|
|
9e2a93b |
confusing because the value may not be correct.
|
|
|
9e2a93b |
|
|
|
9e2a93b |
Resolves: rhbz#2016613
|
|
|
9e2a93b |
(cherry picked from commit 3c0849c2ed92cf6885e4de2315573120a8e1c555)
|
|
|
9e2a93b |
---
|
|
|
9e2a93b |
pyanaconda/ui/gui/__init__.py | 12 +++++++++++-
|
|
|
9e2a93b |
widgets/src/BaseWindow.c | 14 ++++++++++++++
|
|
|
9e2a93b |
widgets/src/BaseWindow.h | 1 +
|
|
|
9e2a93b |
3 files changed, 26 insertions(+), 1 deletion(-)
|
|
|
9e2a93b |
|
|
|
9e2a93b |
diff --git a/pyanaconda/ui/gui/__init__.py b/pyanaconda/ui/gui/__init__.py
|
|
|
9e2a93b |
index 5b95ee99ac..bcd70335ad 100644
|
|
|
9e2a93b |
--- a/pyanaconda/ui/gui/__init__.py
|
|
|
9e2a93b |
+++ b/pyanaconda/ui/gui/__init__.py
|
|
|
9e2a93b |
@@ -43,7 +43,7 @@ from pyanaconda import threading as anaconda_threading
|
|
|
9e2a93b |
from pyanaconda.core.glib import Bytes, GError
|
|
|
9e2a93b |
from pyanaconda.keyboard import can_configure_keyboard
|
|
|
9e2a93b |
from pyanaconda.ui import UserInterface, common
|
|
|
9e2a93b |
-from pyanaconda.ui.gui.utils import unbusyCursor
|
|
|
9e2a93b |
+from pyanaconda.ui.gui.utils import unbusyCursor, really_hide
|
|
|
9e2a93b |
from pyanaconda.core.async_utils import async_action_wait
|
|
|
9e2a93b |
from pyanaconda.ui.gui.utils import watch_children, unwatch_children
|
|
|
9e2a93b |
from pyanaconda.ui.gui.helpers import autoinstall_stopped
|
|
|
9e2a93b |
@@ -160,6 +160,16 @@ class GUIObject(common.UIObject):
|
|
|
9e2a93b |
|
|
|
9e2a93b |
self.builder.connect_signals(self)
|
|
|
9e2a93b |
|
|
|
9e2a93b |
+ # Hide keyboard indicator if we can't configure the keyboard
|
|
|
9e2a93b |
+ # It doesn't really give you any benefit of seeing something which could
|
|
|
9e2a93b |
+ # give you wrong values.
|
|
|
9e2a93b |
+ # This has to be applied to every spoke and hub - we have to ignore dialog and other
|
|
|
9e2a93b |
+ # non full screen parts.
|
|
|
9e2a93b |
+ if not can_configure_keyboard() and isinstance(self.window, AnacondaWidgets.BaseWindow):
|
|
|
9e2a93b |
+ layout_indicator = self.window.get_layout_indicator_box()
|
|
|
9e2a93b |
+ really_hide(layout_indicator)
|
|
|
9e2a93b |
+ layout_indicator.set_sensitive(False)
|
|
|
9e2a93b |
+
|
|
|
9e2a93b |
def _findUIFile(self):
|
|
|
9e2a93b |
path = os.environ.get("UIPATH", "./:/usr/share/anaconda/ui/")
|
|
|
9e2a93b |
dirs = path.split(":")
|
|
|
9e2a93b |
diff --git a/widgets/src/BaseWindow.c b/widgets/src/BaseWindow.c
|
|
|
9e2a93b |
index 629bcfc1d0..669c046530 100644
|
|
|
9e2a93b |
--- a/widgets/src/BaseWindow.c
|
|
|
9e2a93b |
+++ b/widgets/src/BaseWindow.c
|
|
|
9e2a93b |
@@ -557,6 +557,20 @@ GtkWidget *anaconda_base_window_get_help_button(AnacondaBaseWindow *win) {
|
|
|
9e2a93b |
return win->priv->help_button;
|
|
|
9e2a93b |
}
|
|
|
9e2a93b |
|
|
|
9e2a93b |
+/**
|
|
|
9e2a93b |
+ * anaconda_base_window_get_layout_indicator_box:
|
|
|
9e2a93b |
+ * @win: a #AnacondaBaseWindow
|
|
|
9e2a93b |
+ *
|
|
|
9e2a93b |
+ * Returns the AnacondaLayoutIndicator.
|
|
|
9e2a93b |
+ *
|
|
|
9e2a93b |
+ * Returns: (transfer none): the layout indicator box
|
|
|
9e2a93b |
+ *
|
|
|
9e2a93b |
+ * Since: 3.4
|
|
|
9e2a93b |
+ */
|
|
|
9e2a93b |
+GtkWidget *anaconda_base_window_get_layout_indicator_box(AnacondaBaseWindow *win) {
|
|
|
9e2a93b |
+ return win->priv->layout_indicator;
|
|
|
9e2a93b |
+}
|
|
|
9e2a93b |
+
|
|
|
9e2a93b |
/**
|
|
|
9e2a93b |
* anaconda_base_window_get_nav_area_background_window:
|
|
|
9e2a93b |
* @win: a #AnacondaBaseWindow
|
|
|
9e2a93b |
diff --git a/widgets/src/BaseWindow.h b/widgets/src/BaseWindow.h
|
|
|
9e2a93b |
index f9db2537ee..43eef0811d 100644
|
|
|
9e2a93b |
--- a/widgets/src/BaseWindow.h
|
|
|
9e2a93b |
+++ b/widgets/src/BaseWindow.h
|
|
|
9e2a93b |
@@ -83,6 +83,7 @@ GtkWidget *anaconda_base_window_get_main_box (AnacondaBaseWindow *win);
|
|
|
9e2a93b |
GtkWidget *anaconda_base_window_get_nav_area (AnacondaBaseWindow *win);
|
|
|
9e2a93b |
GtkWidget *anaconda_base_window_get_nav_area_background_window (AnacondaBaseWindow *win);
|
|
|
9e2a93b |
GtkWidget *anaconda_base_window_get_help_button (AnacondaBaseWindow *win);
|
|
|
9e2a93b |
+GtkWidget *anaconda_base_window_get_layout_indicator_box (AnacondaBaseWindow *win);
|
|
|
9e2a93b |
|
|
|
9e2a93b |
G_END_DECLS
|
|
|
9e2a93b |
|
|
|
9e2a93b |
--
|
|
|
9e2a93b |
2.35.1
|
|
|
9e2a93b |
|