[gnome-terminal/wip/egmont/bidi] profile: Add hidden BiDi preference



commit fd9025fafb99117d7b2614696287b32b788204dc
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 | 5 +++++
 src/terminal-schemas.h             | 1 +
 src/terminal-screen.c              | 4 ++++
 4 files changed, 11 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..b5fc6acb 100644
--- a/src/org.gnome.Terminal.gschema.xml
+++ b/src/org.gnome.Terminal.gschema.xml
@@ -183,6 +183,11 @@
       <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="allow-bidi" type="b">
+      <default>true</default>
+      <summary>Whether to allow bidirectional text rendering</summary>
+      <description>If true, allow bidirectional text rendering (“BiDi”) and Arabic shaping.</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..68dcf24b 100644
--- a/src/terminal-schemas.h
+++ b/src/terminal-schemas.h
@@ -30,6 +30,7 @@ G_BEGIN_DECLS
 #define TERMINAL_SETTINGS_LIST_SCHEMA   "org.gnome.Terminal.SettingsList"
 #define TERMINAL_PROFILES_LIST_SCHEMA   "org.gnome.Terminal.ProfilesList"
 
+#define TERMINAL_PROFILE_ALLOW_BIDI_KEY                 "allow-bidi"
 #define TERMINAL_PROFILE_ALLOW_BOLD_KEY                 "allow-bold"
 #define TERMINAL_PROFILE_AUDIBLE_BELL_KEY               "audible-bell"
 #define TERMINAL_PROFILE_BOLD_IS_BRIGHT_KEY             "bold-is-bright"
diff --git a/src/terminal-screen.c b/src/terminal-screen.c
index 23134e80..260271c5 100644
--- a/src/terminal-screen.c
+++ b/src/terminal-screen.c
@@ -829,6 +829,10 @@ 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_ALLOW_BIDI_KEY))
+    vte_terminal_set_allow_bidi (vte_terminal,
+                                 g_settings_get_boolean (profile, TERMINAL_PROFILE_ALLOW_BIDI_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]