Re: Cut/Copy/Paste Menu Selections
- From: "D." Brian Gosnell <brian-g unbounded com>
- To: damian cisco com
- Cc: gnome-devel-list gnome org
- Subject: Re: Cut/Copy/Paste Menu Selections
- Date: 28 May 2001 00:51:14 -0500
On 27 May 2001 13:55:04 -0400, Havoc Pennington wrote:
>
>
> Damian Ivereigh <damian cisco com> writes:
> > However I would like to also change the "sensitivity" of the menu items
> > according to various situations. The most obvious example is only making
> > "paste" sensitive when there is actually something in the clipboard.
> >
> > I have searched around for some way to easily detect if there is
> > something in the clipboard. However I have found no function or easy way
> > to do this. Does anyone have any suggestions? Should I just give up?
> >
>
> I remember being this impossible but I don't remember all the
> issues. Owen will know.
>
> You can use XGetSelectionOwner() to see if someone owns the selection
> (i.e. there's something to paste), but I don't think there's a good
> way to know whether the available stuff to paste is something you know
> how to paste. i.e. you can't find out the data types of the stuff on
> the clipboard (text, image, postscript, Word document) without
> actually trying to paste. I could be wrong.
>
> Havoc
>
Just throwing around an idea here but couldn't you dump the data in the
clipboard to a file and then run system("file DATA"). It's a bad hack
but would seem to get the job done. I've done worse stuff than this
dealing with GTKText in GTK1.2.
DBrian
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]