diff --git a/moo/mooedit/mooedit.c b/moo/mooedit/mooedit.c index 25ca7b8c..5b655f36 100644 --- a/moo/mooedit/mooedit.c +++ b/moo/mooedit/mooedit.c @@ -900,7 +900,7 @@ try_mode_strings (MooEdit *edit) gtk_text_buffer_get_start_iter (buffer, &start); end = start; gtk_text_iter_forward_to_line_end (&end); - first = gtk_text_buffer_get_text (buffer, &start, &end, FALSE); + first = gtk_text_buffer_get_slice (buffer, &start, &end, TRUE); gtk_text_buffer_get_end_iter (buffer, &end); @@ -916,7 +916,7 @@ try_mode_strings (MooEdit *edit) gtk_text_iter_set_line_offset (&start, 0); } - last = gtk_text_buffer_get_text (buffer, &start, &end, FALSE); + last = gtk_text_buffer_get_slice (buffer, &start, &end, TRUE); try_mode_string (edit, first); try_mode_string (edit, last); diff --git a/moo/mooedit/mooeditfileops.c b/moo/mooedit/mooeditfileops.c index 50293c23..abe0b87e 100644 --- a/moo/mooedit/mooeditfileops.c +++ b/moo/mooedit/mooeditfileops.c @@ -674,7 +674,7 @@ do_write (MooEdit *edit, gssize len = -1; gtk_text_iter_forward_to_line_end (&line_end); - line = gtk_text_buffer_get_text (buffer, &line_start, &line_end, FALSE); + line = gtk_text_buffer_get_slice (buffer, &line_start, &line_end, TRUE); status = g_io_channel_write_chars (file, line, len, &written, error); g_free (line); diff --git a/moo/mooedit/mootextfind.c b/moo/mooedit/mootextfind.c index b1cf9577..5741cb1d 100644 --- a/moo/mooedit/mootextfind.c +++ b/moo/mooedit/mootextfind.c @@ -258,7 +258,7 @@ moo_find_setup (MooFind *find, if (gtk_text_buffer_get_selection_bounds (buffer, &sel_start, &sel_end) && gtk_text_iter_get_line (&sel_start) == gtk_text_iter_get_line (&sel_end)) { - char *selection = gtk_text_buffer_get_text (buffer, &sel_start, &sel_end, TRUE); + char *selection = gtk_text_buffer_get_slice (buffer, &sel_start, &sel_end, TRUE); gtk_entry_set_text (GTK_ENTRY (search_entry->entry), selection); g_free (selection); } diff --git a/moo/mooedit/mootextprint.c b/moo/mooedit/mootextprint.c index 2ed4f068..d3ee0477 100644 --- a/moo/mooedit/mootextprint.c +++ b/moo/mooedit/mootextprint.c @@ -595,7 +595,7 @@ moo_print_operation_begin_print (GtkPrintOperation *operation, if (!gtk_text_iter_ends_line (&end)) gtk_text_iter_forward_to_line_end (&end); - text = gtk_text_buffer_get_text (print->buffer, &iter, &end, FALSE); + text = gtk_text_buffer_get_slice (print->buffer, &iter, &end, TRUE); pango_layout_set_text (print->layout, text, -1); g_free (text); @@ -922,7 +922,7 @@ print_page (MooPrintOperation *print, if (!GET_OPTION (print, MOO_PRINT_USE_STYLES)) { - text = gtk_text_buffer_get_text (print->buffer, start, end, FALSE); + text = gtk_text_buffer_get_slice (print->buffer, start, end, TRUE); pango_layout_set_text (print->layout, text, -1); g_free (text); diff --git a/moo/mooedit/mootextview.c b/moo/mooedit/mootextview.c index f510f546..f1b7f416 100644 --- a/moo/mooedit/mootextview.c +++ b/moo/mooedit/mootextview.c @@ -1208,7 +1208,7 @@ moo_text_view_get_selection (MooTextView *view) buf = get_buffer (view); if (gtk_text_buffer_get_selection_bounds (buf, &start, &end)) - return gtk_text_buffer_get_text (buf, &start, &end, TRUE); + return gtk_text_buffer_get_slice (buf, &start, &end, TRUE); else return NULL; } @@ -1230,7 +1230,7 @@ moo_text_view_has_text (MooTextView *view) } -char* +char * moo_text_view_get_text (MooTextView *view) { GtkTextBuffer *buf; @@ -1241,7 +1241,7 @@ moo_text_view_get_text (MooTextView *view) buf = get_buffer (view); gtk_text_buffer_get_bounds (buf, &start, &end); - text = gtk_text_buffer_get_text (buf, &start, &end, TRUE); + text = gtk_text_buffer_get_slice (buf, &start, &end, TRUE); if (text && *text) { @@ -4361,7 +4361,7 @@ moo_text_view_start_quick_search (MooTextView *view) if (gtk_text_buffer_get_selection_bounds (buffer, &iter1, &iter2) && gtk_text_iter_get_line (&iter1) == gtk_text_iter_get_line (&iter2)) { - text = gtk_text_buffer_get_text (buffer, &iter1, &iter2, TRUE); + text = gtk_text_buffer_get_slice (buffer, &iter1, &iter2, TRUE); } if (text)