From 53d6ee570041c7e47c02dd8b4ca753a3b020369f Mon Sep 17 00:00:00 2001 From: Nicolas Noble Date: Thu, 9 Sep 2010 10:24:10 -0700 Subject: Fixing a few GTK compilation issues. --- iup/src/gtk/iupgtk_text.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'iup/src/gtk/iupgtk_text.c') diff --git a/iup/src/gtk/iupgtk_text.c b/iup/src/gtk/iupgtk_text.c index 2d17d17..9499c20 100755 --- a/iup/src/gtk/iupgtk_text.c +++ b/iup/src/gtk/iupgtk_text.c @@ -450,7 +450,10 @@ static int gtkTextSetSelectionAttrib(Ihandle* ih, const char* value) { GtkTextIter start_iter, end_iter; if (gtkTextSelectionAttribToIter(ih, value, &start_iter, &end_iter)) + { + GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ih->handle)); gtk_text_buffer_select_range(buffer, &start_iter, &start_iter); + } return 0; } @@ -562,7 +565,10 @@ static int gtkTextSetSelectionPosAttrib(Ihandle* ih, const char* value) { GtkTextIter start_iter, end_iter; if (gtkTextSelectionPosAttribToIter(ih, value, &start_iter, &end_iter)) + { + GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ih->handle)); gtk_text_buffer_select_range(buffer, &start_iter, &start_iter); + } return 0; } @@ -1159,7 +1165,7 @@ void iupdrvTextAddFormatTag(Ihandle* ih, Ihandle* formattag) char* selectionpos = iupAttribGet(formattag, "SELECTIONPOS"); if (selectionpos) { - if (!gtkTextSelectionPosAttribToIter(ih, selectionposstart_iter, &end_iter)) + if (!gtkTextSelectionPosAttribToIter(ih, selectionpos, &start_iter, &end_iter)) return; } else { GtkTextMark* mark = gtk_text_buffer_get_insert(buffer); -- cgit v1.2.3