Sha256: 66f959dfe31bca2c1684a94a0ba04a0e0669f3179d598d45c4696aa9f36ad714

Contents?: true

Size: 874 Bytes

Versions: 40

Compression:

Stored size: 874 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
    Php4r.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

40 entries across 40 versions & 1 rubygems

Version Path
knjrbfw-0.0.116 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.115 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.114 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.113 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.111 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.110 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.109 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.108 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.107 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.105 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.104 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.103 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.102 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.101 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.100 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.99 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.98 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.97 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.96 lib/knj/jruby-gtk2/tests/test_glade_window.rb
knjrbfw-0.0.95 lib/knj/jruby-gtk2/tests/test_glade_window.rb