[gnome-terminal] screen: Don't override the profile encoding



commit 1de0a8a7d80efcb0aa7267091093bc26bd19fce5
Author: Christian Persch <chpe src gnome org>
Date:   Wed Nov 20 23:12:53 2019 +0100

    screen: Don't override the profile encoding
    
    https://bugzilla.gnome.org/show_bug.cgi?id=732128

 src/terminal-gdbus.c  | 10 +---------
 src/terminal-screen.c | 12 ------------
 src/terminal-screen.h |  1 -
 src/terminal-window.c |  1 -
 src/terminal.c        |  1 -
 5 files changed, 1 insertion(+), 24 deletions(-)
---
diff --git a/src/terminal-gdbus.c b/src/terminal-gdbus.c
index f58e2fa8..b9bfcf5b 100644
--- a/src/terminal-gdbus.c
+++ b/src/terminal-gdbus.c
@@ -453,14 +453,6 @@ terminal_factory_impl_create_instance (TerminalFactory *factory,
       zoom = 1.0;
   }
 
-  const char *encoding;
-  if (!g_variant_lookup (options, "encoding", "&s", &encoding)) {
-    if (parent_screen != NULL)
-      encoding = vte_terminal_get_encoding (VTE_TERMINAL (parent_screen));
-    else
-      encoding = NULL; /* use profile encoding */
-  }
-
   /* Look up the profile */
   gs_unref_object GSettings *profile = NULL;
   const char *profile_uuid;
@@ -484,7 +476,7 @@ terminal_factory_impl_create_instance (TerminalFactory *factory,
   g_assert_nonnull (profile);
 
   /* Now we can create the new screen */
-  TerminalScreen *screen = terminal_screen_new (profile, encoding, title, zoom);
+  TerminalScreen *screen = terminal_screen_new (profile, title, zoom);
   terminal_window_add_screen (window, screen, -1);
 
   /* Apply window properties */
diff --git a/src/terminal-screen.c b/src/terminal-screen.c
index 4f3297ec..dc9f8447 100644
--- a/src/terminal-screen.c
+++ b/src/terminal-screen.c
@@ -763,7 +763,6 @@ terminal_screen_finalize (GObject *object)
 
 TerminalScreen *
 terminal_screen_new (GSettings       *profile,
-                     const char      *charset,
                      const char      *title,
                      double           zoom)
 {
@@ -773,17 +772,6 @@ terminal_screen_new (GSettings       *profile,
 
   terminal_screen_set_profile (screen, profile);
 
-  /* If we got an encoding together with an override command,
-   * override the profile encoding; otherwise use the profile
-   * encoding (set above). Note that this will still use the
-   * profile's encoding if it's changed during the lifetime
-   * of this terminal.
-   */
-  if (charset != NULL)
-    vte_terminal_set_encoding (VTE_TERMINAL (screen),
-                               charset,
-                               NULL);
-
   vte_terminal_set_size (VTE_TERMINAL (screen),
                          g_settings_get_int (profile, TERMINAL_PROFILE_DEFAULT_SIZE_COLUMNS_KEY),
                          g_settings_get_int (profile, TERMINAL_PROFILE_DEFAULT_SIZE_ROWS_KEY));
diff --git a/src/terminal-screen.h b/src/terminal-screen.h
index 82384bb4..8ea33786 100644
--- a/src/terminal-screen.h
+++ b/src/terminal-screen.h
@@ -76,7 +76,6 @@ GType terminal_screen_get_type (void) G_GNUC_CONST;
 const char *terminal_screen_get_uuid (TerminalScreen *screen);
 
 TerminalScreen *terminal_screen_new (GSettings       *profile,
-                                     const char      *charset,
                                      const char      *title,
                                      double           zoom);
 
diff --git a/src/terminal-window.c b/src/terminal-window.c
index 7c263e03..c184bab8 100644
--- a/src/terminal-window.c
+++ b/src/terminal-window.c
@@ -397,7 +397,6 @@ action_new_terminal_cb (GSimpleAction *action,
     window = terminal_window_new (G_APPLICATION (app));
 
   TerminalScreen *screen = terminal_screen_new (profile,
-                                                NULL /* charset */,
                                                 NULL /* title */,
                                                 1.0);
 
diff --git a/src/terminal.c b/src/terminal.c
index 601b7d22..8e0aca42 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -393,7 +393,6 @@ handle_options (TerminalOptions *options,
                 const char *parent_screen_object_path,
                 TerminalReceiver **wait_for_receiver)
 {
-
   /* We need to forward the locale encoding to the server, see bug #732128 */
   const char *encoding;
   g_get_charset (&encoding);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]