Re: Some cut,copy and paste thoughts



On 31 May 2001 02:25:39 -0400, Havoc Pennington wrote:
> 
> Damian Ivereigh <damian cisco com> writes:  
> > Yeah that wasn't quite what I meant (thanks for the link though). I have
> > a feeling this is much more of a gnome issue than a gtk one, perhaps you
> > could confirm this.
> 
> I think you need a solution on the GTK level if you're going to have
> one at all, because GtkEntry/GtkTextView/GtkLabel and their
> right-click menus would need to support it.

True, glad I'm in the right place then :-)

> > What I would like to see is some standard Cut,Copy & Paste menu entries
> > that could be plugged into a gnome menu. You would then also register
> > (either actively or implicitly) all the selectable areas in the window.
> > Then each time the menu is popped up, the routines would scan through
> > the registered widgets looking for which one is in focus and if it is
> > editable. If nothing is selected then don't offer copy or cut, if it is
> > not editable, don't offer cut or paste, if nothing is focused then don't
> > offer cut, copy or paste. It would also then know what editable widget
> > to send to the gtk clipboard functions.
> 
> I think focus isn't the issue, the issue is which widget if any owns
> the PRIMARY selection (i.e. has some stuff selected).

Almost. That would tell you which widget has something selected (useful
for cut & copy), but doesn't help you decide if paste is appropriate -
there maybe nothing selected before a paste operation (just a focus).

> To see who has primary, there's gtk_selection_get_owner() I think. If
> not it's easy to write that. So you see if a widget in your app has
> the primary selection; then what you need is a generic way to query
> editability, and a generic way to invoke the cut/copy/paste
> operations on a widget. So that's the hard part.

Yes, that's pretty much it. What is frustrating is that generally the
keyboard accelerators seems to work everywhere (well everywhere that
makes sense). I am wondering if there is anyway to harness that.

Is this whole subject important or is it just me? My feeling is that
drag-n-drop is making big noises, however the more often required, basic
integration, of cut & paste seems to being ignored.

Damian





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]