Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2005-07-11 11:20:42 (GMT)
committer Carlos Garcia Campos <carlosgc@src.gnome.org>2005-07-11 11:20:42 (GMT)
commit12edcbdf1fbf4d45e9f111cd44df261623ab23e0 (patch)
tree8fd700082a7563a1ed66d2f3a7f461eacee9d957 /shell
parentb2e7a9f7c44d07a2af27c8b7a52c9fc4e19f615c (diff)
Allow open more than one file
2005-07-11 Carlos Garcia Campos <carlosgc@gnome.org> * shell/main.c: (load_files_remote): Allow open more than one file
Diffstat (limited to 'shell')
-rw-r--r--shell/main.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/shell/main.c b/shell/main.c
index 334d366..4fff6df 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -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 */