* (modest_ui_actions_on_cut, modest_ui_actions_on_copy):
now we store the clipboard on copy operation for gtkhtml. We
add storing for all the text clipboard operations
(fixes NB#64206).
pmo-trunk-r2830
ModestWindow *window)
{
GtkWidget *focused_widget;
ModestWindow *window)
{
GtkWidget *focused_widget;
+ GtkClipboard *clipboard;
+ clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
focused_widget = gtk_window_get_focus (GTK_WINDOW (window));
if (GTK_IS_EDITABLE (focused_widget)) {
gtk_editable_cut_clipboard (GTK_EDITABLE(focused_widget));
focused_widget = gtk_window_get_focus (GTK_WINDOW (window));
if (GTK_IS_EDITABLE (focused_widget)) {
gtk_editable_cut_clipboard (GTK_EDITABLE(focused_widget));
+ gtk_clipboard_set_can_store (clipboard, NULL, 0);
+ gtk_clipboard_store (clipboard);
} else if (GTK_IS_TEXT_VIEW (focused_widget)) {
GtkTextBuffer *buffer;
} else if (GTK_IS_TEXT_VIEW (focused_widget)) {
GtkTextBuffer *buffer;
- GtkClipboard *clipboard;
- 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);
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);
+ gtk_clipboard_store (clipboard);
} 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)) {
} 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)) {
if (GTK_IS_LABEL (focused_widget)) {
gtk_clipboard_set_text (clipboard, gtk_label_get_text (GTK_LABEL (focused_widget)), -1);
if (GTK_IS_LABEL (focused_widget)) {
gtk_clipboard_set_text (clipboard, gtk_label_get_text (GTK_LABEL (focused_widget)), -1);
+ gtk_clipboard_set_can_store (clipboard, NULL, 0);
+ gtk_clipboard_store (clipboard);
} else if (GTK_IS_EDITABLE (focused_widget)) {
gtk_editable_copy_clipboard (GTK_EDITABLE(focused_widget));
} else if (GTK_IS_EDITABLE (focused_widget)) {
gtk_editable_copy_clipboard (GTK_EDITABLE(focused_widget));
+ gtk_clipboard_set_can_store (clipboard, NULL, 0);
+ gtk_clipboard_store (clipboard);
} else if (GTK_IS_HTML (focused_widget)) {
gtk_html_copy (GTK_HTML (focused_widget));
} else if (GTK_IS_HTML (focused_widget)) {
gtk_html_copy (GTK_HTML (focused_widget));
+ gtk_clipboard_set_can_store (clipboard, NULL, 0);
+ gtk_clipboard_store (clipboard);
} else if (GTK_IS_TEXT_VIEW (focused_widget)) {
GtkTextBuffer *buffer;
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (focused_widget));
gtk_text_buffer_copy_clipboard (buffer, clipboard);
gtk_clipboard_set_can_store (clipboard, NULL, 0);
} else if (GTK_IS_TEXT_VIEW (focused_widget)) {
GtkTextBuffer *buffer;
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (focused_widget));
gtk_text_buffer_copy_clipboard (buffer, clipboard);
gtk_clipboard_set_can_store (clipboard, NULL, 0);
+ gtk_clipboard_store (clipboard);
} 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);
} 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);