aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorJonny Lamb <jonnylamb@gnome.org>2011-05-18 21:26:08 +0800
committerJonny Lamb <jonnylamb@gnome.org>2011-05-18 21:26:08 +0800
commit7b526c2d40795fdd97ee63589a14a0a679a00e2a (patch)
tree865ff804c686bf9afa5769575a0cc4613ae91bc7 /libempathy-gtk
parent2950825a4452bc984c0dd356c5bf17c3a674c451 (diff)
parentcbbf2cd51ed0f7bd51c617fe75596511415b076f (diff)
downloadgsoc2013-empathy-7b526c2d40795fdd97ee63589a14a0a679a00e2a.tar
gsoc2013-empathy-7b526c2d40795fdd97ee63589a14a0a679a00e2a.tar.gz
gsoc2013-empathy-7b526c2d40795fdd97ee63589a14a0a679a00e2a.tar.bz2
gsoc2013-empathy-7b526c2d40795fdd97ee63589a14a0a679a00e2a.tar.lz
gsoc2013-empathy-7b526c2d40795fdd97ee63589a14a0a679a00e2a.tar.xz
gsoc2013-empathy-7b526c2d40795fdd97ee63589a14a0a679a00e2a.tar.zst
gsoc2013-empathy-7b526c2d40795fdd97ee63589a14a0a679a00e2a.zip
Merge branch 'remember-my-message-yo'
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-chat.c23
-rw-r--r--libempathy-gtk/empathy-chat.h4
2 files changed, 27 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index e76998065..79411e74d 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -4036,3 +4036,26 @@ empathy_chat_get_n_messages_sending (EmpathyChat *self)
return n_messages;
}
}
+
+gchar *
+empathy_chat_dup_text (EmpathyChat *self)
+{
+ GtkTextBuffer *buffer;
+ GtkTextIter start, end;
+
+ buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (self->input_text_view));
+
+ gtk_text_buffer_get_bounds (buffer, &start, &end);
+ return gtk_text_buffer_get_text (buffer, &start, &end, FALSE);
+}
+
+void
+empathy_chat_set_text (EmpathyChat *self,
+ const gchar *text)
+{
+ GtkTextBuffer *buffer;
+
+ buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (self->input_text_view));
+
+ gtk_text_buffer_set_text (buffer, text, -1);
+}
diff --git a/libempathy-gtk/empathy-chat.h b/libempathy-gtk/empathy-chat.h
index 47892d6c9..4b0540b20 100644
--- a/libempathy-gtk/empathy-chat.h
+++ b/libempathy-gtk/empathy-chat.h
@@ -97,6 +97,10 @@ gboolean empathy_chat_is_composing (EmpathyChat *chat);
gboolean empathy_chat_is_sms_channel (EmpathyChat *self);
guint empathy_chat_get_n_messages_sending (EmpathyChat *self);
+gchar * empathy_chat_dup_text (EmpathyChat *self);
+void empathy_chat_set_text (EmpathyChat *self,
+ const gchar *text);
+
G_END_DECLS
#endif /* __EMPATHY_CHAT_H__ */