Method: Ig3tool::VendingMachineWindow#initialize

Defined in:
lib/ui/automaatwindow.rb

#initializeVendingMachineWindow

Returns a new instance of VendingMachineWindow.



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/ui/automaatwindow.rb', line 27

def initialize
	super("vendingmachine.glade")

	@notification = @glade.get_widget("notification")

	@entries = [ ]

	[[BLIKJES,  @glade.get_widget("blikjes_table")],
		[FLESJES, @glade.get_widget("flesjes_table")]].
		each do |list, table|
		table.resize(list.length, 2)
		list.each_with_index do |(name, barcode), i|
		label = Gtk::Label.new(name + ":")
		label.set_alignment(0, 0.5)
		table.attach(label, 0, 1, i, i + 1)
		entry = Gtk::Entry.new
		entry.name = barcode
		make_eval_widget entry
		table.attach(entry, 1, 2, i, i + 1)
		@entries <<= entry
		end
		end

	@debuggers = @glade.get_widget("debuggers")
	make_debugger_combo(@debuggers)

	@window.show_all
end