From 4f636a34c4d8b0e1cce81f1455c197f0f28f9bb6 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 1 Jun 2012 11:18:40 -0400 Subject: Bug 677280 - "Help - Quick Reference" opens multiple PDF documents --- shell/e-shell-window-actions.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'shell') diff --git a/shell/e-shell-window-actions.c b/shell/e-shell-window-actions.c index ae4642e205..f2b0ab65c2 100644 --- a/shell/e-shell-window-actions.c +++ b/shell/e-shell-window-actions.c @@ -988,9 +988,10 @@ action_quick_reference_cb (GtkAction *action, EShellWindow *shell_window) { const gchar * const *language_names; + gboolean app_launched = FALSE; language_names = g_get_language_names (); - while (*language_names != NULL) { + while (*language_names != NULL && !app_launched) { const gchar *language = *language_names++; gchar *filename; @@ -1012,7 +1013,8 @@ action_quick_reference_cb (GtkAction *action, file = g_file_new_for_path (filename); uri = g_file_get_uri (file); - g_app_info_launch_default_for_uri (uri, NULL, &error); + app_launched = g_app_info_launch_default_for_uri ( + uri, NULL, &error); if (error != NULL) { /* FIXME Show an error dialog. */ -- cgit v1.2.3