diff options
author | Hiroyuki Ikezoe <hiikezoe@src.gnome.org> | 2007-07-19 06:17:31 +0800 |
---|---|---|
committer | Hiroyuki Ikezoe <hiikezoe@src.gnome.org> | 2007-07-19 06:17:31 +0800 |
commit | 41e4f3253eaf01a899f2cb0ddcaedaf384e84816 (patch) | |
tree | 208b2ab79574bfff382584b67bd07ae02e975712 | |
parent | cfe5af3cdc539f8e102fd6a5791a45b75b6e195a (diff) | |
download | gsoc2013-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
-rw-r--r-- | widgets/ChangeLog | 4 | ||||
-rw-r--r-- | widgets/text/e-text.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/widgets/ChangeLog b/widgets/ChangeLog index 623d7710a8..be5b35bb91 100644 --- a/widgets/ChangeLog +++ b/widgets/ChangeLog @@ -1,3 +1,7 @@ +2007-07-19 Hiroyuki Ikezoe <poincare@ikezoe.net> + + * text/e-text.c: (e_text_copy_clipboard): Remove needless g_strndup(). + 2007-07-15 Hiroyuki Ikezoe <poincare@ikezoe.net> * text/e-text.c: (primary_get_cb): Remove needless g_strndup(). 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 |