def initialize
@gtk_main_window = Gtk::Window.new(Gtk::Window::TOPLEVEL)
gtk_window.signal_connect("delete_event") do
Gtk.main_quit
end
gtk_window.title = Config[:window_title]
gtk_window.set_default_size(Config[:window_width],
Config[:window_height])
gtk_window.set_icon_list(Icons.window_icons)
gtk_window.signal_connect("key-press-event") do |window, event|
if event.state & Gdk::Window::ModifierType::CONTROL_MASK != 0
if event.state & Gdk::Window::ModifierType::SHIFT_MASK != 0
case event.keyval
when Gdk::Keyval::GDK_S
terminals_window.focus_terminal if terminals_window
next true
when Gdk::Keyval::GDK_T
terminals_window.add_new_terminal if terminals_window
next true
when Gdk::Keyval::GDK_W
terminals_window.delete_current_terminal if terminals_window
next true
when Gdk::Keyval::GDK_L
files_window.focus_file_filter if files_window
next true
when Gdk::Keyval::GDK_F
files_window.focus_file_list if files_window
next true
when Gdk::Keyval::GDK_E
files_window.focus_file_search if files_window
next true
when Gdk::Keyval::GDK_V
vim_window.focus_vim if vim_window
next true
else
next nil
end
else
case event.keyval
when Gdk::Keyval::GDK_Page_Down
terminals_window.next_terminal if terminals_window
next true
when Gdk::Keyval::GDK_Page_Up
terminals_window.prev_terminal if terminals_window
next true
else
next nil
end
end
end
nil
end
end