diff options
author | Chenthill Palanisamy <pchenthill@novell.com> | 2005-03-01 00:58:38 +0800 |
---|---|---|
committer | Chenthill Palanisamy <pchen@src.gnome.org> | 2005-03-01 00:58:38 +0800 |
commit | f3c12c30862ffd0cc946031d8cf9fdf98fc18fcb (patch) | |
tree | 0fc74660d260ab7afcf4b6676b38788fc742c422 /calendar | |
parent | c4c3e741f3525e3a50ea5f00a99184f89ee96ebb (diff) | |
download | gsoc2013-evolution-f3c12c30862ffd0cc946031d8cf9fdf98fc18fcb.tar gsoc2013-evolution-f3c12c30862ffd0cc946031d8cf9fdf98fc18fcb.tar.gz gsoc2013-evolution-f3c12c30862ffd0cc946031d8cf9fdf98fc18fcb.tar.bz2 gsoc2013-evolution-f3c12c30862ffd0cc946031d8cf9fdf98fc18fcb.tar.lz gsoc2013-evolution-f3c12c30862ffd0cc946031d8cf9fdf98fc18fcb.tar.xz gsoc2013-evolution-f3c12c30862ffd0cc946031d8cf9fdf98fc18fcb.tar.zst gsoc2013-evolution-f3c12c30862ffd0cc946031d8cf9fdf98fc18fcb.zip |
Connect the signal to "event", and open the attachment only if its a
2005-02-28 Chenthill Palanisamy <pchenthill@novell.com>
* gui/dialogs/comp-editor.c: (attachment_bar_icon_clicked_cb),
(setup_widgets): Connect the signal to "event", and open the attachment
only if its a double click from the cal attachment bar.
svn path=/trunk/; revision=28916
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 6 | ||||
-rw-r--r-- | calendar/gui/dialogs/comp-editor.c | 34 |
2 files changed, 25 insertions, 15 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 5b270d4f84..eed4bafaac 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,5 +1,11 @@ 2005-02-28 Chenthill Palanisamy <pchenthill@novell.com> + * gui/dialogs/comp-editor.c: (attachment_bar_icon_clicked_cb), + (setup_widgets): Connect the signal to "event", and open the attachment + only if its a double click from the cal attachment bar. + +2005-02-28 Chenthill Palanisamy <pchenthill@novell.com> + Fixes #72958 * gui/dialogs/comp-editor.c: (save_comp): If the backend returns success, if the delay delivery is set, do not diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index cb17c26300..638a000f2a 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -860,8 +860,8 @@ attachment_bar_changed_cb (CalAttachmentBar *bar, } -static void -attachment_bar_icon_clicked_cb (CalAttachmentBar *bar, void *data) +static gboolean +attachment_bar_icon_clicked_cb (CalAttachmentBar *bar, GdkEvent *event, void *data) { GnomeIconList *icon_list; GList *p; @@ -869,18 +869,22 @@ attachment_bar_icon_clicked_cb (CalAttachmentBar *bar, void *data) char *attach_file_url; GError *error = NULL; - icon_list = GNOME_ICON_LIST (bar); - p = gnome_icon_list_get_selection (icon_list); - if (p) { - num = GPOINTER_TO_INT (p->data); - attach_file_url = cal_attachment_bar_get_nth_attachment_filename (bar, num); - /* launch the url now */ - /* TODO should send GError and handle error conditions - * here */ - gnome_url_show (attach_file_url, &error); - if (error) - g_message ("DEBUG: Launch failed :(\n"); - g_free (attach_file_url); } + if (E_IS_CAL_ATTACHMENT_BAR (bar) && event->type == GDK_2BUTTON_PRESS) { + icon_list = GNOME_ICON_LIST (bar); + p = gnome_icon_list_get_selection (icon_list); + if (p) { + num = GPOINTER_TO_INT (p->data); + attach_file_url = cal_attachment_bar_get_nth_attachment_filename (bar, num); + /* launch the url now */ + /* TODO should send GError and handle error conditions + * here */ + gnome_url_show (attach_file_url, &error); + if (error) + g_message ("DEBUG: Launch failed :(\n"); + g_free (attach_file_url); } + return TRUE; + } else + return FALSE; } static void @@ -945,7 +949,7 @@ setup_widgets (CompEditor *editor) gtk_widget_show (priv->attachment_bar); g_signal_connect (priv->attachment_bar, "changed", G_CALLBACK (attachment_bar_changed_cb), editor); - g_signal_connect (GNOME_ICON_LIST (priv->attachment_bar), "button-release-event", + g_signal_connect (GNOME_ICON_LIST (priv->attachment_bar), "event", G_CALLBACK (attachment_bar_icon_clicked_cb), NULL); priv->attachment_expander_label = gtk_label_new_with_mnemonic (_("Show _Attachment Bar (drop attachments here)")); |