Re: Some cut,copy and paste thoughts
- From: Havoc Pennington <hp redhat com>
- To: Damian Ivereigh <damian cisco com>
- Cc: Owen Taylor <otaylor redhat com>, gtk-list gnome org
- Subject: Re: Some cut,copy and paste thoughts
- Date: 31 May 2001 02:25:39 -0400
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.
> 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).
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.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]