From: Henry G. <hsg...@gm...> - 2013-01-16 22:50:03
|
On Wed, Jan 16, 2013 at 03:47:10PM -0500, Piotr Sipika wrote: > > Another thing I forgot to mention: On startup the plugin takes a few > > seconds. I assume it is waiting for data? This shouldn't happen. Fast > > startup is essential, imho. > > If this happens once the location is set (please let me know whether > that's the case), then yes, it is most-likely waiting for data. Yes, the location is set. > > The solution to this might be: On startup, show default icon > (stock_warning) and use a g_timeout (2-5 seconds) to allow > initialization to complete. Once the timeout expires, forecast retrieval > is initiated. > > Does that sound like a valid approach? I think the forecast retrieval always needs to be done either in a separate thread or with non-blocking calls (if that works -- I don't know how network programming really works, maybe there is another way). We don't want the panel to freeze for a few seconds just because the network is slow! If you want to simulate a crappy internet connection, try the attached script and the parameters therein. :) Also, I don't see anything blocking the inclusion of this into lxpanel. libxml2 is, if I see correctly, already an LXDE dependency (via gvfs -> libfm -> pcmanfm). Cheers, Henry |