Re: [evolution-patches] Calendar E-Plugin hook hack



On Fri, 2005-06-24 at 17:05 +0800, Not Zed wrote:

> Eep.  I thought the sourcedialog was already a public object ... and it
> was actually a widget.  You really must pass a widget in the widget
> pointer, you can't just cast any arbitrary object to a widget here ...
> 
> I guess .. why not just add the sourcetype to the target?  Targets are
> not yet set in stone ... I hope you didn't ask me about this on irc and
> I told you not to - i hate irc for that reason, i'm usually doing
> something else and am not thinking straight.  Sigh. :-/

Hello -

I have modified the patch and attached it herein. Please review and let
me know your comments.

Thanks -
Praveen.

Index: calendar/gui/e-cal-config.h
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-cal-config.h,v
retrieving revision 1.1
diff -u -p -r1.1 e-cal-config.h
--- calendar/gui/e-cal-config.h	4 Nov 2004 04:36:49 -0000	1.1
+++ calendar/gui/e-cal-config.h	27 Jun 2005 13:10:07 -0000
@@ -24,6 +24,7 @@
 
 #include <glib-object.h>
 
+#include <libecal/e-cal.h>
 #include "e-util/e-config.h"
 
 #ifdef __cplusplus
@@ -52,6 +53,7 @@ struct _ECalConfigTargetSource {
 	EConfigTarget target;
 
 	struct _ESource *source;
+        ECalSourceType *source_type;
 };
 
 typedef struct _EConfigItem ECalConfigItem;
Index: calendar/gui/dialogs/calendar-setup.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/calendar-setup.c,v
retrieving revision 1.36
diff -u -p -r1.36 calendar-setup.c
--- calendar/gui/dialogs/calendar-setup.c	24 May 2005 12:36:05 -0000	1.36
+++ calendar/gui/dialogs/calendar-setup.c	27 Jun 2005 13:10:10 -0000
@@ -442,6 +442,7 @@ calendar_setup_edit_calendar (struct _Gt
 	e_config_add_page_check ((EConfig *) ec, NULL, eccp_check_complete, sdialog);
 
 	target = e_cal_config_target_new_source (ec, sdialog->source);
+	target->source_type = E_CAL_SOURCE_TYPE_EVENT;
 	e_config_set_target ((EConfig *) ec, (EConfigTarget *) target);
 
 	if (source)
@@ -510,6 +511,7 @@ calendar_setup_edit_task_list (struct _G
 	e_config_add_page_check ((EConfig *) ec, NULL, eccp_check_complete, sdialog);
 
 	target = e_cal_config_target_new_source (ec, sdialog->source);
+	target->source_type = E_CAL_SOURCE_TYPE_TODO;
 	e_config_set_target ((EConfig *) ec, (EConfigTarget *) target);
 
 	sdialog->window = e_config_create_window ((EConfig *)ec, NULL, _("Task List Properties"));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]