* changed the parent class of ModestTnyMsgView from GtkFrame to GtkTextView to get...
[modest] / src / modest-tny-msg-view.c
index 00dbe5b..58ee059 100644 (file)
@@ -46,7 +46,8 @@ modest_tny_msg_view_get_type (void)
                        1,              /* n_preallocs */
                        (GInstanceInitFunc) modest_tny_msg_view_init,
                };
-               my_type = g_type_register_static (GTK_TYPE_FRAME,
+               //my_type = g_type_register_static (GTK_TYPE_FRAME,
+               my_type = g_type_register_static (GTK_TYPE_TEXT_VIEW,
                                                  "ModestTnyMsgView",
                                                  &my_info, 0);
        }
@@ -126,9 +127,11 @@ modest_tny_msg_view_set_message (ModestTnyMsgView *self, TnyMsgIface *msg)
        priv = MODEST_TNY_MSG_VIEW_GET_PRIVATE(self);
        buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW(priv->text_view));
 
-       /* if msg is NULL, just delete the stuff */
+       /* clear the message view */
+       gtk_text_buffer_set_text (buf, "", 0);
+
+       /* if msg is NULL, do nothing else */
        if (!msg) {
-               gtk_text_buffer_set_text (buf, NULL, 0);
                return;
        }