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

Comparing deliantra/gde/GCE/AttrEdit.pm (file contents):
Revision 1.12 by elmex, Mon Mar 13 00:32:51 2006 UTC vs.
Revision 1.13 by elmex, Mon Mar 13 00:58:53 2006 UTC

8 8
9use Gtk2; 9use Gtk2;
10use Gtk2::Gdk::Keysyms; 10use Gtk2::Gdk::Keysyms;
11use Gtk2::SimpleList; 11use Gtk2::SimpleList;
12 12
13use Glib::Object::Subclass Gtk2::Bin; 13use Glib::Object::Subclass Gtk2::VBox;
14 14
15use Crossfire; 15use Crossfire;
16 16
17sub INIT_INSTANCE { 17sub INIT_INSTANCE {
18 my ($self) = @_; 18 my ($self) = @_;
19 19
20 $self->add (my $sw = Gtk2::ScrolledWindow->new);
21 $sw->add_with_viewport (my $vb = new Gtk2::VBox);
22 $sw->set_policy ('automatic', 'automatic');
23
24 $vb->pack_start (my $lbl = $self->{arch_name_lbl} = Gtk2::Label->new, 0, 1, 0); 20 $self->pack_start (my $lbl = $self->{arch_name_lbl} = Gtk2::Label->new, 0, 1, 0);
25 $vb->pack_start (my $ntbook = $self->{ntbook} = Gtk2::Notebook->new, 1, 1, 0); 21 $self->pack_start (my $ntbook = $self->{ntbook} = Gtk2::Notebook->new, 1, 1, 0);
26} 22}
27 23
28sub update_arch { 24sub update_arch {
29 my ($self, $arch, $key, $value) = @_; 25 my ($self, $arch, $key, $value) = @_;
30 26
87 83
88 $self->{arch_name_lbl}->set_text ( 84 $self->{arch_name_lbl}->set_text (
89 $arch->{_name} . ($arch->{name} ? " - $arch->{name}" : "") 85 $arch->{_name} . ($arch->{name} ? " - $arch->{name}" : "")
90 ); 86 );
91 87
92 if (not defined $change_cb) {
93
94 } else {
95
96 }
97
98 my $al_arch = $Crossfire::ARCH{$arch->{_name}}; 88 my $al_arch = $Crossfire::ARCH{$arch->{_name}};
99 89
100 if ($al_arch) { 90 if ($al_arch) {
101 $self->hide; 91 $self->hide;
102 $self->{ntbook}->remove ($_) 92 $self->{ntbook}->remove ($_)
142} 132}
143 133
144sub add_section_edit_widgets { 134sub add_section_edit_widgets {
145 my ($self, $ntbook, $name, $arch, $section) = @_; 135 my ($self, $ntbook, $name, $arch, $section) = @_;
146 136
147 $self->{ntbook}->append_page (my $vb = Gtk2::VBox->new, $name); 137 $self->{ntbook}->append_page (my $sw = Gtk2::ScrolledWindow->new, $name);
138 $sw->set_policy ('always', 'always');
139 $sw->add_with_viewport (my $vb = Gtk2::VBox->new);
148 $vb->pack_start (my $table = new Gtk2::Table (2, $cnt), 0, 1, 0); 140 $vb->pack_start (my $table = new Gtk2::Table (2, $cnt), 0, 1, 0);
149 141
150 my $i = 0; 142 my $i = 0;
151 for my $sec (@$section) { 143 for my $sec (@$section) {
152 my $bwid = Gtk2::EventBox->new; 144 my $bwid = Gtk2::EventBox->new;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines