Kaydet (Commit) de2b01da authored tarafından Nick Treleaven's avatar Nick Treleaven

Store VTE path with the session (based on patch by Nicolas

Sierro, thanks).
There's still a bug with loading a project at startup; closing the
project doesn't restore old VTE path.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5707 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 3aa483d8
......@@ -3,6 +3,11 @@
* plugins/filebrowser.c:
Update path when saving a new document for the first time if the
follow path option is enabled.
* src/about.c, src/keyfile.c, THANKS:
Store VTE path with the session (based on patch by Nicolas
Sierro, thanks).
There's still a bug with loading a project at startup; closing the
project doesn't restore old VTE path.
2011-04-10 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
......
......@@ -88,6 +88,7 @@ Mário Silva <sharelider(at)gmail(dot)com> - Lisp filetype
Taylor Venable <taylor(at)metasyntax(dot)net> - Erlang filetype
Manuel Bua <manuel(dot)bua(at)gmail(dot)com> - Ensure consistent line endings pref.
Matthew Brush <codebrainz(at)users(dot)sourceforge(dot)net> - Various patches.
Nicolas Sierro <nicolas@sierro.net> - store VTE path with session patch
Translators:
------------
......
......@@ -98,7 +98,8 @@ static const gchar *contributors =
"John Gabriele, Jon Senior, Jon Strait, Josef Whiter, "
"Jörn Reder, Kelvin Gardiner, Kevin Ellwood, Kristoffer A. Tjernås, Lex Trotman, "
"Manuel Bua, Mário Silva, Marko Peric, Matthew Brush, Matti Mårds, "
"Moritz Barsnick, Ondrej Donek, Peter Strand, Philipp Gildein, Pierre Joye, Rob van der Linde, "
"Moritz Barsnick, Nicolas Sierro, Ondrej Donek, Peter Strand, Philipp Gildein, "
"Pierre Joye, Rob van der Linde, "
"Robert McGinley, Roland Baudin, Ross McKay, S Jagannathan, Saleem Abdulrasool, "
"Sebastian Kraft, Shiv, Slava Semushin, Stefan Oltmanns, Tamim, Taylor Venable, "
"Thomas Huth, Thomas Martitz, Tomás Vírseda, "
......
......@@ -335,6 +335,14 @@ void configuration_save_session_files(GKeyFile *config)
i++;
}
}
#ifdef HAVE_VTE
if (vte_info.have_vte)
{
vte_get_working_directory(); /* refresh vte_info.dir */
g_key_file_set_string(config, "VTE", "last_dir", vte_info.dir);
}
#endif
}
......@@ -482,8 +490,6 @@ static void save_dialog_prefs(GKeyFile *config)
tmp_string = utils_get_hex_from_color(vc->colour_back);
g_key_file_set_string(config, "VTE", "colour_back", tmp_string);
g_free(tmp_string);
vte_get_working_directory(); /* refresh vte_info.dir */
g_key_file_set_string(config, "VTE", "last_dir", vte_info.dir);
}
#endif
}
......@@ -559,6 +565,13 @@ void configuration_save(void)
if (cl_options.load_session)
configuration_save_session_files(config);
#ifdef HAVE_VTE
else if (vte_info.have_vte)
{
vte_get_working_directory(); /* refresh vte_info.dir */
g_key_file_set_string(config, "VTE", "last_dir", vte_info.dir);
}
#endif
/* write the file */
data = g_key_file_to_data(config, NULL, NULL);
......@@ -628,6 +641,16 @@ void configuration_load_session_files(GKeyFile *config, gboolean read_recent_fil
g_ptr_array_add(session_files, tmp_array);
i++;
}
#ifdef HAVE_VTE
/* BUG: after loading project at startup, closing project doesn't restore old VTE path */
if (vte_info.have_vte)
{
gchar *tmp_string = utils_get_setting_string(config, "VTE", "last_dir", NULL);
vte_cwd(tmp_string,TRUE);
g_free(tmp_string);
}
#endif
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment