[gnome-terminal/wip/rishi/issue-37] prefs: Fix the visibility of the new-terminal-mode GSetting UI
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal/wip/rishi/issue-37] prefs: Fix the visibility of the new-terminal-mode GSetting UI
- Date: Fri, 5 Oct 2018 17:00:26 +0000 (UTC)
commit 7fe0fb500d00223ffaf9bab7d3277c59beb07f98
Author: Debarshi Ray <debarshir gnome org>
Date: Wed Mar 28 18:50:16 2018 +0200
prefs: Fix the visibility of the new-terminal-mode GSetting UI
... when the new-terminal menus are disunified.
Since it's not possible to use DISUNIFY_NEW_TERMINAL_SECTION, it
should check the unified-menu GSetting instead.
Fallout from 30efce621ad04276771aa311f52731b468c4adfd
https://gitlab.gnome.org/GNOME/gnome-terminal/issues/37
src/terminal-prefs.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/src/terminal-prefs.c b/src/terminal-prefs.c
index 4d8dcf29..f5262650 100644
--- a/src/terminal-prefs.c
+++ b/src/terminal-prefs.c
@@ -848,16 +848,16 @@ terminal_prefs_show_preferences (GSettings *profile, const char *widget_name)
gtk_widget_set_visible (theme_variant_combo, FALSE);
#endif /* GTK+ 3.19 */
-#ifndef DISUNIFY_NEW_TERMINAL_SECTION
- g_settings_bind (settings,
- TERMINAL_SETTING_NEW_TERMINAL_MODE_KEY,
- new_terminal_mode_combo,
- "active-id",
- G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
-#else
- gtk_widget_set_visible (new_terminal_mode_label, FALSE);
- gtk_widget_set_visible (new_terminal_mode_combo, FALSE);
-#endif
+ if (terminal_app_get_menu_unified (app)) {
+ g_settings_bind (settings,
+ TERMINAL_SETTING_NEW_TERMINAL_MODE_KEY,
+ new_terminal_mode_combo,
+ "active-id",
+ G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
+ } else {
+ gtk_widget_set_visible (new_terminal_mode_label, FALSE);
+ gtk_widget_set_visible (new_terminal_mode_combo, FALSE);
+ }
if (shell_shows_menubar) {
gtk_widget_set_visible (disable_mnemonics_button, FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]