Class: Bitcoin::Gui::TxInView
- Defined in:
- lib/bitcoin/gui/tx_view.rb
Instance Attribute Summary
Attributes inherited from TreeView
Instance Method Summary collapse
-
#initialize(gui, replace = nil) ⇒ TxInView
constructor
A new instance of TxInView.
- #update(txins) ⇒ Object
Methods inherited from TreeView
#embed, #format_address_col, #format_bool_col, #format_uptime_col, #format_value_col, #format_version_col, #tree_view_col
Methods included from Helpers
#add_wallet_filters, #dialog, #display_tx, #format_address, #format_uptime, #format_value, #format_version, #message, #method_missing, #wallet_preview
Constructor Details
#initialize(gui, replace = nil) ⇒ TxInView
Returns a new instance of TxInView.
47 48 49 50 51 52 53 54 |
# File 'lib/bitcoin/gui/tx_view.rb', line 47 def initialize gui, replace = nil super(gui, [ [GObject::TYPE_STRING, "Type"], [GObject::TYPE_STRING, "From"], [GObject::TYPE_STRING, "Value", :format_value_col] ]) old = @gui.builder.get_object("tx_view") end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Bitcoin::Gui::Helpers
Instance Method Details
#update(txins) ⇒ Object
56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/bitcoin/gui/tx_view.rb', line 56 def update txins @model.clear txins.each do |txin| txout = txin.get_prev_out row = @model.append(nil) @model.set_value(row, 0, txout.type.to_s) @model.set_value(row, 1, txout.get_addresses.join(", ")) @model.set_value(row, 2, txout.value.to_s) end @view.set_model @model end |