cursor position in filename entry of gtkfilechooserdialog

2012-02-02 Thread Ferdinand Ramirez
If I set the filename using gtk_file_chooser_set_current_name from a callback 
method for key-press-event, the filename shows up in the text entry box, but 
the cursor position is at 0 once the filename has been set. How do I set the 
cursor position to be at the end of the string I set as the filename?

Thanks,
-Ferdinand
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: cursor position in filename entry of gtkfilechooserdialog

2012-02-02 Thread Emmanuel Thomas-Maurin
On 02/02/2012 10:23 PM, Ferdinand Ramirez wrote:
> If I set the filename using gtk_file_chooser_set_current_name from a callback 
> method for key-press-event, the filename shows up in the text entry box, but 
> the cursor position is at 0 once the filename has been set. How do I set the 
> cursor position to be at the end of the string I set as the filename?

I think you may use something like:
gtk_editable_set_position(GTK_EDITABLE(entry), -1)

-- 
Emmanuel Thomas-Maurin 
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: cursor position in filename entry of gtkfilechooserdialog

2012-02-02 Thread Ferdinand Ramirez
--- On Thu, 2/2/12, Emmanuel Thomas-Maurin  wrote:

> I think you may use something like:
> gtk_editable_set_position(GTK_EDITABLE(entry), -1)
> 

The problem is that I don't seem to have access to location_entry in 
GtkFileChooser for me to use the above function. Do you know how I can get hold 
of location_entry? I believe location_entry is the GtkEntry object and I need a 
handle to that.

Thanks,
-Ferdinand
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: cursor position in filename entry of gtkfilechooserdialog

2012-02-03 Thread Emmanuel Thomas-Maurin
On 02/03/2012 01:17 AM, Ferdinand Ramirez wrote:
> --- On Thu, 2/2/12, Emmanuel Thomas-Maurin  wrote:
> 
>> I think you may use something like:
>> gtk_editable_set_position(GTK_EDITABLE(entry), -1)
>>
> 
> The problem is that I don't seem to have access to location_entry in 
> GtkFileChooser for me to use the above function. Do you know how I can get 
> hold of location_entry? I believe location_entry is the GtkEntry object and I 
> need a handle to that.

It doesn't seem easy. Maybe with
gtk_container_forall(GTK_CONTAINER(file_chooser)) as location_entry is
considered "internal"?

-- 
Emmanuel Thomas-Maurin 
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list