[Xfce4-commits] [apps/xfce4-terminal] 01/01: Revert "Respect the "Working Directory" setting when opening initial window"

noreply at xfce.org noreply at xfce.org
Fri Dec 27 20:22:44 CET 2019


This is an automated email from the git hooks/post-receive script.

f   2   4   0   4       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/xfce4-terminal.

commit 7b024aa09bd4553269d616835dac6fff19d9fcf1
Author: Igor <f2404 at yandex.ru>
Date:   Fri Dec 27 14:07:57 2019 -0500

    Revert "Respect the "Working Directory" setting when opening initial window"
    
    This change broke the "Open terminal here" functionality in Thunar and
    other apss.
    
    This reverts commit 1ca21ae3fb1dffa6e7e54cc73a2c4a98f954a73f.
    
    Fixes bug #16307.
---
 terminal/main.c            |  2 ++
 terminal/terminal-screen.c | 11 +----------
 2 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/terminal/main.c b/terminal/main.c
index c618c89..9252852 100644
--- a/terminal/main.c
+++ b/terminal/main.c
@@ -243,6 +243,8 @@ main (int argc, char **argv)
   /* create a copy of the standard arguments with our additional stuff */
   nargv = g_new (gchar*, argc + 5); nargc = 0;
   nargv[nargc++] = g_strdup (argv[0]);
+  nargv[nargc++] = g_strdup ("--default-working-directory");
+  nargv[nargc++] = g_get_current_dir ();
 
   /* append startup if given */
   startup_id = g_getenv ("DESKTOP_STARTUP_ID");
diff --git a/terminal/terminal-screen.c b/terminal/terminal-screen.c
index ad40cf2..f2ba041 100644
--- a/terminal/terminal-screen.c
+++ b/terminal/terminal-screen.c
@@ -294,10 +294,8 @@ terminal_screen_class_init (TerminalScreenClass *klass)
 static void
 terminal_screen_init (TerminalScreen *screen)
 {
-  gchar    *default_dir;
-  gboolean  use_default_dir;
-
   screen->loader = NULL;
+  screen->working_directory = g_get_current_dir ();
   screen->dynamic_title_mode = TERMINAL_TITLE_DEFAULT;
   screen->session_id = ++screen_last_session_id;
   screen->pid = -1;
@@ -334,13 +332,6 @@ terminal_screen_init (TerminalScreen *screen)
   g_signal_connect (G_OBJECT (screen->preferences), "notify",
       G_CALLBACK (terminal_screen_preferences_changed), screen);
 
-  /* set working directory - from the preferences, if available, or the current dir otherwise */
-  g_object_get (G_OBJECT (screen->preferences),
-                "use-default-working-dir", &use_default_dir,
-                "default-working-dir", &default_dir,
-                NULL);
-  screen->working_directory = (use_default_dir && g_strcmp0 (default_dir, "") != 0) ? default_dir : g_get_current_dir ();
-
   /* show the terminal */
   gtk_widget_show_all (screen->hbox);
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list