[gnome-terminal] client: legacy: Use pref to decide whether to open a new window or tab
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal] client: legacy: Use pref to decide whether to open a new window or tab
- Date: Sat, 11 Nov 2017 20:50:03 +0000 (UTC)
commit 80c4bf763e79fcfb52b8b50c0c68dd2474a5a378
Author: Christian Persch <chpe src gnome org>
Date: Sat Nov 11 21:49:12 2017 +0100
client: legacy: Use pref to decide whether to open a new window or tab
When no explicit --tab or --window option is given, use the
global pref to decide.
https://bugzilla.gnome.org/show_bug.cgi?id=83203#c75
src/terminal-options.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/terminal-options.c b/src/terminal-options.c
index 4d74a26..c212b6a 100644
--- a/src/terminal-options.c
+++ b/src/terminal-options.c
@@ -32,6 +32,7 @@
#include "terminal-options.h"
#include "terminal-client-utils.h"
#include "terminal-defines.h"
+#include "terminal-schemas.h"
#include "terminal-screen.h"
#include "terminal-app.h"
#include "terminal-util.h"
@@ -1205,7 +1206,14 @@ terminal_options_merge_config (TerminalOptions *options,
void
terminal_options_ensure_window (TerminalOptions *options)
{
- ensure_top_window (options, FALSE);
+ gs_unref_object GSettings *global_settings =
+ g_settings_new (TERMINAL_SETTING_SCHEMA);
+
+ gs_free char *mode_str = g_settings_get_string (global_settings,
+ TERMINAL_SETTING_NEW_TERMINAL_MODE_KEY);
+
+ gboolean implicit_if_first_window = g_str_equal (mode_str, "tab");
+ ensure_top_window (options, implicit_if_first_window);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]