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

Comparing deliantra/gde/GCE/PickWindow.pm (file contents):
Revision 1.12 by elmex, Wed Mar 15 22:44:04 2006 UTC vs.
Revision 1.13 by elmex, Thu Mar 16 02:56:30 2006 UTC

39 39
40 $self->set_title ("gce - picker"); 40 $self->set_title ("gce - picker");
41 41
42 $self->add (my $hb = Gtk2::VBox->new); 42 $self->add (my $hb = Gtk2::VBox->new);
43 43
44 $hb->pack_start (my $cb = Gtk2::ComboBox->new_text, 0, 1, 0); 44 $hb->pack_start (my $cb = $self->{combo} = Gtk2::ComboBox->new_text, 0, 1, 0);
45 45
46 my $idx = 0;
46 for (sort keys %{$self->{toplevel_archs}}) { 47 for (sort keys %{$self->{toplevel_archs}}) {
47 48
48 $cb->append_text ($_); 49 $cb->append_text ($_);
50 $self->{arch_txt_to_idx}->{$_} = $idx++;
49 } 51 }
50 52
51 $cb->signal_connect (changed => sub { 53 $cb->signal_connect (changed => sub {
52 54
53 my $arch = $cb->get_active_text; 55 my $arch = $cb->get_active_text;
96 98
97 $self->{map}->set_map ( 99 $self->{map}->set_map (
98 new_pickmap Crossfire::Map $self->{toplevel_archs}->{$arch} 100 new_pickmap Crossfire::Map $self->{toplevel_archs}->{$arch}
99 ); 101 );
100 102
103 $self->{combo}->set_active ($self->{arch_txt_to_idx}->{$arch});
104
101 $self->{last_selection} = $arch; 105 $self->{last_selection} = $arch;
102 106
103 $self->{map}->enable_tooltip; 107 $self->{map}->enable_tooltip;
108
104} 109}
105 110
106 111
107=head1 AUTHOR 112=head1 AUTHOR
108 113

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines