Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 41 additions & 41 deletions src/View/Window.vala
Original file line number Diff line number Diff line change
Expand Up @@ -22,35 +22,15 @@
*/

public class Files.View.Window : Hdy.ApplicationWindow {
static uint window_id = 0;

const GLib.ActionEntry [] WIN_ENTRIES = {
{"new-window", action_new_window},
{"refresh", action_reload},
{"undo", action_undo},
{"redo", action_redo},
{"bookmark", action_bookmark},
{"find", action_find, "s"},
{"edit-path", action_edit_path},
{"tab", action_tab, "s"},
{"go-to", action_go_to, "s"},
{"zoom", action_zoom, "s"},
{"view-mode", action_view_mode, "u", "0" },
{"show-hidden", null, null, "false", change_state_show_hidden},
{"singleclick-select", null, null, "false", change_state_single_click_select},
{"show-remote-thumbnails", null, null, "true", change_state_show_remote_thumbnails},
{"show-local-thumbnails", null, null, "false", change_state_show_local_thumbnails},
{"show-file-preview", null, null, "false", change_state_show_file_preview},
{"tabhistory-restore", action_tabhistory_restore, "s" },
{"folders-before-files", null, null, "true", change_state_folders_before_files},
{"restore-tabs-on-startup", null, null, "true", change_state_restore_tabs_on_startup},
{"forward", action_forward, "i"},
{"back", action_back, "i"},
{"focus-sidebar", action_focus_sidebar}
};
public signal void loading_uri (string location);
public signal void folder_deleted (GLib.File location);
public signal void free_space_change ();

public Files.Application marlin_app { get; construct; }
public uint window_number { get; construct; }

public Hdy.TabView tab_view { get; private set; }

public bool is_first_window {
get {
return (window_number == 0);
Expand Down Expand Up @@ -79,19 +59,43 @@ public class Files.View.Window : Hdy.ApplicationWindow {
}
}

public Gtk.Builder ui;
public Files.Application marlin_app { get; construct; }
private unowned UndoManager undo_manager;
public Hdy.HeaderBar headerbar;
public Chrome.ViewSwitcher view_switcher;
public Hdy.TabView tab_view;
public Hdy.TabBar tab_bar;
private Gtk.Paned lside_pane;
public SidebarInterface sidebar;
private Chrome.ButtonWithMenu button_forward;
private const GLib.ActionEntry [] WIN_ENTRIES = {
{"new-window", action_new_window},
{"refresh", action_reload},
{"undo", action_undo},
{"redo", action_redo},
{"bookmark", action_bookmark},
{"find", action_find, "s"},
{"edit-path", action_edit_path},
{"tab", action_tab, "s"},
{"go-to", action_go_to, "s"},
{"zoom", action_zoom, "s"},
{"view-mode", action_view_mode, "u", "0" },
{"show-hidden", null, null, "false", change_state_show_hidden},
{"singleclick-select", null, null, "false", change_state_single_click_select},
{"show-remote-thumbnails", null, null, "true", change_state_show_remote_thumbnails},
{"show-local-thumbnails", null, null, "false", change_state_show_local_thumbnails},
{"show-file-preview", null, null, "false", change_state_show_file_preview},
{"tabhistory-restore", action_tabhistory_restore, "s" },
{"folders-before-files", null, null, "true", change_state_folders_before_files},
{"restore-tabs-on-startup", null, null, "true", change_state_restore_tabs_on_startup},
{"forward", action_forward, "i"},
{"back", action_back, "i"},
{"focus-sidebar", action_focus_sidebar}
};

private static uint window_id = 0;

private Chrome.ButtonWithMenu button_back;
private Chrome.ButtonWithMenu button_forward;
private Chrome.LocationBar? location_bar;
private Chrome.ViewSwitcher view_switcher;
private Gtk.MenuButton tab_history_button;
private Gtk.Paned lside_pane;
private Hdy.HeaderBar headerbar;
private SidebarInterface sidebar;

private unowned UndoManager undo_manager;

private bool locked_focus { get; set; default = false; }
private bool tabs_restored = false;
Expand All @@ -100,10 +104,6 @@ public class Files.View.Window : Hdy.ApplicationWindow {

private Gtk.EventControllerKey key_controller; //[Gtk3] Does not work unless we keep this ref

public signal void loading_uri (string location);
public signal void folder_deleted (GLib.File location);
public signal void free_space_change ();

public Window (Files.Application _application) {
Object (
application: (Gtk.Application)_application,
Expand Down Expand Up @@ -246,7 +246,7 @@ public class Files.View.Window : Hdy.ApplicationWindow {
use_popover = false
};

tab_bar = new Hdy.TabBar () {
var tab_bar = new Hdy.TabBar () {
autohide = false,
expand_tabs = false,
inverted = true,
Expand Down