aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/text
diff options
context:
space:
mode:
authorHiroyuki Ikezoe <hiikezoe@src.gnome.org>2007-07-19 06:17:31 +0800
committerHiroyuki Ikezoe <hiikezoe@src.gnome.org>2007-07-19 06:17:31 +0800
commit41e4f3253eaf01a899f2cb0ddcaedaf384e84816 (patch)
tree208b2ab79574bfff382584b67bd07ae02e975712 /widgets/text
parentcfe5af3cdc539f8e102fd6a5791a45b75b6e195a (diff)
downloadgsoc2013-evolution-41e4f3253eaf01a899f2cb0ddcaedaf384e84816.tar
gsoc2013-evolution-41e4f3253eaf01a899f2cb0ddcaedaf384e84816.tar.gz
gsoc2013-evolution-41e4f3253eaf01a899f2cb0ddcaedaf384e84816.tar.bz2
gsoc2013-evolution-41e4f3253eaf01a899f2cb0ddcaedaf384e84816.tar.lz
gsoc2013-evolution-41e4f3253eaf01a899f2cb0ddcaedaf384e84816.tar.xz
gsoc2013-evolution-41e4f3253eaf01a899f2cb0ddcaedaf384e84816.tar.zst
gsoc2013-evolution-41e4f3253eaf01a899f2cb0ddcaedaf384e84816.zip
Remove needless g_strndup().
* text/e-text.c: (e_text_copy_clipboard): Remove needless g_strndup(). svn path=/trunk/; revision=33819
Diffstat (limited to 'widgets/text')
-rw-r--r--widgets/text/e-text.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c
index 34321c5ade..e1ce88ebd6 100644
--- a/widgets/text/e-text.c
+++ b/widgets/text/e-text.c
@@ -2492,7 +2492,6 @@ e_text_copy_clipboard (EText *text)
{
gint selection_start_pos;
gint selection_end_pos;
- char *str;
selection_start_pos = MIN (text->selection_start, text->selection_end);
selection_end_pos = MAX (text->selection_start, text->selection_end);
@@ -2501,14 +2500,11 @@ e_text_copy_clipboard (EText *text)
selection_start_pos = g_utf8_offset_to_pointer (text->text, selection_start_pos) - text->text;
selection_end_pos = g_utf8_offset_to_pointer (text->text, selection_end_pos) - text->text;
- str = g_strndup (text->text + selection_start_pos,
- selection_end_pos - selection_start_pos);
-
gtk_clipboard_set_text (
gtk_widget_get_clipboard (GTK_WIDGET (GNOME_CANVAS_ITEM (text)->canvas),
GDK_SELECTION_CLIPBOARD),
- str, -1);
- g_free (str);
+ text->text + selection_start_pos,
+ selection_end_pos - selection_start_pos);
}
void