Re: [evolution-patches] calendar properties window plugin hooks




Looking good.

- dont set the table spacing.  yes the spacing is a bit wrong but that applies everywhere, it just needs to be fixed in e-config.c rather than worked-around in every component.
- it may make sense to add a titled section to wrap things in, it just looks more consistent with the other components.
- be nice if you didn't need the 'real' as well as the 'source' in the target, then again maybe thats better for plugins anyway and i need to do that elsewhere.  so leave that for now.
- see the addressbook stuff for how to convert this to a 'dynamic' ui which can also be used for creating calendars.  you could basically just copy everything in eab-config.c into e-cal-config.c and rename or whatever, i just started with e-cal-config when i wrote it.  it handles various details you need for a dynamic ui.

The check stuff is wrong though. You should add a page-check function, and you call e_config_target_changed when things change (this can be done inside the target directly - again see the addressbook stuff i just committed), and that will trigger a validate, and manage the button sensitivity too.  That means you can remove all of the check and allocating your own stuff, etc.

You should use e_config_create_window() instead of e_config_create_widget(), to get all of the commit/validate stuff happening automatically, and you can get rid of all of the dialog handling/etc code because of that.

So basically looks ok, just a few tweaks, and the new stuff required for the create calendar window.


On Wed, 2004-10-20 at 22:30 -0600, David Trowbridge wrote:
Ok, here's an updated version, that ought to address your concerns.

-David

On Fri, 2004-10-15 at 09:07 +0800, Not Zed wrote:
> 
> The ESource in the target should be modified instantly as the widgets
> change.  This is required for a couple of reasons:
> 1. Communicate the changed state to any other interested widgets,
> which may be supplied by plugins
> 2. Lets the gui know when things have changed, so it can only enable
> the "ok" button if the data validates.
> 
> It also simplifies 'commit' since you just copy/install that source.
> Obviously the ESource in the target should be a working-copy and not
> the actual ESource.  And clearly point 1 is the vital one.
> 
> For the plugin it needs to ref the source and keep it around for the
> widget modified callbacks.  Also note that this should mean you don't
> need to keep any globals to access them since the data will just be on
> the source already.  It doesn't need a commit method really since all
> of its state is stored in the source which will be committed by the
> master programme.
> 
> I suspect as the calendar naming conventions seem to be e_cal, that
> would make sense more than ec_, esp since the filename was changed to
> e-cal-.
> 
> You should probably also do page_check(xx, NULL) since you want all
> values checked - there might be more pages.
> 
> But those are minor points apart from the instant-change-to-source
> thing.
> 
> I'm not sure who needs to own the copyrights if the code is going to
> be in the main tree, Novell may want to, even for plugins.
> 
> On Thu, 2004-10-14 at 15:27 -0600, David Trowbridge wrote: 
> > 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
> -- 
> 
> Michael Zucchi <notzed ximian com>
> "born to die, live to work, it's
> all downhill from here"
> Novell's Evolution and Free
> Software Developer
--
Michael Zucchi <notzed ximian com>
"born to die, live to work, it's all downhill from here"
Novell's Evolution and Free Software Developer


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