Re: Some cut,copy and paste thoughts



On 30 May 2001 10:03:37 -0400, Owen Taylor wrote:

> Well, I'd be a little hestitant about offering such a function 
> because there are two snags in the usage:
> 
>  - X does not provide any notification on changes for this, so you have 
>    to check every time the menu is popped up. Which for a menu from 
>    a menubar is decidedly painful.

Hmm, do have any idea what the performance hit would be? Do you what
Mozilla does for this?

>  - Just because there is an owner for the selection, doesn't mean
>    the owner is offering anything you can paste.

Agreed. But it is better than what we have now - in which most apps
offer the paste regardless. At least this would grey it out if there was
definately nothing there.

>    It would be more reliable to actually request the TARGETS selection
>    and check to see if any of them are acceptable.

Yeah I think this is what Marks bit of code does.

>    But then you get into the problem that by the time you've gotten
>    that information from the owner, either you've displayed the
>    menu in a possibly incorrect way, or you've paused long enough
>    to be noticeable to the user.

Well as long as it errs on the side of offering paste, we are better
than we are now.

Personally I like the visual feedback of pulling up the Edit menu and
seeing that I have something to paste (or more to the point seeing that
I don't). Unfortunately a lot of Windows users are also used to it.

> But that doesn't mean that something along these lines couldn't
> be useful.

Thanks for being open to the idea!

> > What is the procedure for creating a new library function such as
> > this? 
> 
> The best way to request something is to file a bug in bugzilla.gnome.org.
> Including a patch may help get it done, though not always.

OK, I'll put together a function and send it off.

> > Who do I need to persuade? 
> 
> Me.

:-)

> > On a related, but different, subject. Having now finished all the
> > Cut/Copy/Paste stuff, I am wondering if there really should be a widget
> > or at least some easy way to perform it (and handle all the
> > sensitivities). I felt like I was reinventing the wheel. I notice few
> > other gnome apps bother with fixing the sensitivity. Again is the right
> > place to talk about it? I have a few ideas about how to do it, however I
> > am a gtk/gnome newbie (though I long-time 'C' hack) and I am unsure of
> > the "right" way to do it.
> 
>  http://developer.gnome.org/doc/API/2.0/gtk/gtk-clipboards.html

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.

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 am not saying that this system will cope with all situations out
there, but it will cope with all the standard text editing style of apps
at least.

My concern is that since the standard keyboard shortcuts work almost
everywhere that people aren't bothering to get the Edit menu fixed up
because it is currently such a hassle. However on the usability front
most non-techies only ever know about the Edit menu, so it is important
for the wider users.

Damian





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