# HG changeset patch # User Sean Egan # Date 1193338305 0 # Node ID c41fcc6973060f9e6bd89bfecadcd27324029c02 # Parent ed4c4eecad90bbb8b13055488cd148b988eb8877# Parent d55617a15301156068f4c776dbe6f89411b081e9 merge of '80428952b570d014e6a4014048edcf0bde18eebb' and 'c7c88ffd833bca4ab16f164907b32ea5dff2ae6a' diff -r d55617a15301 -r c41fcc697306 pidgin/gtkconv.c --- a/pidgin/gtkconv.c Thu Oct 25 18:51:39 2007 +0000 +++ b/pidgin/gtkconv.c Thu Oct 25 18:51:45 2007 +0000 @@ -6577,13 +6577,13 @@ style = "color=\"#c4a000\""; } else if (gtkconv->unseen_state == PIDGIN_UNSEEN_NICK) { atk_object_set_description(accessibility_obj, _("Nick Said")); - style = "color=\"#cc0000\""; + style = "color=\"#204a87\""; } else if (gtkconv->unseen_state == PIDGIN_UNSEEN_TEXT) { atk_object_set_description(accessibility_obj, _("Unread Messages")); if (gtkconv->active_conv->type == PURPLE_CONV_TYPE_CHAT) - style = "color=\"#204a87\""; + style = "color=\"#cc0000\""; else - style = "color=\"#cc0000\""; + style = "color=\"#204a87\""; } else if (gtkconv->unseen_state == PIDGIN_UNSEEN_EVENT) { atk_object_set_description(accessibility_obj, _("New Event")); style = "color=\"#888a85\""; diff -r d55617a15301 -r c41fcc697306 pidgin/gtkimhtml.c --- a/pidgin/gtkimhtml.c Thu Oct 25 18:51:39 2007 +0000 +++ b/pidgin/gtkimhtml.c Thu Oct 25 18:51:45 2007 +0000 @@ -138,7 +138,7 @@ static char *html_clipboard = NULL; static char *text_clipboard = NULL; -GtkClipboard *clipboard_selection = NULL; +static GtkClipboard *clipboard_selection = NULL; static GtkTargetEntry selection_targets[] = { #ifndef _WIN32 @@ -898,10 +898,9 @@ char *text = NULL; gboolean primary = (clipboard != clipboard_selection); GtkTextIter start, end; - GtkTextMark *sel = NULL; - GtkTextMark *ins = NULL; - - if (primary) { + + if (primary) { + GtkTextMark *sel = NULL, *ins = NULL; ins = gtk_text_buffer_get_insert(imhtml->text_buffer); sel = gtk_text_buffer_get_selection_bound(imhtml->text_buffer); gtk_text_buffer_get_iter_at_mark(imhtml->text_buffer, &start, sel); @@ -969,20 +968,16 @@ if (gtk_text_buffer_get_selection_bounds(imhtml->text_buffer, &start, &end)) { if (!clipboard_selection) clipboard_selection = gtk_widget_get_clipboard(GTK_WIDGET(imhtml), GDK_SELECTION_CLIPBOARD); - gtk_clipboard_set_with_owner(clipboard_selection, + gtk_clipboard_set_with_data(clipboard_selection, selection_targets, sizeof(selection_targets) / sizeof(GtkTargetEntry), (GtkClipboardGetFunc)gtk_imhtml_clipboard_get, - (GtkClipboardClearFunc)gtk_imhtml_clipboard_clear, G_OBJECT(imhtml)); + (GtkClipboardClearFunc)gtk_imhtml_clipboard_clear, NULL); g_free(html_clipboard); g_free(text_clipboard); - imhtml->clipboard_html_string = gtk_imhtml_get_markup_range(imhtml, &start, &end); - imhtml->clipboard_text_string = gtk_imhtml_get_text(imhtml, &start, &end); - - text_clipboard = imhtml->clipboard_text_string; - html_clipboard = imhtml->clipboard_html_string; - + html_clipboard = gtk_imhtml_get_markup_range(imhtml, &start, &end); + text_clipboard = gtk_imhtml_get_text(imhtml, &start, &end); } g_signal_stop_emission_by_name(imhtml, "copy-clipboard"); @@ -994,19 +989,16 @@ if (gtk_text_buffer_get_selection_bounds(imhtml->text_buffer, &start, &end)) { if (!clipboard_selection) clipboard_selection = gtk_widget_get_clipboard(GTK_WIDGET(imhtml), GDK_SELECTION_CLIPBOARD); - gtk_clipboard_set_with_owner(clipboard_selection, + gtk_clipboard_set_with_data(clipboard_selection, selection_targets, sizeof(selection_targets) / sizeof(GtkTargetEntry), (GtkClipboardGetFunc)gtk_imhtml_clipboard_get, - (GtkClipboardClearFunc)gtk_imhtml_clipboard_clear, G_OBJECT(imhtml)); + (GtkClipboardClearFunc)gtk_imhtml_clipboard_clear, NULL); g_free(html_clipboard); g_free(text_clipboard); - imhtml->clipboard_html_string = gtk_imhtml_get_markup_range(imhtml, &start, &end); - imhtml->clipboard_text_string = gtk_imhtml_get_text(imhtml, &start, &end); - - text_clipboard = imhtml->clipboard_text_string; - html_clipboard = imhtml->clipboard_html_string; + html_clipboard = gtk_imhtml_get_markup_range(imhtml, &start, &end); + text_clipboard = gtk_imhtml_get_text(imhtml, &start, &end); if (imhtml->editable) gtk_text_buffer_delete_selection(imhtml->text_buffer, FALSE, FALSE); @@ -1269,11 +1261,6 @@ g_free(imhtml->search_string); g_object_unref(imhtml->undo_manager); G_OBJECT_CLASS(parent_class)->finalize (object); - if (clipboard_selection) - gtk_clipboard_set_with_owner(clipboard_selection, - selection_targets, sizeof(selection_targets) / sizeof(GtkTargetEntry), - (GtkClipboardGetFunc)gtk_imhtml_clipboard_get, - (GtkClipboardClearFunc)NULL, G_OBJECT(imhtml)); } @@ -1464,9 +1451,6 @@ gtk_widget_add_events(GTK_WIDGET(imhtml), GDK_LEAVE_NOTIFY_MASK | GDK_ENTER_NOTIFY_MASK); - imhtml->clipboard_text_string = NULL; - imhtml->clipboard_html_string = NULL; - imhtml->tip = NULL; imhtml->tip_timer = 0; imhtml->tip_window = NULL; diff -r d55617a15301 -r c41fcc697306 pidgin/gtkimhtml.h --- a/pidgin/gtkimhtml.h Thu Oct 25 18:51:39 2007 +0000 +++ b/pidgin/gtkimhtml.h Thu Oct 25 18:51:45 2007 +0000 @@ -128,6 +128,7 @@ GtkTextTag *link; } edit; + /* These are not used anymore and should be removed when possible */ char *clipboard_text_string; char *clipboard_html_string;