aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-12-28 02:46:11 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-12-28 02:46:11 +0000
commitf9fa5fc5a148747f0ee928374984a64c50440915 (patch)
treedaed914b79c629a207d11022840296851fc0b4b3
parenteeb4859e9b0621f390bc42389091d1dbef4bc3cc (diff)
compose_exec_ext_editor(): display verbose error message. Fixed a memory leak.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1460 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r--ChangeLog5
-rw-r--r--ChangeLog.ja5
-rw-r--r--src/compose.c12
3 files changed, 20 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 192ff6ef..1b250ae2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-12-28
+
+ * src/compose.c: compose_exec_ext_editor(): display verbose error
+ message. Fixed a memory leak.
+
2006-12-25
* libsylph/utils.c: change_file_mode_rw(): win32: use widechar API.
diff --git a/ChangeLog.ja b/ChangeLog.ja
index 72319ad7..28b690d9 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,3 +1,8 @@
+2006-12-28
+
+ * src/compose.c: compose_exec_ext_editor(): 詳細なエラーメッセージを
+ 表示するようにした。メモリリークを修正。
+
2006-12-25
* libsylph/utils.c: change_file_mode_rw(): win32: ワイドキャラクタ
diff --git a/src/compose.c b/src/compose.c
index 3f25d6fb..b00f3a2a 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -5596,6 +5596,7 @@ static void compose_exec_ext_editor(Compose *compose)
static gchar *def_cmd = "emacs %s";
gchar buf[1024];
gchar **cmdline;
+ GError *error = NULL;
tmp = g_strdup_printf("%s%ctmpmsg-%p.txt", get_tmp_dir(),
G_DIR_SEPARATOR, compose);
@@ -5627,13 +5628,20 @@ static void compose_exec_ext_editor(Compose *compose)
if (g_spawn_async(NULL, cmdline, NULL,
G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_SEARCH_PATH,
- NULL, NULL, &pid, NULL) == FALSE) {
- g_warning("Couldn't execute external editor\n");
+ NULL, NULL, &pid, &error) == FALSE) {
+ g_warning("Couldn't execute external editor: %s\n", buf);
+ if (error) {
+ g_warning("g_spawn_async(): %s\n", error->message);
+ g_error_free(error);
+ }
+ g_strfreev(cmdline);
g_unlink(tmp);
g_free(tmp);
return;
}
+ g_strfreev(cmdline);
+
compose_set_ext_editor_sensitive(compose, FALSE);
debug_print("compose_exec_ext_editor(): pid: %d file: %s\n", pid, tmp);