… | |
… | |
174 | |
174 | |
175 | if ($self->{name}->get_text ne $user->as_string) { |
175 | if ($self->{name}->get_text ne $user->as_string) { |
176 | $self->{name}->set_text ($user->as_string); |
176 | $self->{name}->set_text ($user->as_string); |
177 | |
177 | |
178 | $self->{imagebox}->remove ($_) for $self->{imagebox}->get_children; |
178 | $self->{imagebox}->remove ($_) for $self->{imagebox}->get_children; |
|
|
179 | if (0) { |
179 | $self->{imagebox}->add (gtk::image_from_data undef); |
180 | $self->{imagebox}->add (gtk::image_from_data undef); |
|
|
181 | } |
180 | $self->{imagebox}->show_all; |
182 | $self->{imagebox}->show_all; |
181 | |
183 | |
182 | if ($user->has_pic) { |
184 | if ($user->has_pic) { |
183 | # the big picture... |
185 | # the big picture... |
184 | $app->userpic ($user->{name}, sub { |
186 | $app->userpic ($user->{name}, sub { |
185 | return unless $self->{imagebox}; |
187 | return unless $self->{imagebox}; |
186 | |
188 | |
187 | if ($_[0]) { |
189 | if ($_[0]) { |
188 | $self->{imagebox}->remove ($_) for $self->{imagebox}->get_children; |
190 | $self->{imagebox}->remove ($_) for $self->{imagebox}->get_children; |
|
|
191 | if (0) { |
189 | $self->{imagebox}->add (gtk::image_from_data $_[0]); |
192 | $self->{imagebox}->add (gtk::image_from_data $_[0]); |
|
|
193 | } |
190 | $self->{imagebox}->show_all; |
194 | $self->{imagebox}->show_all; |
191 | } |
195 | } |
192 | }); |
196 | }); |
193 | } |
197 | } |
194 | } |
198 | } |
… | |
… | |
781 | my ($self, $player) = @_; |
785 | my ($self, $player) = @_; |
782 | |
786 | |
783 | sound::play 3, "resign"; |
787 | sound::play 3, "resign"; |
784 | $self->{chat}->append_text ("\n<infoblock><header>Resign</header>" |
788 | $self->{chat}->append_text ("\n<infoblock><header>Resign</header>" |
785 | . "\n<user>" |
789 | . "\n<user>" |
786 | . (util::toxml $self->{user}[$msg->{player}]->as_string) |
790 | . (util::toxml $self->{user}[1 - $msg->{player}]->as_string) |
787 | . "</user> resigned." |
791 | . "</user> resigned." |
788 | . "\n<user>" |
792 | . "\n<user>" |
789 | . (util::toxml $self->{user}[1 - $msg->{player}]->as_string) |
793 | . (util::toxml $self->{user}[$msg->{player}]->as_string) |
790 | . "</user> wins the game." |
794 | . "</user> wins the game." |
791 | . "</infoblock>"); |
795 | . "</infoblock>"); |
792 | } |
796 | } |
793 | |
797 | |
794 | sub event_time_win { |
798 | sub event_time_win { |