2007-07-16 Murray Cumming <murrayc@murrayc.com>
[modest] / src / widgets / modest-msg-view.c
index 0b2343f..d2116ef 100644 (file)
@@ -1423,6 +1423,17 @@ modest_msg_view_get_message (ModestMsgView *self)
 }
 
 gboolean 
+modest_msg_view_get_message_is_empty (ModestMsgView *self)
+{
+       /* TODO: Find some gtkhtml API to check whether there is any (visible, non markup)
+        * text in the message:
+        */
+       
+       return FALSE;
+}
+
+
+gboolean 
 modest_msg_view_search (ModestMsgView *self, const gchar *search)
 {
        ModestMsgViewPrivate *priv;
@@ -1440,6 +1451,9 @@ modest_msg_view_search (ModestMsgView *self, const gchar *search)
        result = gtk_html_engine_search (GTK_HTML (priv->gtkhtml),
                                         search,
                                         FALSE, TRUE, TRUE);
+
+// wait for the updated gtkhtml (w27) to enable this
+#if 0
        if (result) {
                gint x, y, w, h;
                gdouble offset_top, offset_bottom;
@@ -1453,6 +1467,8 @@ modest_msg_view_search (ModestMsgView *self, const gchar *search)
                else if (offset_bottom > adj->value + adj->page_increment)
                        gtk_adjustment_set_value (adj, offset_bottom - adj->page_increment);
        }
+#endif 
+
        y_offset = tmp_vadj->value;
        gtk_layout_set_vadjustment (GTK_LAYOUT (priv->gtkhtml), vadj);
        g_object_unref (vadj);
@@ -1471,6 +1487,8 @@ modest_msg_view_search_next (ModestMsgView *self)
        priv = MODEST_MSG_VIEW_GET_PRIVATE (self);
        result = gtk_html_engine_search_next (GTK_HTML (priv->gtkhtml));
 
+// fixme wait for new gtkhtml
+#if 0
        if (result) {
                gint x, y, w, h;
                gdouble offset_top, offset_bottom;
@@ -1485,7 +1503,7 @@ modest_msg_view_search_next (ModestMsgView *self)
                else if (offset_bottom > adj->value + adj->page_increment)
                        gtk_adjustment_set_value (adj, offset_bottom - adj->page_increment);
        }
-
+#endif
        return result;
 }