File tree Expand file tree Collapse file tree 2 files changed +295
-183
lines changed
Expand file tree Collapse file tree 2 files changed +295
-183
lines changed Original file line number Diff line number Diff line change @@ -298,6 +298,17 @@ public class Files.Application : Gtk.Application {
298298 prefs, " sort-directories-first" , GLib . SettingsBindFlags . DEFAULT );
299299 }
300300
301+ public View .Window ? create_empty_window () {
302+ if (this . get_windows (). length () >= MAX_WINDOWS ) { // Can be assumed to be limited in length
303+ return null ;
304+ }
305+
306+ var win = new View .Window (this );
307+ add_window (win as Gtk . Window );
308+ plugins. interface_loaded (win as Gtk . Widget );
309+ return win;
310+ }
311+
301312 public View .Window ? create_window (GLib .File ? location = null ,
302313 ViewMode viewmode = ViewMode .PREFERRED ) {
303314
@@ -308,13 +319,7 @@ public class Files.Application : Gtk.Application {
308319 private View .Window ? create_window_with_tabs (GLib .File [] locations = {},
309320 ViewMode viewmode = ViewMode .PREFERRED ) {
310321
311- if (this . get_windows (). length () >= MAX_WINDOWS ) { // Can be assumed to be limited in length
312- return null ;
313- }
314-
315- var win = new View .Window (this );
316- add_window (win as Gtk . Window );
317- plugins. interface_loaded (win as Gtk . Widget );
322+ var win = create_empty_window ();
318323 win. open_tabs (locations, viewmode);
319324
320325 return win;
You can’t perform that action at this time.
0 commit comments