代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/anaconda 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From cf192d77045b8aeb8cdcd55c98a93ad64fea3c3b Mon Sep 17 00:00:00 2001
From: t_feng <fengtao40@huawei.com>
Date: Fri, 19 Jun 2020 09:20:14 +0800
Subject: [PATCH] hide help button
---
data/tmux.conf | 3 +--
pyanaconda/ui/gui/__init__.py | 27 ---------------------------
widgets/src/BaseWindow.c | 21 ---------------------
3 files changed, 1 insertion(+), 50 deletions(-)
diff --git a/data/tmux.conf b/data/tmux.conf
index 87c9cb7..63240f7 100644
--- a/data/tmux.conf
+++ b/data/tmux.conf
@@ -1,7 +1,6 @@
# tmux.conf for the anaconda environment
bind -n M-tab next
-bind -n F1 list-keys
set-option -s exit-unattached off
set-option -g base-index 1
@@ -25,7 +24,7 @@ set-option -g history-limit 10000
# rhbz#1722181
new-session -d -s anaconda -n main "LD_PRELOAD=libgomp.so.1 anaconda"
-set-option status-right '#[fg=blue]#(echo -n "Switch tab: Alt+Tab | Help: F1 ")'
+set-option status-right '#[fg=blue]#(echo -n "Switch tab: Alt+Tab ")'
new-window -d -n shell "bash --login"
new-window -d -n log "tail -F /tmp/anaconda.log"
diff --git a/pyanaconda/ui/gui/__init__.py b/pyanaconda/ui/gui/__init__.py
index 06373d9..6a6e3b9 100644
--- a/pyanaconda/ui/gui/__init__.py
+++ b/pyanaconda/ui/gui/__init__.py
@@ -443,20 +443,6 @@ class MainWindow(Gtk.Window):
# Return False to indicate that the child allocation is not yet set
return False
- def _on_mnemonics_visible_changed(self, window, property_type, obj):
- # mnemonics display has been activated or deactivated,
- # add or remove the F1 mnemonics display from the help button
- help_button = obj.window.get_help_button()
- if window.props.mnemonics_visible:
- # save current label
- old_label = help_button.get_label()
- self._saved_help_button_label = old_label
- # add the (F1) "mnemonics" to the help button
- help_button.set_label("%s (F1)" % old_label)
- else:
- # restore the old label
- help_button.set_label(self._saved_help_button_label)
-
def _on_child_added(self, widget, user_data):
# If this is GtkLabel, apply the language attribute
if isinstance(widget, Gtk.Label):
@@ -480,8 +466,6 @@ class MainWindow(Gtk.Window):
old_screen = self._stack.get_visible_child()
if old_screen:
old_screen.remove_accelerator(self._accel_group, Gdk.KEY_F12, 0)
- old_screen.remove_accelerator(self._accel_group, Gdk.KEY_F1, 0)
- old_screen.remove_accelerator(self._accel_group, Gdk.KEY_F1, Gdk.ModifierType.MOD1_MASK)
# Check if the widget is already on the stack
if child not in self._stack_contents:
@@ -498,17 +482,6 @@ class MainWindow(Gtk.Window):
child.window.add_accelerator("button-clicked", self._accel_group,
Gdk.KEY_F12, 0, 0)
- # Configure the help button
- child.window.add_accelerator("help-button-clicked", self._accel_group,
- Gdk.KEY_F1, 0, 0)
- child.window.add_accelerator("help-button-clicked", self._accel_group,
- Gdk.KEY_F1, Gdk.ModifierType.MOD1_MASK, 0)
-
- # Connect to mnemonics-visible to add the (F1) mnemonic to the button label
- if self._mnemonic_signal:
- self.disconnect(self._mnemonic_signal)
- self._mnemonic_signal = self.connect("notify::mnemonics-visible", self._on_mnemonics_visible_changed, child)
-
self._stack.set_visible_child(child.window)
if child.focusWidgetName:
diff --git a/widgets/src/BaseWindow.c b/widgets/src/BaseWindow.c
index 6a1e372..203d4a7 100644
--- a/widgets/src/BaseWindow.c
+++ b/widgets/src/BaseWindow.c
@@ -393,30 +393,11 @@ G_GNUC_END_IGNORE_DEPRECATIONS
gtk_widget_set_margin_top(win->priv->layout_indicator, 6);
gtk_widget_set_margin_bottom(win->priv->layout_indicator, 6);
- /* Create the help button. */
- win->priv->help_button = gtk_button_new_with_label(_(HELP_BUTTON_LABEL));
- gtk_widget_set_halign(win->priv->help_button, GTK_ALIGN_END);
- gtk_widget_set_vexpand(win->priv->help_button, FALSE);
- gtk_widget_set_valign(win->priv->help_button, GTK_ALIGN_END);
- gtk_widget_set_margin_bottom(win->priv->help_button, 6);
- gtk_widget_set_name(win->priv->help_button, "anaconda-help-button");
-
- atk = gtk_widget_get_accessible(win->priv->help_button);
- atk_object_set_name(atk, _(HELP_BUTTON_LABEL));
-
- /* Hook up some signals for that button. The signal handlers here will
- * just raise our own custom signals for the whole window.
- */
- g_signal_connect(win->priv->help_button, "clicked",
- G_CALLBACK(anaconda_base_window_help_button_clicked), win);
-
-
/* Add everything to the nav area. */
gtk_grid_attach(GTK_GRID(win->priv->nav_area), win->priv->name_label, 0, 0, 1, 1);
gtk_grid_attach(GTK_GRID(win->priv->nav_area), win->priv->distro_label, 1, 0, 2, 1);
gtk_grid_attach(GTK_GRID(win->priv->nav_area), win->priv->beta_label, 1, 1, 1, 1);
gtk_grid_attach(GTK_GRID(win->priv->nav_area), win->priv->layout_indicator, 1, 2, 1, 1);
- gtk_grid_attach(GTK_GRID(win->priv->nav_area), win->priv->help_button, 2, 1, 1, 2);
/* Last thing for the main_box is a revealer for the info bar */
win->priv->info_revealer = gtk_revealer_new();
@@ -832,8 +813,6 @@ void anaconda_base_window_retranslate(AnacondaBaseWindow *win) {
gtk_label_set_text(GTK_LABEL(win->priv->beta_label), _(win->priv->orig_beta));
- gtk_button_set_label(GTK_BUTTON(win->priv->help_button), _(HELP_BUTTON_LABEL));
-
/* retranslate the layout indicator */
anaconda_layout_indicator_retranslate(ANACONDA_LAYOUT_INDICATOR(win->priv->layout_indicator));
}
--
2.23.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。