Re: [evolution-patches] Calendar E-Plugin hook hack
- From: Praveen Kumar <kpraveen novell com>
- To: evolution-patches lists ximian com
- Cc: evolution-patches lists ximian com
- Subject: Re: [evolution-patches] Calendar E-Plugin hook hack
- Date: Thu, 23 Jun 2005 14:40:08 +0530
On Thu, 2005-06-23 at 12:53 +0530, Praveen Kumar wrote:
> The target that was provided by the Calendar Configuration E-Plugin hook
> didn't carry enough information for the plugin to distinguish between
> "Calendar" and "Tasks" components. Exchange connector needs it for
> populating the different hierarchies in the "New Calendar"/"New Tasks"
> dialog as a part of supporting calendar and tasks hierarchies. So, there
> was a hack needed to pass this and other needed information to the
> plugin. I am attaching the patch. Please review it.
>
> PS: 'diff' ran from 'evolution/calendar' directory.
Reattaching the patch got with '-up' option to the 'diff'. Sorry for the
inconvenience.
Thanks -
Praveen.
Index: 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
--- gui/dialogs/calendar-setup.c 24 May 2005 12:36:05 -0000 1.36
+++ gui/dialogs/calendar-setup.c 23 Jun 2005 09:05:55 -0000
@@ -36,28 +36,6 @@
#include "calendar-setup.h"
#include "../e-cal-config.h"
-typedef struct _CalendarSourceDialog CalendarSourceDialog;
-
-struct _CalendarSourceDialog {
- ECalConfig *config; /* the config manager */
-
- GtkWidget *window;
-
- /* Source selection (creation only) */
- ESourceList *source_list;
- GSList *menu_source_groups;
- GtkWidget *group_optionmenu;
-
- /* ESource we're currently editing */
- ESource *source;
- /* The original source in edit mode. Also used to flag when we are in edit mode. */
- ESource *original_source;
-
- /* Source group we're creating/editing a source in */
- ESourceGroup *source_group;
- ECalSourceType *source_type;
-};
-
static gboolean
eccp_check_complete (EConfig *ec, const char *pageid, void *data)
{
@@ -444,6 +422,9 @@ calendar_setup_edit_calendar (struct _Gt
target = e_cal_config_target_new_source (ec, sdialog->source);
e_config_set_target ((EConfig *) ec, (EConfigTarget *) target);
+ /* Workaround: Pass extra data for plugin */
+ target->target.widget = (GtkWidget*) sdialog;
+
if (source)
sdialog->window = e_config_create_window ((EConfig *)ec, NULL, _("Calendar Properties"));
else
@@ -511,6 +492,9 @@ calendar_setup_edit_task_list (struct _G
target = e_cal_config_target_new_source (ec, sdialog->source);
e_config_set_target ((EConfig *) ec, (EConfigTarget *) target);
+
+ /* Workaround: Pass extra data for plugin */
+ target->target.widget = (GtkWidget*) sdialog;
sdialog->window = e_config_create_window ((EConfig *)ec, NULL, _("Task List Properties"));
Index: gui/dialogs/calendar-setup.h
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/calendar-setup.h,v
retrieving revision 1.3
diff -u -p -r1.3 calendar-setup.h
--- gui/dialogs/calendar-setup.h 25 Nov 2004 14:51:18 -0000 1.3
+++ gui/dialogs/calendar-setup.h 23 Jun 2005 09:05:55 -0000
@@ -22,8 +22,36 @@
#ifndef __CALENDAR_SETUP_H__
#define __CALENDAR_SETUP_H__
+#include <gtk/gtk.h>
+#include <libecal/e-cal.h>
+
struct _GtkWindow;
struct _ESource;
+struct _ESourceGroup;
+struct _ESourceList;
+struct _ECalSourceType;
+
+typedef struct _CalendarSourceDialog CalendarSourceDialog;
+
+struct _CalendarSourceDialog {
+ struct _ECalConfig *config; /* the config manager */
+
+ GtkWidget *window;
+
+ /* Source selection (creation only) */
+ struct _ESourceList *source_list;
+ GSList *menu_source_groups;
+ GtkWidget *group_optionmenu;
+
+ /* ESource we're currently editing */
+ struct _ESource *source;
+ /* The original source in edit mode. Also used to flag when we are in edit mode. */
+ struct _ESource *original_source;
+
+ /* Source group we're creating/editing a source in */
+ struct _ESourceGroup *source_group;
+ ECalSourceType *source_type;
+};
#ifdef __cplusplus
extern "C" {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]