Hi list,
I received a patch, haven't got around to reviewing it yet.

Begin forwarded message:

Date: Sun, 13 Mar 2011 00:33:11 +0100
From: Nicolas Sierro <[email protected]>
To: [email protected]
Subject: Geany feature: follow project path


Dear Nick,

I started using Geany recently and found annoying that changing project
did not change the working directory in the VTE. I therefore attached a
likely trivial patch that implements this feature. It would probably
benefit from having a check box to toggle it in the project property
dialog, but I did not implement it.

I hope you can make use of my patch.

Best regards,

Nicolas



Regards,
Nick
diff -u geany-0.20/src/keyfile.c geany-0.20-mod/src/keyfile.c
--- geany-0.20/src/keyfile.c	2010-12-07 14:16:57.000000000 +0100
+++ geany-0.20-mod/src/keyfile.c	2011-03-12 23:50:05.044410292 +0100
@@ -330,6 +330,16 @@
 			i++;
 		}
 	}
+
+	/* VTE */
+#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
+
 }


@@ -623,6 +634,17 @@
 		g_ptr_array_add(session_files, tmp_array);
 		i++;
 	}
+
+	/* VTE */
+#ifdef HAVE_VTE
+	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
+
 }



_______________________________________________
Geany-devel mailing list
[email protected]
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel

Reply via email to