Commit bc6fc6be835d9549aa4241d93c6aa70cbc4e99a8

Authored by Marius Hanne
1 parent 2a1a95db38
Exists in gui

update gui to recent gir_ffi-gtk; fixes issue with connecting Gtk::Builder signals

Showing 2 changed files with 5 additions and 7 deletions Side-by-side Diff

... ... @@ -4,11 +4,10 @@
4 4 require 'bitcoin'
5 5 require 'optparse'
6 6  
7   -Bitcoin.require_dependency :gir_ffi
  7 +Bitcoin.require_dependency "gir_ffi-gtk3"
8 8 Bitcoin.require_dependency :eventmachine
9 9 Bitcoin.require_dependency :notify
10 10 Bitcoin.require_dependency :json
11   -
12 11  
13 12 defaults = {
14 13 :network => "bitcoin",
lib/bitcoin/gui/gui.rb
... ... @@ -7,8 +7,7 @@
7 7 require_relative "tx_view.rb"
8 8 require_relative "conn_view.rb"
9 9  
10   -GirFFI.setup :Gtk
11   -Gtk.init ["3.1.0"]
  10 +Gtk.init
12 11  
13 12 module Bitcoin::Gui
14 13  
... ... @@ -46,9 +45,9 @@
46 45 @builder = Gtk::Builder.new
47 46 @builder.add_from_file(File.join(File.dirname(__FILE__), "gui.builder"))
48 47  
49   - # @builder.connect_signals_full(->(builder, widget, signal, handler, _, _, gui) do
50   - # GObject.signal_connect(widget, signal) { gui.send(handler) }
51   - # end, self)
  48 + @builder.connect_signals_full(->(builder, widget, signal, handler, _, _, gui) do
  49 + GObject.signal_connect(widget, signal) { gui.send(handler) }
  50 + end, self)
52 51  
53 52 {
54 53 "<Control>n" => :file_new,