Re: [patch] fix libgnomecups attribute settings



On Thu, Aug 12, 2004 at 07:03:02PM -0400, Colin Walters wrote:
> Hi,
> 
> Since retrieval of printer attributes when gnome_cups_printer_get is
> called is now asynchronous, this poses a problem - callers don't know
> when the attributes (description, URI, etc) are valid.
> 
> The attached patch adds an API method to know when the attributes have
> been set for the first time.  What we do inside eggcups when a new
> printer is detected is call gnome_cups_printer_get, attach to its
> attributes-changed callback, and at that point we know the attributes
> are valid (in particular the URI).

Do we want something like that in gnomeprint too ?

> This patch also changes the API for gnome_cups_request_new_for_printer.
> It used to take a printer name, but we've changed it to take a real
> GnomeCupsPrinter object, since that's the only way we can discover the
> URI for the printer.  I'm pretty sure this is the right change because
> it simplifies all of the callers.
> 
> I'm not sure if there are even any external callers of
> gnome_cups_request_new_for_printer, so the API change shouldn't be a
> problem.
> 
> We also moved gnome_cups_get_printer_uri back into utils.c, where it
> makes more sense now I think.
 
Seems reasonable.  Please notify me when it goes in.  I'll patch
gnome-cups-manager and bump the version req.



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