public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* Re: [RFA] fix tab size spinner
       [not found] <Pine.GSO.4.33.0110111216180.28476-100000@makita.cygnus.com>
@ 2001-10-16 17:42 ` Martin M. Hunt
  2001-10-16 18:25   ` Fernando Nasser
  0 siblings, 1 reply; 4+ messages in thread
From: Martin M. Hunt @ 2001-10-16 17:42 UTC (permalink / raw)
  To: Keith Seitz; +Cc: Insight Maling List

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFA] fix tab size spinner
  2001-10-16 17:42 ` [RFA] fix tab size spinner Martin M. Hunt
@ 2001-10-16 18:25   ` Fernando Nasser
  2001-10-17 10:32     ` Tom Tromey
  0 siblings, 1 reply; 4+ messages in thread
From: Fernando Nasser @ 2001-10-16 18:25 UTC (permalink / raw)
  To: Martin M. Hunt; +Cc: Keith Seitz, Insight Maling List

"Martin M. Hunt" wrote:
> 
> 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?
> 

The idea of the Apply button is that you could try changing something
without
closing the dialog box.  So you can try it, see how it looks and if you
don't
like, try another thing or set it back to what it was before.

W.r.t. having the preferences take effect as they are changed on their
controls is not the most usual way.  The argument is that your finger
can slip
or something and you get some weird effect by mistake -- it works like a
confirmation.  A stronger argument is that some preferences are
composed, i.e.,
you must select more than one control (like font and size) and a partial
change
may not be desirable.

I would prefer to fix the Apply button, but whatever the majority
decides is
OK with me.

-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFA] fix tab size spinner
  2001-10-16 18:25   ` Fernando Nasser
@ 2001-10-17 10:32     ` Tom Tromey
  2001-10-17 11:11       ` Keith Seitz
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2001-10-17 10:32 UTC (permalink / raw)
  To: Fernando Nasser; +Cc: Martin M. Hunt, Keith Seitz, Insight Maling List

>>>>> "Fernando" == Fernando Nasser <fnasser@redhat.com> writes:

Fernando> I would prefer to fix the Apply button, but whatever the
Fernando> majority decides is OK with me.

I would also prefer the Apply button be fixed.  Having changes take
effect immediately seems odd to me.  Also, I think it would make sense
to address the issue of per-session options.  For instance, I think it
makes sense to have the "start an xterm" option be per-session -- for
certain programs you always want it, while for others you don't.

Tom

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFA] fix tab size spinner
  2001-10-17 10:32     ` Tom Tromey
@ 2001-10-17 11:11       ` Keith Seitz
  0 siblings, 0 replies; 4+ messages in thread
From: Keith Seitz @ 2001-10-17 11:11 UTC (permalink / raw)
  To: Martin M. Hunt; +Cc: Insight Maling List

On 17 Oct 2001, Tom Tromey wrote:

> >>>>> "Fernando" == Fernando Nasser <fnasser@redhat.com> writes:
>
> Fernando> I would prefer to fix the Apply button, but whatever the
> Fernando> majority decides is OK with me.
>
> I would also prefer the Apply button be fixed.  Having changes take
> effect immediately seems odd to me.

You already know that I feel the same way. I should document this in my
styleguide thingy (which still sucks but should be posted somewhere
anyway).

> Also, I think it would make sense
> to address the issue of per-session options.  For instance, I think it
> makes sense to have the "start an xterm" option be per-session -- for
> certain programs you always want it, while for others you don't.

Alas, we all know this is a separate problem that I've been trying to get
to, but never seem to. :-(

I've added it to my personal todo list (which is now getting quite large).

Keith


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-10-17 11:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <Pine.GSO.4.33.0110111216180.28476-100000@makita.cygnus.com>
2001-10-16 17:42 ` [RFA] fix tab size spinner Martin M. Hunt
2001-10-16 18:25   ` Fernando Nasser
2001-10-17 10:32     ` Tom Tromey
2001-10-17 11:11       ` Keith Seitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).