Revision: 6776
Author: nogu.dev
Date: Sat Sep 11 17:43:33 2010
Log: * gtk/text-util.c
- (im_uim_acquire_selection_text, delete_text_in_gtk_entry):
Use gtk_editable_get_position() for GTK+3.
http://code.google.com/p/uim/source/detail?r=6776
Modified:
/trunk/gtk/text-util.c
=======================================
--- /trunk/gtk/text-util.c Sat Sep 11 17:42:18 2010
+++ /trunk/gtk/text-util.c Sat Sep 11 17:43:33 2010
@@ -266,7 +266,7 @@
if (gtk_editable_get_selection_bounds(GTK_EDITABLE(uic->widget),
&start, &end)) {
text = gtk_editable_get_chars(GTK_EDITABLE(uic->widget), start, end);
- current = GTK_ENTRY(uic->widget)->current_pos;
+ current = gtk_editable_get_position(GTK_EDITABLE(uic->widget));
if (current == start)
cursor_at_beginning = TRUE;
}
@@ -415,7 +415,7 @@
{
gint start_pos, end_pos, current_pos;
- current_pos = entry->current_pos;
+ current_pos = gtk_editable_get_position(GTK_EDITABLE(entry));
switch (origin) {
case UTextOrigin_Cursor:
@@ -611,7 +611,7 @@
if (!gtk_editable_get_selection_bounds(GTK_EDITABLE(entry), &start,
&end))
return -1;
- current_pos = entry->current_pos;
+ current_pos = gtk_editable_get_position(GTK_EDITABLE(entry));
if (current_pos == start)
cursor_at_beginning = TRUE;