Sha256: 6ca0594055f9bdb9607f32d372b61f093b6a810d54b7acbfc7ff32a41781bebf

Contents?: true

Size: 877 Bytes

Versions: 61

Compression:

Stored size: 877 Bytes

Contents

#!/usr/bin/jruby

require "knj/autoload"
require "#{$knjpath}gtk2_tv"

class WinAppEdit
  def initialize
    print "Loading Glade.\n"
    @glade = GladeXML.new("test_glade_window.glade"){|h|method(h)}
    print "Done loading glade.\n"
    
    @glade["tvTest"].selection.signal_connect("changed") do
      print "test\n"
    end
    
    @glade["tvTest"].init(["ID", "Title"])
    @glade["tvTest"].append(["Test1", "Test2"])
    
    @glade["window"].show_all
  end
  
  def on_tvTest_row_activated
    #print "Test\n"
  end
  
  def on_btnSave_clicked(arg1)
    print arg1.to_s + "\n"
    print "Save clicked.\n"
    
    val = @glade["tvTest"].sel
    Knj::Php.print_r(val)
  end
  
  def on_btnCancel_clicked
    print "Cancel clicked.\n"
  end
  
  def on_window_destroy
    print "Destroyed!\n"
    Gtk.main_quit
  end
end

print "Starting app.\n"
WinAppEdit.new

Gtk.main

Version data entries

61 entries across 61 versions & 1 rubygems

Version Path
knjrbfw-0.0.29 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.28 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.27 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.26 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.25 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.24 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.23 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.22 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.21 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.20 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.19 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.18 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.17 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.16 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.15 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.14 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.13 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.12 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.11 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.10 lib/knj/jruby-gtk2/tests/test_glade_window.rb