diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2011-05-31 10:59:26 -0400 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2011-05-31 10:59:26 -0400 |
commit | a5a4bddf12ff29205757858af81fd3665a68c3f2 (patch) | |
tree | 7669b1cdf0b318805f9c79d49f268b03898550d9 | |
parent | d0240a4319561551adc5e0cdb94bb5486d3f3308 (diff) | |
download | nautilus-a5a4bddf12ff29205757858af81fd3665a68c3f2.tar.gz |
application: pass in the array length while looping over it
-rw-r--r-- | src/nautilus-application.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nautilus-application.c b/src/nautilus-application.c index 6cce36435..fc8a3d355 100644 --- a/src/nautilus-application.c +++ b/src/nautilus-application.c @@ -752,6 +752,7 @@ open_window (NautilusApplication *application, static void open_windows (NautilusApplication *application, GFile **files, + gint n_files, GdkScreen *screen, const char *geometry) { @@ -762,7 +763,7 @@ open_windows (NautilusApplication *application, open_window (application, NULL, screen, geometry); } else { /* Open windows at each requested location. */ - for (i = 0; files[i] != NULL; i++) { + for (i = 0; i < n_files; i++) { open_window (application, files[i], screen, geometry); } } @@ -778,7 +779,7 @@ nautilus_application_open (GApplication *app, DEBUG ("Open called on the GApplication instance; %d files", n_files); - open_windows (self, files, + open_windows (self, files, n_files, gdk_screen_get_default (), self->priv->geometry); } |