This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [RFA] fix tab size spinner


On Thursday 11 October 2001 12:21 pm, Keith Seitz wrote:
> On Thu, 11 Oct 2001, Martin M. Hunt wrote:
> > More brain-damaged iwidgets.  The tab size spinner does not initialize
> > itself to the textvariable, instead it initializes the textvariable.
> >
> >    frame $f.x
> > +
> >    # Tab size
> > +  set tab_size [pref get gdb/src/tab_size]
> >    itk_component add size {
> >      iwidgets::spinint $f.x.size -labeltext "Tab Size" -range {1 16} \
> >        -step 1 -fixed 2 -width 2 -textvariable [pref varname
> > gdb/src/tab_size] \
> >        -wrap 0
> >    }
> > +  $f.x.size delete 0 end
> > +  $f.x.size insert end $tab_size
>
> Ugh, now I remember why I disliked the preference dialogs... We should not
> be using "pref varname gdb/src/tab_size" in the spinint. If we do, then
> the instant the spinint is changed, it is saved in the preference, no?
> Sounds a little backwards.
>
> We should be doing something like:
>
>   iwidgets::spinint ... -textvariable [scope _tab_size] ...
>   set _tab_size [pref get gdb/src/tab_size]
>
> Then in GlobalPref::_apply, we should be doing
> pref set gdb/src/tab_size $_tab_size
>
> Does this not make more sense? Of course, I could be hallucinating. :-)

Some prefs use "apply" and some don't.  We need to either fix the apply 
button or remove it.  We also need to fix closing the dialog so it does the 
same thing as hitting "OK".  

Anyone feel strongly about the need for "Apply"?  Is there a problem with 
having options apply themselves immediately?

Martin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]