]> www.fi.muni.cz Git - evince.git/commitdiff
Allow open more than one file
authorCarlos Garcia Campos <carlosgc@gnome.org>
Mon, 11 Jul 2005 11:20:42 +0000 (11:20 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Mon, 11 Jul 2005 11:20:42 +0000 (11:20 +0000)
2005-07-11  Carlos Garcia Campos  <carlosgc@gnome.org>
* shell/main.c: (load_files_remote):
Allow open more than one file

ChangeLog
shell/main.c

index 32756913d01d0165efc30cceb94991bf8389395f..efaa2d2a9de55ca413ad7fbe1675f50de03d965f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-07-11  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+       * shell/main.c: (load_files_remote):
+
+       Allow open more than one file
+
 2005-07-11  Marco Pesenti Gritti  <mpg@redhat.com>
 
        * shell/main.c: (load_files_remote):
index 334d366e5b64923fa1832d1d502764a80d5c9d0d..4fff6dfebfae1887ffd6fed01825b0477327d2a9 100644 (file)
@@ -74,6 +74,7 @@ load_files_remote (const char **files)
        int i;
        GError *error = NULL;
        DBusGConnection *connection;
+       gboolean result = FALSE;
 #if DBUS_VERSION < 35
        DBusGPendingCall *call;
 #endif
@@ -119,7 +120,6 @@ load_files_remote (const char **files)
        }
 
        for (i = 0; files[i]; i++) {
-               gboolean result = TRUE;
                const char *page_label;
                char *uri;
 
@@ -134,7 +134,8 @@ load_files_remote (const char **files)
                if (!dbus_g_proxy_end_call (remote_object, call, &error, DBUS_TYPE_INVALID)) {
                        g_warning (error->message);
                        g_clear_error (&error);
-                       result = FALSE;
+                       g_free (uri);
+                       continue;
                }
 #elif DBUS_VERSION == 34
                call = dbus_g_proxy_begin_call (remote_object, "OpenURI",
@@ -145,7 +146,8 @@ load_files_remote (const char **files)
                if (!dbus_g_proxy_end_call (remote_object, call, &error, G_TYPE_INVALID)) {
                        g_warning (error->message);
                        g_clear_error (&error);
-                       result = FALSE;
+                       g_free (uri);
+                       continue;
                }
 #else
                if (!dbus_g_proxy_call (remote_object, "OpenURI", &error,
@@ -154,14 +156,15 @@ load_files_remote (const char **files)
                                        G_TYPE_INVALID)) {
                        g_warning (error->message);
                        g_clear_error (&error);
-                       result = FALSE;
+                       g_free (uri);
+                       continue;
                }
 #endif
                g_free (uri);
-               return result;
+               result = TRUE;
         }
 
-       return TRUE;
+       return result;
 }
 #endif /* ENABLE_DBUS */