[evolution-patches] patch to open the calendar attachments with double click [calendar]
- From: chenthill <pchenthill novell com>
- To: patches <evolution-patches lists ximian com>
- Subject: [evolution-patches] patch to open the calendar attachments with double click [calendar]
- Date: Mon, 28 Feb 2005 08:29:27 -0800
Hi,
Have attached the patch with the mail.
thanks, chenthill.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2676
diff -u -p -r1.2676 ChangeLog
--- ChangeLog 28 Feb 2005 15:14:41 -0000 1.2676
+++ ChangeLog 28 Feb 2005 16:27:15 -0000
@@ -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
Index: gui/dialogs/comp-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/comp-editor.c,v
retrieving revision 1.123
diff -u -p -r1.123 comp-editor.c
--- gui/dialogs/comp-editor.c 28 Feb 2005 15:14:42 -0000 1.123
+++ gui/dialogs/comp-editor.c 28 Feb 2005 16:27:16 -0000
@@ -860,8 +860,8 @@ attachment_bar_changed_cb (CalAttachment
}
-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 (CalAttac
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)"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]