ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/gde/GCE/HashDialog.pm
(Generate patch)

Comparing deliantra/gde/GCE/HashDialog.pm (file contents):
Revision 1.3 by elmex, Fri Jan 5 12:22:28 2007 UTC vs.
Revision 1.4 by elmex, Sat Jan 6 09:41:17 2007 UTC

66 $table->attach_defaults (Gtk2::Label->new ($desc), 0, 1, $idx, $idx + 1); 66 $table->attach_defaults (Gtk2::Label->new ($desc), 0, 1, $idx, $idx + 1);
67 $table->attach_defaults (Gtk2::Label->new ($self->{edit_hash}{$key}), 1, 2, $idx, $idx + 1); 67 $table->attach_defaults (Gtk2::Label->new ($self->{edit_hash}{$key}), 1, 2, $idx, $idx + 1);
68 68
69 } elsif ($type eq 'desc') { 69 } elsif ($type eq 'desc') {
70 $table->attach_defaults (Gtk2::Label->new ($desc), 0, 2, $idx, $idx + 1); 70 $table->attach_defaults (Gtk2::Label->new ($desc), 0, 2, $idx, $idx + 1);
71
72 } elsif ($type eq 'spin') {
73 $table->attach_defaults (Gtk2::Label->new ($desc), 0, 1, $idx, $idx + 1);
74 $table->attach_defaults (my $spn = Gtk2::SpinButton->new_with_range ($cb->()), 1, 2, $idx, $idx + 1);
75 $spn->set_value ($self->{edit_hash}{$key});
76 $spn->signal_connect (value_changed => sub {
77 my ($spn) = @_;
78 $self->{edit_hash}{$key} = $spn->get_value;
79 });
71 80
72 } elsif ($type eq 'check') { 81 } elsif ($type eq 'check') {
73 $table->attach_defaults (Gtk2::Label->new ($desc), 0, 1, $idx, $idx + 1); 82 $table->attach_defaults (Gtk2::Label->new ($desc), 0, 1, $idx, $idx + 1);
74 $table->attach_defaults (my $chk = Gtk2::CheckButton->new, 1, 2, $idx, $idx + 1); 83 $table->attach_defaults (my $chk = Gtk2::CheckButton->new, 1, 2, $idx, $idx + 1);
75 $chk->set_active ($self->{edit_hash}{$key}); 84 $chk->set_active ($self->{edit_hash}{$key});

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines