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

Comparing kgsueme/kgsueme/gtk.pl (file contents):
Revision 1.34 by root, Thu Jun 3 04:21:10 2004 UTC vs.
Revision 1.35 by root, Tue Jun 8 17:35:00 2004 UTC

203 203
204sub numentry { 204sub numentry {
205 my ($ref, $width, $cb) = @_; 205 my ($ref, $width, $cb) = @_;
206 206
207 my $widget = new Gtk2::Entry; 207 my $widget = new Gtk2::Entry;
208 $widget->set (text => $$ref, width_chars => $width); 208 $widget->set (text => $$ref, width_chars => $width, xalign => 1);
209 eval { $widget->set (xalign => 1) }; # workaround für 2.2
210 $widget->signal_connect (changed => sub { 209 $widget->signal_connect (changed => sub {
211 $$ref = $_[0]->get_text; 210 $$ref = $_[0]->get_text;
212 $cb->($$ref) if $cb; 211 $cb->($$ref) if $cb;
213 }); 212 });
214 213
217 216
218sub timeentry { 217sub timeentry {
219 my ($ref, $width, $cb) = @_; 218 my ($ref, $width, $cb) = @_;
220 219
221 my $widget = new Gtk2::Entry; 220 my $widget = new Gtk2::Entry;
222 $widget->set (text => util::format_time $$ref, width_chars => $width); 221 $widget->set (text => util::format_time $$ref, width_chars => $width, xalign => 1);
223 eval { $widget->set (xalign => 1) }; # workaround für 2.2
224 $widget->signal_connect (changed => sub { 222 $widget->signal_connect (changed => sub {
225 $$ref = util::parse_time $_[0]->get_text; 223 $$ref = util::parse_time $_[0]->get_text;
226 $cb->($$ref) if $cb; 224 $cb->($$ref) if $cb;
227 }); 225 });
228 226

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines