[gnome-terminal/wip/egmont/bidi] profile: Add hidden BiDi preference
- From: Egmont Koblinger <egmontkob src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal/wip/egmont/bidi] profile: Add hidden BiDi preference
- Date: Wed, 5 Jun 2019 08:00:01 +0000 (UTC)
commit 3bbad35e9635b7a7cf5abcff2a708066e8dc06e0
Author: Egmont Koblinger <egmont gmail com>
Date: Tue Jun 4 14:13:56 2019 +0200
profile: Add hidden BiDi preference
configure.ac | 2 +-
src/org.gnome.Terminal.gschema.xml | 10 ++++++++++
src/terminal-schemas.h | 2 ++
src/terminal-screen.c | 7 +++++++
4 files changed, 20 insertions(+), 1 deletion(-)
---
diff --git a/configure.ac b/configure.ac
index 9121b3c3..84bd3218 100644
--- a/configure.ac
+++ b/configure.ac
@@ -64,7 +64,7 @@ case "$with_gtk" in
GTK_MIN_REQUIRED=3.8
GTK_MAX_ALLOWED=3.22
VTE_API_VERSION=2.91
- VTE_REQUIRED=0.55.92
+ VTE_REQUIRED=0.57.1
;;
esac
diff --git a/src/org.gnome.Terminal.gschema.xml b/src/org.gnome.Terminal.gschema.xml
index e4e0c003..b9e7d741 100644
--- a/src/org.gnome.Terminal.gschema.xml
+++ b/src/org.gnome.Terminal.gschema.xml
@@ -183,6 +183,16 @@
<summary>Highlight foreground colour</summary>
<description>Custom color for the foreground of the text character at the terminal’s highlight
position, as a color specification (can be HTML-style hex digits, or a color name such as “red”). This is
ignored if highlight-colors-set is false.</description>
</key>
+ <key name="enable-bidi" type="b">
+ <default>true</default>
+ <summary>Whether to perform bidirectional text rendering</summary>
+ <description>If true, perform bidirectional text rendering (“BiDi”).</description>
+ </key>
+ <key name="enable-shaping" type="b">
+ <default>true</default>
+ <summary>Whether to perform Arabic shaping</summary>
+ <description>If true, shape Arabic text.</description>
+ </key>
<key name="allow-bold" type="b">
<default>true</default>
<summary>Whether to allow bold text</summary>
diff --git a/src/terminal-schemas.h b/src/terminal-schemas.h
index ef30bd59..bd2fa8c5 100644
--- a/src/terminal-schemas.h
+++ b/src/terminal-schemas.h
@@ -49,6 +49,8 @@ G_BEGIN_DECLS
#define TERMINAL_PROFILE_DEFAULT_SIZE_COLUMNS_KEY "default-size-columns"
#define TERMINAL_PROFILE_DEFAULT_SIZE_ROWS_KEY "default-size-rows"
#define TERMINAL_PROFILE_DELETE_BINDING_KEY "delete-binding"
+#define TERMINAL_PROFILE_ENABLE_BIDI_KEY "enable-bidi"
+#define TERMINAL_PROFILE_ENABLE_SHAPING_KEY "enable-shaping"
#define TERMINAL_PROFILE_ENCODING_KEY "encoding"
#define TERMINAL_PROFILE_EXIT_ACTION_KEY "exit-action"
#define TERMINAL_PROFILE_FONT_KEY "font"
diff --git a/src/terminal-screen.c b/src/terminal-screen.c
index 23134e80..684da49a 100644
--- a/src/terminal-screen.c
+++ b/src/terminal-screen.c
@@ -829,6 +829,13 @@ terminal_screen_profile_changed_cb (GSettings *profile,
vte_terminal_set_delete_binding (vte_terminal,
g_settings_get_enum (profile, TERMINAL_PROFILE_DELETE_BINDING_KEY));
+ if (!prop_name || prop_name == I_(TERMINAL_PROFILE_ENABLE_BIDI_KEY))
+ vte_terminal_set_enable_bidi (vte_terminal,
+ g_settings_get_boolean (profile, TERMINAL_PROFILE_ENABLE_BIDI_KEY));
+ if (!prop_name || prop_name == I_(TERMINAL_PROFILE_ENABLE_SHAPING_KEY))
+ vte_terminal_set_enable_shaping (vte_terminal,
+ g_settings_get_boolean (profile, TERMINAL_PROFILE_ENABLE_SHAPING_KEY));
+
if (!prop_name || prop_name == I_(TERMINAL_PROFILE_ALLOW_BOLD_KEY))
vte_terminal_set_allow_bold (vte_terminal,
g_settings_get_boolean (profile, TERMINAL_PROFILE_ALLOW_BOLD_KEY));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]