priv->text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->msg_body));
g_object_set (priv->text_buffer, "font_scale", 1.0, NULL);
wp_text_buffer_enable_rich_text (WP_TEXT_BUFFER (priv->text_buffer), TRUE);
-/* gtk_text_buffer_set_can_paste_rich_text (priv->text_buffer, TRUE); */
+ gtk_text_buffer_register_serialize_tagset(GTK_TEXT_BUFFER(priv->text_buffer), "wp-text-buffer");
+ gtk_text_buffer_register_deserialize_tagset(GTK_TEXT_BUFFER(priv->text_buffer), "wp-text-buffer");
+
wp_text_buffer_reset_buffer (WP_TEXT_BUFFER (priv->text_buffer), TRUE);
priv->find_toolbar = hildon_find_toolbar_new (NULL);
update_window_title (self);
-/* gtk_text_buffer_set_can_paste_rich_text (priv->text_buffer, TRUE); */
wp_text_buffer_reset_buffer (WP_TEXT_BUFFER (priv->text_buffer), TRUE);
body = modest_tny_msg_get_body (msg, TRUE);
ModestWindowPrivate *parent_priv;
ModestMsgEditWindowPrivate *priv;
GtkAction *action;
- gchar *selection;
+ gboolean has_selection;
GtkWidget *focused;
GList *selected_attachments = NULL;
gint n_att_selected = 0;
priv = MODEST_MSG_EDIT_WINDOW_GET_PRIVATE (window);
parent_priv = MODEST_WINDOW_GET_PRIVATE (window);
- selection = gtk_clipboard_wait_for_text (clipboard);
+ has_selection = gtk_clipboard_wait_for_targets (clipboard, NULL, NULL);
focused = gtk_window_get_focus (GTK_WINDOW (window));
action = gtk_ui_manager_get_action (parent_priv->ui_manager, "/MenuBar/EditMenu/CutMenu");
- gtk_action_set_sensitive (action, (selection != NULL) && (!MODEST_IS_ATTACHMENTS_VIEW (focused)));
+ gtk_action_set_sensitive (action, (has_selection) && (!MODEST_IS_ATTACHMENTS_VIEW (focused)));
action = gtk_ui_manager_get_action (parent_priv->ui_manager, "/MenuBar/EditMenu/CopyMenu");
- gtk_action_set_sensitive (action, (selection != NULL) && (!MODEST_IS_ATTACHMENTS_VIEW (focused)));
+ gtk_action_set_sensitive (action, (has_selection) && (!MODEST_IS_ATTACHMENTS_VIEW (focused)));
selected_attachments = modest_attachments_view_get_selection (MODEST_ATTACHMENTS_VIEW (priv->attachments_view));
n_att_selected = g_list_length (selected_attachments);
action = gtk_ui_manager_get_action (parent_priv->ui_manager, "/MenuBar/AttachmentsMenu/RemoveAttachmentsMenu");
gtk_action_set_sensitive (action, n_att_selected == 1);
-
update_paste_dimming (window);
}
clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (focused_widget));
gtk_text_buffer_cut_clipboard (buffer, clipboard, TRUE);
+ gtk_clipboard_set_can_store (clipboard, NULL, 0);
} else if (MODEST_IS_HEADER_VIEW (focused_widget)) {
modest_header_view_cut_selection (MODEST_HEADER_VIEW (focused_widget));
} else if (MODEST_IS_FOLDER_VIEW (focused_widget)) {
GtkTextBuffer *buffer;
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (focused_widget));
gtk_text_buffer_copy_clipboard (buffer, clipboard);
- modest_header_view_copy_selection (MODEST_HEADER_VIEW (focused_widget));
+ gtk_clipboard_set_can_store (clipboard, NULL, 0);
} else if (MODEST_IS_HEADER_VIEW (focused_widget)) {
TnyList *header_list = modest_header_view_get_selected_headers (MODEST_HEADER_VIEW (focused_widget));
TnyIterator *iter = tny_list_create_iterator (header_list);