ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/kgsueme/kgsueme/game.pl
(Generate patch)

Comparing kgsueme/kgsueme/game.pl (file contents):
Revision 1.20 by pcg, Sun Jun 1 06:07:12 2003 UTC vs.
Revision 1.21 by pcg, Sun Jun 1 06:40:15 2003 UTC

66 $vbox->pack_start((my $aspect_frame = new Gtk2::AspectFrame "", 0.5, 0.5, 1, 0), 1, 1, 0); 66 $vbox->pack_start((my $aspect_frame = new Gtk2::AspectFrame "", 0.5, 0.5, 1, 0), 1, 1, 0);
67 $aspect_frame->set (border_width => 0, shadow_type => 'none', label_xalign => 0.5); 67 $aspect_frame->set (border_width => 0, shadow_type => 'none', label_xalign => 0.5);
68 $self->{board_label} = $aspect_frame->get_label_widget; 68 $self->{board_label} = $aspect_frame->get_label_widget;
69 69
70 $aspect_frame->add($self->{canvas} = new Gtk2::DrawingArea); 70 $aspect_frame->add($self->{canvas} = new Gtk2::DrawingArea);
71 $self->{canvas}->double_buffered (0); 71 $self->{canvas}->double_buffered (0) if $::config->{conserve_memory};
72 72
73 $self->{canvas}->signal_connect(configure_event => \&configure_event, $self); 73 $self->{canvas}->signal_connect(configure_event => \&configure_event, $self);
74 $self->{canvas}->signal_connect(expose_event => \&expose_event, $self); 74 $self->{canvas}->signal_connect(expose_event => \&expose_event, $self);
75 75
76 $self->{hpane}->pack2(($self->{vpane} = new Gtk2::VPaned), 0, 0); 76 $self->{hpane}->pack2(($self->{vpane} = new Gtk2::VPaned), 0, 0);
105 $self->{userlist}->update ($add, $update, $remove); 105 $self->{userlist}->update ($add, $update, $remove);
106} 106}
107 107
108sub join { 108sub join {
109 my ($self) = @_; 109 my ($self) = @_;
110 return if $self->{joined};
111
110 $self->SUPER::join; 112 $self->SUPER::join;
111 113
112 $self->{window}->show_all; 114 $self->{window}->show_all;
113} 115}
114 116
115sub part { 117sub part {
116 my ($self) = @_; 118 my ($self) = @_;
119 return unless $self->{joined};
117 $self->SUPER::part; 120 $self->SUPER::part;
118 121
119 $self->{window}->hide; 122 $self->{window}->hide;
120} 123}
121 124
348 351
349 $a++; 352 $a++;
350 $a++ if $a eq "I"; # not correct, instead of AA AB, we should get HH JJ KK... 353 $a++ if $a eq "I"; # not correct, instead of AA AB, we should get HH JJ KK...
351 } 354 }
352 355
353 unless ($::config->{conserve_memory}) { 356 unless ($::config->{conserve_memory} > 1) {
354 $self->{background} = $pixbuf; 357 $self->{background} = $pixbuf;
355 $pixbuf = $pixbuf->copy; 358 $pixbuf = $pixbuf->copy;
356 } 359 }
357 } 360 }
358 361

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines