Re: 6 API-ish issues
- From: Owen Taylor <otaylor redhat com>
- To: gtk-devel-list gnome org
- Subject: Re: 6 API-ish issues
- Date: Tue, 29 Jan 2002 21:34:24 -0500 (EST)
Gregory Merchan <merchan baton phys lsu edu> writes:
> On Tue, Jan 22, 2002 at 01:53:10PM +0000, Calum Benson wrote:
> > Owen Taylor wrote:
> <snip>
> > > (The main objections is wanting to maintain the contents of PRIMARY,
> > > the solution here is to train users to use the clipboard...)
> >
> > Yeah, I don't know what the best solution is here. Is there no way for
> > GtkEntry to highlight the text without affecting the contents of
> > PRIMARY? I regard that as a purely mouse-based transfer mechanism, so
> > it would be nice if, for example, just tabbing through a dialog didn't
> > affect it, since you're only using the keyboard to do that. But from
> > the little I remember about the technicalities from my Motif programming
> > days, I'm guessing that might not be an option...
>
> There is SECONDARY, but that should have a different highlight color.
> Since the selection color is themable, we'd probably want SECONDARY to
> be themeable too, which means it's unlikely to be done before 3.0.
> (Then how do you make a selection for it and how do you make use of it?)
GTK+-1.2 had a "selected but not the selection state, drawn in a different
color. (Not SECONDARY, just not in an X selection; SECONDARY would defeat
the purpose since only one app could have SECONDARY.)
The biggest problem with doing this for GTK+-2.0 is that we already
use two selected colors -- selected/focus, and selected/unfocused.
There's no way users would ever figure this out.
Thinking about this some more, it would be a real pain to not select
since the ::grab-focus action signal needs to select the contents of
the target widget; so, it's almost impossible for the entry to
tell whether a call to ->grab_focus() comes from the user or programmer.
Considering that I think the right thing to do is virtually always to
select, and making gtk_widget_grab_focus() not select would be quite
hard to implement, I think it's pretty clear that we should leave
it the way it is for now.
Maybe in a future version, we can add some gtk_entry_focus_without_selecting()
call.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]