I have a set of widgets GtkEntry, some of which are editable and focusable, and some are not. I would like to know which of them currently have the selected text in order to implement the menu item "Edit-> Copy". Is there a way to do this differently than repeating all the widgets until gtk_editable_get_selection_boundsit returns true?
Currently, I will get around the problem by calling gtk_clipboard_get(GDK_SELECTION_PRIMARY), but from what the documents say, it is not portable (and will also select the text selected anywhere in the current display, and not just from my application).
source
share