[gnome-commander] Fixed problem #540438 (no GUI message if meld cannot be executed)
- From: Piotr Eljasiak <epiotr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] Fixed problem #540438 (no GUI message if meld cannot be executed)
- Date: Thu, 3 Jun 2010 17:34:07 +0000 (UTC)
commit 34b6acdc94432ce35d01692ec38706d383f073a2
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Thu Jun 3 19:32:51 2010 +0200
Fixed problem #540438 (no GUI message if meld cannot be executed)
NEWS | 2 +-
doc/C/gnome-commander.xml | 2 +-
src/utils.cc | 2 +-
src/utils.h | 14 +++++++++-----
4 files changed, 12 insertions(+), 8 deletions(-)
---
diff --git a/NEWS b/NEWS
index af9a6c9..2ed21d4 100644
--- a/NEWS
+++ b/NEWS
@@ -22,7 +22,7 @@ gnome-commander 1.2.8.7
---------------
Bug fixes:
- * Fixed problem ...
+ * Fixed problem #540438 (no GUI message if meld cannot be executed)
===================================
diff --git a/doc/C/gnome-commander.xml b/doc/C/gnome-commander.xml
index b1e6e78..baddd5c 100644
--- a/doc/C/gnome-commander.xml
+++ b/doc/C/gnome-commander.xml
@@ -6997,7 +6997,7 @@
<para>
<itemizedlist>
<listitem>
- <para>...</para>
+ <para>Fixed problem #540438 (no GUI message if meld cannot be executed)</para>
</listitem>
</itemizedlist>
</para>
diff --git a/src/utils.cc b/src/utils.cc
index 19e6dde..f82e840 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -639,7 +639,7 @@ static void do_mime_exec_multiple (gpointer *args)
if (dirs.size()==1)
run_command_indir (cmd.c_str(), dirs.begin()->c_str(), gnome_cmd_app_get_requires_terminal (app));
else
- run_command (cmd.c_str(), gnome_cmd_app_get_requires_terminal (app));
+ run_command_indir (cmd.c_str(), NULL, gnome_cmd_app_get_requires_terminal (app));
g_list_free (files);
}
diff --git a/src/utils.h b/src/utils.h
index 81db985..a383b16 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -41,11 +41,18 @@ gboolean DEBUG_ENABLED (gchar flag);
void DEBUG (gchar flag, const gchar *fmt, ...);
void warn_print (const gchar *fmt, ...);
+void gnome_cmd_error_message (const gchar *title, GError *error);
+
void run_command_indir (const gchar *command, const gchar *dir, gboolean term);
-inline void run_command (const gchar *command, gboolean term=FALSE)
+inline void run_command (const gchar *command)
{
- run_command_indir (command, NULL, term);
+ GError *error = NULL;
+
+ DEBUG ('g', "running: %s\n", command);
+
+ if (!g_spawn_command_line_async (command, &error))
+ gnome_cmd_error_message (command, error);
}
const char **convert_varargs_to_name_array (va_list args);
@@ -257,9 +264,6 @@ inline void gnome_cmd_show_message (GtkWindow *parent, std::string message, cons
}
-void gnome_cmd_error_message (const gchar *title, GError *error);
-
-
inline void gnome_cmd_help_display (const gchar *file_name, const gchar *link_id=NULL)
{
GError *error = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]