Hi all,
I hope this is the right forum for this. I have been working on Galeon
and have just completed all the stuff around doing the cut,copy & paste
from the Edit pulldown menu. Pretty standard stuff I thought.
The first place I got stuck was wanting to make each selection sensitive
according to what was going on - for example only offering Paste if
there was something actually in the CLIPBOARD.
However I could not find a way to detect this. In the end I did it via a
native X call - XGetSelectionOwner(). I found another gdk routine that
*almost* did what I needed: gdk_selection_owner_get(), however it
returns NULL not only when there is no owner (nothing in the clipboard),
but also when it is owned by a non gdk process, so was no use to me.
Since all I care about is if there is anything there, not trying to
actually work out what is on the other end. I am wondering if there
would be any point in creating a new gdk function called, say,
gdk_selection_is_owned(). What is the procedure for creating a new
library function such as this? Who do I need to persuade? Can anyone
suggest a better way.
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.
Damian
_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list