[gpodder-devel] [PATCH] systray icon with notification + autoupdate

  • From: me at nikosapi.org (nikosapi)
  • Date: Fri, 21 Dec 2007 19:33:41 -0500

On December 21, 2007 08:17:52 jerome.chabod at ifrance.com wrote:
> Hello,
>
> Here it is. After diving into python and gPodder code ( I must say gPodder
> is often nicely implemented so it wasn't too hard, maybe comments are
> sometime missing) and spending hours seaking on internet, I'm able to
> deliver you a patch with a first implentation of a status icon on the sytem
> tray.
>
> Please, try it, test it and/or review its code (it should be easy to review
> since it almost consist of one class), and share you comments, suggestions,
> critisms with us.
>
> regard,
> J?r?me Chabod
>
> -------------------------------------------------------------
>
> WHAT IT DOES:
> -------------
> It displays an icon in the sytem tray after gPodder starts. This icon
> allows following features: * hide/show gpodder
> ??? left clicking several times on this icon will respectively bring
> gPodder to front (if not already), hide gPodder (only the icon will remain
> visible), show gPodder again. * popup menu
> ??? right clicking on the icon will popup a menu for quick access to some
> gPodder functionality ("update feed", "download all episodes",
> "pr?ferences", "about" and "exit") * download status and notification
> ??? during gPodder is downloading, the icons's tooltip will display how
> many files are currently dowloading and the progression percentage. Once
> all downloads are finished (terminated or canceled), a notification message
> is poped up
>
> GOAL:
> -----
> My idea behind this icon is to have gPodder starting automaticaly and
> running in background for its daily job. To achieve that, gPodder should be
> able to: 1. start hidden, only the icon should be visible (activated by a
> configuration option) 2. check for new episodes (either automaticaly at
> startup? - a configuration flag already exists -, triggered by the icon's
> popup menu or even periodically) 3. inform: status in tooltip and special
> icon, notification after update 4. download new episodes (either
> automaticaly when new episodes where found - a configuration flag already
> exists - or triggered by the popup menu) 5. inform: status in tooltip and
> special icon, notification after download 6. notify errors and
> troubleshouting
>
> TODO:
> -----
> * add configuration options:
> ??? - show icon in systray (on by default)
> ??? - display notification (on by default)
> ??? - start gPodder iconified (off by default)
> ??? - 4 options when exiting gPodder: "exit", "run in systray", "run in
> systray until all downloads finished", "ask me" ("ask me" by default) *
> status and notification for channel updates (check for new episodes) *
> status and notification for mp3 device synchronisation
> * add a status symbol to the icon: dowloading, checking for new episodes,
> synchronising (if somebody could help here) * check periodically for new
> episode (peridiodicity should be configurable) * error handling: what to do
> in case of error?
> ??? - critical errors where the use can't help (bug, missing
> dependency...). - troubleshouting where the user might do something (server
> down, xml invalid, disk full, ...). Maybe send a notification popup and
> make icon blinking
>
>

Hello J?r?me,

Attached is a very basic autoupdate addition to your patch. What it does, is 
every 20min it runs update_feed_cache. This behaviour is controlled by a 
configuration option in the Preferences window.

I also modified your patch a bit to expose some functions that are used for 
autoupdate and may be useful in other places. I don't know if this was the 
best way to do it, change whatever you want if I did something stupid :)

The main problem with autoupdate is that it will still try to update even 
while you are accessing the DB (eg. updating your iPod or even manually 
updating the feed cache) so we need to find a way to disable autoupdate when 
these events are happening. I think this can be done by setting the 
autoupdate config option to False temporally when doing any DB access. Sadly, 
I don't really know enough to do this properly :(

Thanks for your hard work,

nick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gpodder-r502-initial_autoupdate.patch
Type: text/x-diff
Size: 17676 bytes
Desc: not available
URL: 
<https://lists.berlios.de/pipermail/gpodder-devel/attachments/20071221/75f9131a/attachment.patch>

Other related posts:

  • » [gpodder-devel] [PATCH] systray icon with notification + autoupdate - nikosapi