[evolution-patches] calendar properties window plugin hooks



Here is my first attempt at adding config hooks for the calendar
properties window.

Note that at this time, field verification isn't enabled, since I wasn't
sure what people wanted for it.

It requires a plugin to be installed for webcal properties to function
correctly - i've added a plugins/ directory to the evolution root (as
per some discussion on irc a week or so back). This will probably mean
changing EPlugin to load plugins from both the system directory and the
user EVOLUTION_PLUGIN_PATH, rather than just one or the other.

-David

Attachment: newfiles.tar.gz
Description: application/compressed-tar

? calendar-config-hooks.tar.gz
? plugin.mk
? plugins
? calendar/gui/apps_evolution_calendar-2.2.schemas
? calendar/gui/e-cal-config.c
? calendar/gui/e-cal-config.h
? calendar/gui/dialogs/cal-properties.c
? calendar/gui/dialogs/cal-properties.h
? help/C/evolution-2.2-C.omf
? help/C/evolution-2.2.xml
? mail/evolution-mail-2.2.schemas
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/ChangeLog,v
retrieving revision 1.1375
diff -u -r1.1375 ChangeLog
--- ChangeLog	1 Oct 2004 19:39:05 -0000	1.1375
+++ ChangeLog	14 Oct 2004 08:30:04 -0000
@@ -1,3 +1,7 @@
+2004-10-14  David Trowbridge  <trowbrds cs colorado edu>
+
+	* configure.in: added new "plugins" directory
+
 2004-10-01  Jeffrey Stedfast  <fejj novell com>
 
 	* configure.in (localedir): Enable imap4 plugin by default. We
Index: Makefile.am
===================================================================
RCS file: /cvs/gnome/evolution/Makefile.am,v
retrieving revision 1.96
diff -u -r1.96 Makefile.am
--- Makefile.am	12 Feb 2004 20:16:13 -0000	1.96
+++ Makefile.am	14 Oct 2004 08:30:04 -0000
@@ -48,7 +48,8 @@
 	views			\
 	tools			\
 	help			\
-	po
+	po			\
+	plugins
 
 
 # CDE Stuff
Index: configure.in
===================================================================
RCS file: /cvs/gnome/evolution/configure.in,v
retrieving revision 1.722
diff -u -r1.722 configure.in
--- configure.in	1 Oct 2004 19:39:05 -0000	1.722
+++ configure.in	14 Oct 2004 08:30:05 -0000
@@ -1277,6 +1277,9 @@
 plugindir="$privlibdir/plugins"
 AC_SUBST(plugindir)
 
+EVO_PLUGIN_RULE=$srcdir/plugin.mk
+AC_SUBST_FILE(EVO_PLUGIN_RULE)
+
 idldir="$datadir/idl/evolution-$BASE_VERSION"
 AC_SUBST(idldir)
 
@@ -1514,6 +1517,8 @@
 smime/lib/Makefile
 smime/gui/Makefile
 tools/Makefile
+plugins/Makefile
+plugins/com-novell-calendar-http/Makefile
 evolution-shell.pc
 camel.pc
 ])
Index: calendar/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2535
diff -u -r1.2535 ChangeLog
--- calendar/ChangeLog	13 Oct 2004 04:58:51 -0000	1.2535
+++ calendar/ChangeLog	14 Oct 2004 08:30:18 -0000
@@ -1,3 +1,11 @@
+2004-10-14  David Trowbridge  <trowbrds cs colorado edu>
+
+	* gui/e-cal-config.c: added EConfig subclass for calendars
+	* gui/calendar-component.c: initialize plugin hooks on
+	  component startup.
+	* gui/dialogs/cal-properties.c: added EConfig-based dialog
+	  for the calendar properties window.
+
 2004-10-12  Li Yuan  <li yuan sun com>
 
 	* gui/e-day-view.c: (e_day_view_on_main_canvas_button_press):
Index: calendar/gui/Makefile.am
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/Makefile.am,v
retrieving revision 1.298
diff -u -r1.298 Makefile.am
--- calendar/gui/Makefile.am	6 Oct 2004 03:22:38 -0000	1.298
+++ calendar/gui/Makefile.am	14 Oct 2004 08:30:19 -0000
@@ -59,6 +59,11 @@
 
 component_LTLIBRARIES = libevolution-calendar.la
 
+ecalendarincludedir = $(privincludedir)/calendar/gui
+
+ecalendarinclude_HEADERS =	\
+	e-cal-config.h
+
 INCLUDES =						\
 	-DG_LOG_DOMAIN=\"calendar-gui\"			\
 	-I$(top_builddir)/shell				\
@@ -115,6 +120,8 @@
 	e-alarm-list.h				\
 	e-cal-component-preview.c		\
 	e-cal-component-preview.h		\
+	e-cal-config.c				\
+	e-cal-config.h				\
 	e-cal-model-calendar.h			\
 	e-cal-model-calendar.c			\
 	e-cal-model-calendar.h			\
Index: calendar/gui/calendar-component.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/calendar-component.c,v
retrieving revision 1.185
diff -u -r1.185 calendar-component.c
--- calendar/gui/calendar-component.c	7 Oct 2004 01:42:50 -0000	1.185
+++ calendar/gui/calendar-component.c	14 Oct 2004 08:30:21 -0000
@@ -46,6 +46,7 @@
 #include "comp-util.h"
 #include "common/authentication.h"
 #include "dialogs/calendar-setup.h"
+#include "dialogs/cal-properties.h"
 #include "dialogs/comp-editor.h"
 #include "dialogs/copy-source-dialog.h"
 #include "dialogs/event-editor.h"
@@ -54,6 +55,7 @@
 #include "widgets/misc/e-error.h"
 #include "e-util/e-icon-factory.h"
 #include "e-cal-popup.h"
+#include "e-cal-config.h"
 
 /* IDs for user creatable items */
 #define CREATE_EVENT_ID        "event"
@@ -375,7 +377,7 @@
 	if (!selected_source)
 		return;
 
-	calendar_setup_edit_calendar (GTK_WINDOW (gtk_widget_get_toplevel(ep->target->widget)), selected_source);
+	ec_calendar_properties_show (GTK_WINDOW (gtk_widget_get_toplevel (ep->target->widget)), selected_source);
 }
 
 static EPopupItem ecc_source_popups[] = {
@@ -1182,6 +1184,17 @@
 }
 
 static void
+cc_startup (CalendarComponent *cc)
+{
+	static int started = 0;
+	if (started)
+		return;
+	started = 1;
+
+	e_plugin_hook_register_type (ec_config_hook_get_type ());
+}
+
+static void
 impl_createControls (PortableServer_Servant servant,
 		     Bonobo_Control *corba_sidebar_control,
 		     Bonobo_Control *corba_view_control,
@@ -1191,7 +1204,9 @@
 	CalendarComponent *calendar_component = CALENDAR_COMPONENT (bonobo_object_from_servant (servant));
 	CalendarComponentPrivate *priv;
 	CalendarComponentView *component_view;
-	
+
+	cc_startup (calendar_component);
+
 	priv = calendar_component->priv;
 
 	/* Create the calendar component view */
Index: calendar/gui/dialogs/Makefile.am
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/Makefile.am,v
retrieving revision 1.64
diff -u -r1.64 Makefile.am
--- calendar/gui/dialogs/Makefile.am	24 Jun 2004 21:02:09 -0000	1.64
+++ calendar/gui/dialogs/Makefile.am	14 Oct 2004 08:30:24 -0000
@@ -38,6 +38,8 @@
 	alarm-list-dialog.h	\
 	cal-prefs-dialog.c	\
 	cal-prefs-dialog.h	\
+	cal-properties.c	\
+	cal-properties.h	\
 	calendar-setup.c	\
 	calendar-setup.h	\
 	cancel-comp.c		\


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