Revision: 5707 http://geany.svn.sourceforge.net/geany/?rev=5707&view=rev Author: ntrel Date: 2011-04-11 12:40:34 +0000 (Mon, 11 Apr 2011)
Log Message: ----------- 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.
Modified Paths: -------------- trunk/ChangeLog trunk/THANKS trunk/src/about.c trunk/src/keyfile.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2011-04-11 12:07:19 UTC (rev 5706) +++ trunk/ChangeLog 2011-04-11 12:40:34 UTC (rev 5707) @@ -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>
Modified: trunk/THANKS =================================================================== --- trunk/THANKS 2011-04-11 12:07:19 UTC (rev 5706) +++ trunk/THANKS 2011-04-11 12:40:34 UTC (rev 5707) @@ -88,6 +88,7 @@ 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: ------------
Modified: trunk/src/about.c =================================================================== --- trunk/src/about.c 2011-04-11 12:07:19 UTC (rev 5706) +++ trunk/src/about.c 2011-04-11 12:40:34 UTC (rev 5707) @@ -98,7 +98,8 @@ "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, "
Modified: trunk/src/keyfile.c =================================================================== --- trunk/src/keyfile.c 2011-04-11 12:07:19 UTC (rev 5706) +++ trunk/src/keyfile.c 2011-04-11 12:40:34 UTC (rev 5707) @@ -335,6 +335,14 @@ 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 @@ 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 @@
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 @@ 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 }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.