lib/wait_up/application.rb in wait_up-0.0.3 vs lib/wait_up/application.rb in wait_up-0.1.0

- old
+ new

@@ -1,6 +1,6 @@ -require 'gir_ffi-gtk3' +require 'gtk3' module WaitUp # Main Wait Up application class class Application def initialize @@ -22,11 +22,11 @@ @win.signal_connect('destroy') { Gtk.main_quit } end def connect_key_press_event_signal @win.signal_connect 'key-press-event' do |_wdg, evt, _ud| - handle_key(evt) if evt.state[:control_mask] + handle_key(evt) if evt.state.control_mask? false end end def handle_key(evt) @@ -53,10 +53,10 @@ @grid = Gtk::Grid.new @grid.orientation = :vertical @win.add @grid @chooser = Gtk::FileChooserButton.new('Hello!', :open) @grid.add @chooser - @timeline = Gtk::Scale.new_with_range :horizontal, 0.0, 10.0, 0.1 + @timeline = Gtk::Scale.new :horizontal, 0.0, 10.0, 0.1 @timeline.hexpand = true @grid.add @timeline @volume = Gtk::VolumeButton.new @grid.add @volume end