Use gtk_text_buffer_get_slice instead of gtk_text_buffer_get_text

This commit is contained in:
Yevgen Muntyan 2006-06-09 14:27:08 -05:00
parent be1cef84a8
commit 79ef757208
5 changed files with 10 additions and 10 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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);
}

View File

@ -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);

View File

@ -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)