* modest-msg-view.ch]:
authorDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Sun, 3 Dec 2006 19:53:00 +0000 (19:53 +0000)
committerDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Sun, 3 Dec 2006 19:53:00 +0000 (19:53 +0000)
  - remove modest_msg_view_get_selected_text: it's ugly

pmo-trunk-r515

src/widgets/modest-msg-view.c
src/widgets/modest-msg-view.h

index 5b6d5ac..77bbc2b 100644 (file)
@@ -418,7 +418,7 @@ set_html_message (ModestMsgView *self, TnyMimePart *tny_body, TnyMsg *msg)
 }
 
 
-/* this is a hack --> we use the tny_text_buffer_stream to
+/* FIXME: this is a hack --> we use the tny_text_buffer_stream to
  * get the message text, then write to gtkhtml 'by hand' */
 static gboolean
 set_text_message (ModestMsgView *self, TnyMimePart *tny_body, TnyMsg *msg)
@@ -489,31 +489,6 @@ set_empty_message (ModestMsgView *self)
 }
 
 
-gchar *
-modest_msg_view_get_selected_text (ModestMsgView *self)
-{
-       ModestMsgViewPrivate *priv;
-       gchar *sel;
-       GtkWidget *html;
-       int len;
-       GtkClipboard *clip;
-
-       g_return_val_if_fail (self, NULL);
-       priv = MODEST_MSG_VIEW_GET_PRIVATE(self);
-       html = priv->gtkhtml;
-       
-       /* I'm sure there is a better way to check for selected text */
-       sel = gtk_html_get_selection_html(GTK_HTML(html), &len);
-       if (!sel)
-               return NULL;
-       
-       g_free(sel);
-       
-       clip = gtk_widget_get_clipboard(html, GDK_SELECTION_PRIMARY);
-       return gtk_clipboard_wait_for_text(clip);
-}
-
-
 void
 modest_msg_view_set_message (ModestMsgView *self, TnyMsg *msg)
 {
index 2bc48f1..814a638 100644 (file)
@@ -34,7 +34,7 @@
 #include <tny-stream.h>
 #include <tny-msg.h>
 #include <tny-mime-part.h>
-#include <modest-conf.h>
+#include <tny-msg-view.h>
 
 G_BEGIN_DECLS
 
@@ -98,16 +98,6 @@ GtkWidget*   modest_msg_view_new          (TnyMsg *tny_msg);
  *  */
 void         modest_msg_view_set_message  (ModestMsgView *self, TnyMsg *tny_msg);
 
-/**
- * modest_msg_view_get_selected_text:
- * @self: a ModestMsgView instance
- * 
- * get the user selected part of the message
- * 
- * Returns: a newly allocated string of the user's selection or NULL if nothing is selected
- */
-gchar *      modest_msg_view_get_selected_text (ModestMsgView *self);
-
 G_END_DECLS
 
 #endif /* __MODEST_MSG_VIEW_H__ */