Re: [evolution-patches] fix for busted dnd
- From: Not Zed <notzed ximian com>
- To: evolution-patches ximian com
- Subject: Re: [evolution-patches] fix for busted dnd
- Date: 05 Aug 2003 17:26:24 -0400
committed to both branches, again approved offline by jeff
On Tue, 2003-08-05 at 13:52, Not Zed wrote:
> this slightly reverts/changes a recent sun patch which broke dnd of
> attachments from the mail display.
>
>
> ______________________________________________________________________
> Index: mail/ChangeLog
> ===================================================================
> RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
> retrieving revision 1.2761.2.10
> diff -u -3 -r1.2761.2.10 ChangeLog
> --- mail/ChangeLog 1 Aug 2003 18:39:00 -0000 1.2761.2.10
> +++ mail/ChangeLog 5 Aug 2003 17:50:30 -0000
> @@ -1,3 +1,18 @@
> +2003-08-05 Not Zed <NotZed Ximian com>
> +
> + ** See bug #47224. Hook onto clicked rather than button_pressed,
> + so that dnd works.
> +
> + * mail-display.c (inline_toggle): toggle a part inline.
> + (button_press): change back to only handle button clicked events,
> + renamed to inline_button_clicked.
> + (do_attachment_header): hook onto clicked rather than
> + button_press_event, and move key_press_event to
> + inline_button_pressed.
> + (do_signature): Same.
> + (inline_button_pressed): handle inline button key press event
> + explicitly.
> +
> 2003-07-29 Not Zed <NotZed Ximian com>
>
> * mail-folder-cache.c (mail_note_store): add a CamelOperation for
> Index: mail/mail-display.c
> ===================================================================
> RCS file: /cvs/gnome/evolution/mail/mail-display.c,v
> retrieving revision 1.282.4.3
> diff -u -3 -r1.282.4.3 mail-display.c
> --- mail/mail-display.c 30 Jul 2003 12:58:43 -0000 1.282.4.3
> +++ mail/mail-display.c 5 Aug 2003 17:50:35 -0000
> @@ -434,24 +434,28 @@
> mail_display_queue_redisplay (md);
> }
>
> -static gboolean
> -button_press (GtkWidget *widget, GdkEvent *event, CamelMimePart *part)
> +static void
> +inline_toggle(MailDisplay *md, CamelMimePart *part)
> {
> - MailDisplay *md;
> -
> - if (event->type == GDK_BUTTON_PRESS)
> - g_signal_stop_emission_by_name (widget, "button_press_event");
> - else if (event->type == GDK_KEY_PRESS && event->key.keyval != GDK_Return)
> - return FALSE;
> + g_return_if_fail(md != NULL);
>
> - md = g_object_get_data ((GObject *) widget, "MailDisplay");
> - if (md == NULL) {
> - g_warning ("No MailDisplay on button!");
> - return TRUE;
> - }
> -
> mail_part_toggle_displayed (part, md);
> mail_display_queue_redisplay (md);
> +}
> +
> +static void
> +inline_button_clicked(GtkWidget *widget, CamelMimePart *part)
> +{
> + inline_toggle((MailDisplay *)g_object_get_data((GObject *)widget, "MailDisplay"), part);
> +}
> +
> +static gboolean
> +inline_button_press(GtkWidget *widget, GdkEventKey *event, CamelMimePart *part)
> +{
> + if (event->keyval != GDK_Return)
> + return FALSE;
> +
> + inline_toggle((MailDisplay *)g_object_get_data((GObject *)widget, "MailDisplay"), part);
>
> return TRUE;
> }
> @@ -1018,8 +1022,8 @@
>
> handler = mail_lookup_handler (eb->type);
> if (handler && handler->builtin) {
> - g_signal_connect (button, "button_press_event", G_CALLBACK (button_press), part);
> - g_signal_connect (button, "key_press_event", G_CALLBACK (button_press), part);
> + g_signal_connect (button, "clicked", G_CALLBACK (inline_button_clicked), part);
> + g_signal_connect (button, "key_press_event", G_CALLBACK (inline_button_press), part);
> } else {
> gtk_widget_set_sensitive (button, FALSE);
> GTK_WIDGET_UNSET_FLAGS (button, GTK_CAN_FOCUS);
> @@ -1156,8 +1160,8 @@
>
> button = gtk_button_new ();
> g_object_set_data ((GObject *) button, "MailDisplay", md);
> - g_signal_connect (button, "button_press_event", G_CALLBACK (button_press), part);
> - g_signal_connect (button, "key_press_event", G_CALLBACK (button_press), part);
> + g_signal_connect (button, "clicked", G_CALLBACK (inline_button_clicked), part);
> + g_signal_connect (button, "key_press_event", G_CALLBACK (inline_button_press), part);
>
> gtk_container_add (GTK_CONTAINER (button), pbl->pixmap);
> gtk_widget_show_all (button);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]