summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2014-04-29 17:41:22 +0200
committerCosimo Cecchi <cosimoc@gnome.org>2014-04-30 11:08:26 +0200
commit31c3d651f774dd359e11d846f5cd7da8ca5a7ab1 (patch)
tree5b82b97df15f2fca8379dbfb69f4252fe7d6c256 /src
parent7cc0fbe3ed1d49ae9c4a9faad19cda865a0e647d (diff)
downloadnautilus-31c3d651f774dd359e11d846f5cd7da8ca5a7ab1.tar.gz
application: simplify code
No need to pass a screen object around - it's always the default.
Diffstat (limited to 'src')
-rw-r--r--src/nautilus-application.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/nautilus-application.c b/src/nautilus-application.c
index ee0425f7d..cc4c5c28d 100644
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -476,12 +476,12 @@ get_window_slot_for_location (NautilusApplication *application, GFile *location)
static void
open_window (NautilusApplication *application,
- GFile *location, GdkScreen *screen)
+ GFile *location)
{
NautilusWindow *window;
nautilus_profile_start (NULL);
- window = nautilus_application_create_window (application, screen);
+ window = nautilus_application_create_window (application, gdk_screen_get_default ());
if (location != NULL) {
nautilus_window_go_to (window, location);
@@ -496,14 +496,13 @@ static void
open_windows (NautilusApplication *application,
gboolean force_new,
GFile **files,
- gint n_files,
- GdkScreen *screen)
+ gint n_files)
{
guint i;
if (files == NULL || files[0] == NULL) {
/* Open a window pointing at the default location. */
- open_window (application, NULL, screen);
+ open_window (application, NULL);
} else {
/* Open windows at each requested location. */
for (i = 0; i < n_files; ++i) {
@@ -513,7 +512,7 @@ open_windows (NautilusApplication *application,
slot = get_window_slot_for_location (application, files[i]);
if (!slot) {
- open_window (application, files[i], screen);
+ open_window (application, files[i]);
} else {
/* We open the location again to update any possible selection */
nautilus_window_slot_open_location (slot, files[i], 0);
@@ -575,8 +574,7 @@ nautilus_application_open (GApplication *app,
gboolean force_new = (g_strcmp0 (hint, "new-window") == 0);
- open_windows (self, force_new, files, n_files,
- gdk_screen_get_default ());
+ open_windows (self, force_new, files, n_files);
}
static gboolean