[maemo-developers] gtk_editable_get_selection_bounds

From: Cornelius Hald hald at icandy.de
Date: Sun Nov 22 20:35:41 EET 2009
Hi Peter,

I'm not sure I understand your problem correctly, but
gtk_editable_get_selection_bounds() is meant to only return the start
and end positions. If you need the selected text you could call
gtk_editable_get_chars() using the previously obtained positions.

Or maybe gtk_editable_copy_clipboard() is what you want to use? All of
them are explained here:
http://library.gnome.org/devel/gtk/unstable/GtkEditable.html

If I misunderstood you, please tell me.

Cheers!
Conny


On Sun, 2009-11-22 at 18:49 +0100, Peter Romero wrote:
> Hello,
> 
> i use a gtk entry widget in a vbox of a dialog to display a file  
> location.
> Instead to make a copy of the the whole filepath via a butten i would
> like to send just the selected text to the default clipboard.
> But gtk_editable_get_selection_bounds gives back just the curser
> position for start and end. :-(
> When i press ctrl-c it works but i hate it to use the keyboard.
> 
> Is this a bug or do i something wrong ?
> A workaround hint woud be as welcome as well ? :-)
> 
> The only known possible bug i found is under the id 255 ... but it is  
> fixed.
> 
> 
> http://test.maemo.org/testzilla/show_bug.cgi?format=multiple&id=255
> 
> 
> gint start;
> gint end;
> GtkWidget *editable;
> 
> editable = gtk_entry_new();
> 
> if (
> 	gtk_editable_get_selection_bounds(GTK_EDITABLE *editable,&start,&end)
> ){
> //NEVER TRUE
> }else{
> //EVER FALSE :-(
> }
> 
> I need it for a mdictionary extention
> to easy get the playback location to record the audio file.
> 
> Peter Romero
> p_romero at gmx.de
> 
> 
> 
> _______________________________________________
> maemo-developers mailing list
> maemo-developers at maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-developers

More information about the maemo-developers mailing list