SF.net SVN: geany: [2091] trunk
eht16 at users.sourceforge.net
eht16 at xxxxx
Wed Dec 5 13:54:43 UTC 2007
Revision: 2091
http://geany.svn.sourceforge.net/geany/?rev=2091&view=rev
Author: eht16
Date: 2007-12-05 05:54:43 -0800 (Wed, 05 Dec 2007)
Log Message:
-----------
Improve error message when external command could not be executed.
Allow use of external command also for the special ".." item.
Modified Paths:
--------------
trunk/ChangeLog
trunk/plugins/filebrowser.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-12-05 13:36:11 UTC (rev 2090)
+++ trunk/ChangeLog 2007-12-05 13:54:43 UTC (rev 2091)
@@ -3,6 +3,9 @@
* src/document.c: Add "b" flag to fopen when saving files to avoid
broken line ending characters on Windows
(flag was removed by accident, closes #1844405).
+ * plugins/filebrowser.c:
+ Improve error message when external command could not be executed.
+ Allow use of external command also for the special ".." item.
2007-12-04 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/plugins/filebrowser.c
===================================================================
--- trunk/plugins/filebrowser.c 2007-12-05 13:36:11 UTC (rev 2090)
+++ trunk/plugins/filebrowser.c 2007-12-05 13:54:43 UTC (rev 2091)
@@ -301,14 +301,10 @@
go_up = TRUE;
g_free(name);
- if (go_up)
+ if (external)
{
- g_free(fname);
- on_go_up();
- }
- else if (external)
- {
gchar *cmd;
+ gchar *locale_cmd;
gchar *dir;
GString *cmd_str = g_string_new(open_cmd);
GError *error= NULL;
@@ -322,17 +318,27 @@
utils->string_replace_all(cmd_str, "%d", dir);
cmd = g_string_free(cmd_str, FALSE);
- setptr(cmd, utils->get_locale_from_utf8(cmd));
- if (! g_spawn_command_line_async(cmd, &error))
+ locale_cmd = utils->get_locale_from_utf8(cmd);
+ if (! g_spawn_command_line_async(locale_cmd, &error))
{
+ gchar *c = strchr(cmd, ' ');
+ if (c != NULL)
+ *c = '\0';
ui->set_statusbar(TRUE,
- _("Could not execute external command (%s)."), error->message);
+ _("Could not execute configured external command '%s' (%s)."),
+ cmd, error->message);
g_error_free(error);
}
+ g_free(locale_cmd);
g_free(cmd);
g_free(dir);
g_free(fname);
}
+ else if (go_up)
+ {
+ g_free(fname);
+ on_go_up();
+ }
else if (dir_found)
{
setptr(current_dir, fname);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list