Buchan Milne <[EMAIL PROTECTED]> writes:
> On 22 Feb 2003, Pixel wrote:
>
> > > As long as it means I can type in the value (and not click the up/down
> > > arrows on the spin button).
> >
> > yep :) committed.
> >
>
> Cool! BTW, it is fine in expert mode, since anyone who needs to do this
> kind of thing will probably use expert mode anyway ;-).
>
> Will I be able to test in the relative safety of diskdrake, or will I need
> to install?
yeah, of course. But you'll have to wait for a new drakxtools to be
released. If you have an urgent need to try it, apply this patch on
/usr/lib/libDrakX/interactive/gtk.pm :
Index: interactive/gtk.pm
===================================================================
RCS file: /cooker/gi/perl-install/interactive/gtk.pm,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- interactive/gtk.pm 20 Feb 2003 12:06:48 -0000 1.56
+++ interactive/gtk.pm 22 Feb 2003 20:24:45 -0000 1.57
@@ -1,4 +1,4 @@
-package interactive::gtk; # $Id: gtk.pm,v 1.56 2003/02/20 12:06:48 prigaux Exp $
+package interactive::gtk; # $Id: gtk.pm,v 1.57 2003/02/22 20:24:45 prigaux Exp $
use diagnostics;
use strict;
@@ -441,10 +441,11 @@
$set = sub { $w->child->set(may_apply($e->{format}, $_[0])) };
$width = length may_apply($e->{format}, ${$e->{val}});
} elsif ($e->{type} eq 'range') {
- my $adj = create_adjustment(${$e->{val}}, $e->{min}, $e->{max});
+ my $want_scale = !$::expert;
+ my $adj = Gtk2::Adjustment->new(${$e->{val}}, $e->{min}, $e->{max} + ($want_scale ? 1 : 0), 1, ($e->{max} - $e->{min}) / 10, 1);
$adj->signal_connect(value_changed => $changed);
- $w = Gtk2::HScale->new($adj);
- $w->set_size_request(200, -1);
+ $w = $want_scale ? Gtk2::HScale->new($adj) : Gtk2::SpinButton->new($adj, 10, 0);
+ $w->set_size_request($want_scale ? 200 : 100, -1);
$w->set_digits(0);
$w->signal_connect(key_press_event => $may_go_to_next);
$set = sub { $adj->set_value($_[0]) };
it's quite simple, but i think each versions have their advantage :-/