[Kde-pim] [Korganizer-devel] printing access to koprefs

Allen Winter winter at kde.org
Sun Jan 18 19:47:49 GMT 2009


On Sunday 18 January 2009 10:29:51 am Allen Winter wrote:
> On Monday 12 January 2009 8:29:24 pm Ron Goodheart wrote:
> > On Mon, Jan 12, 2009 at 5:22 AM, Allen Winter <winter at kde.org> wrote:
> > 
> > > Ron,
> > >
> > > Please use the kde-pim mailing list for discussion.
> > > The korganizer-devel list is really only for bugs use.
> > >
> > > On Monday 12 January 2009 12:02:05 am Ron Goodheart wrote:
> > > > Hi all,
> > > > I'm looking for some help on what would be the right way to get some
> > > > additional information for printing.
> > > >
> > > > There is a preference that defines the color of an overdue ToDo item that
> > > I
> > > > would like to access when printing the Todo. However my attempt to add
> > > > 'koprefs.h' failed.
> > > > "error: koprefs_base.h: No such file or directory".
> > > >
> > > You'll find that in the top-level korganizer build dir.
> > >
> > > > This header file is generated and does exist in my build directory under
> > > > <build>/korganizer.
> > > >
> > > > For instance, I was trying to use
> > > > "KOPrefs::instance()->todoOverdueColor()".
> > > >
> > > There is currently no way to access the KOrganizer global preferences from
> > > within the print subsystem.  This is due to a cyclical dependency of the
> > > libraries.
> > > IIRC, we need a refactoring.  Perhaps now in 4.3 would be a good time to
> > > finally
> > > make this refactoring happen.
> > >
> > > > Is there something else I need to do or access this information in
> > > another
> > > > way?
> > > >
> > > > Any help would be appreciated.
> > > >
> > > I can't think of any better idea than the refactoring I describe above.
> > > It may be as simple as breaking the koprefs out into its own little
> > > library.
> > >
> > > Do you want to do that?
> > >
> > > -Allen
> > 
> > 
> > The refactoring does sound like a good idea. I'm willing to do this but want
> > to kill off a few more of the printing problems first. I wouldn't be hurt if
> > someone else wanted to do it before I can get to it. The bug this would fix
> > is pretty minor compared to some still outstanding but would apply more
> > broadly once done.
> > 
> FYI. I'm working on this today.
> The internal KOrganizer dependencies are an unholy mess.

Whew.
Ok, try it now.

You should be able to access KOPrefs::instance()->foo() now in the printing stuff.

-Allen
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list