I'm not opposed to 'for... else' myself, but I admit that even so I still have
to check [1] every time to remember what Raymond Hettinger suggests the 'else'
*should* have been called (hint: 'nobreak')...
[1] https://www.youtube.com/watch?v=OSGv2VnC0go&t=15m50s
'same_second' is a bit of a misleading name: it could be understood to check
whether or not two times are "in the same second" rather than whether two times
are "within a second of each other" (so, 1.999 and 2.001 might be thought to
fail this check).
Indeed, the function was originally implemented as "in the same second"; but
that implementation was incorrect in the context in which we use it, and the
implementation was fixed in [1]; unfortunately, the name was not changed as
part of that fix... Fixing the name, too, now.
[1] da2c5444fe
--HG--
extra : amend_source : 0da64760fe6926460641f9ef158bcd23963bf963
on_episode_synced pararms:
device: gpodder.sync.Device instance
episode: gpodder.model.PodcastEpisode instance
replace on_episode_downloaded with on_episode_synced in sync.py
This will allow users to make extensions that are triggered
after a file has been synced to a device
only effects MP3PlayerDevice
easy way to get folder and filename that episode will be
synced to on device
get_episode_folder_on_device(episode):
returns folder location on device episode will be
synced into
get_episode_file_on_device(episode):
returns filename that will be used on device
The icon image quality degradation described in the previous changeset is
actually a result of loading by pixbuf, regardless of whether we then draw on
it or not. Interestingly, if the initial load is done by name, then subsequent
loads by pixbuf maintain the higher quality. In any case, in order to minimize
the quality impact, only load the image by pixbuf when actaully doing the
drawing. And the entire thing is still optional -- if download_progress_bar is
not set, the icon is only ever loaded by name.
--HG--
extra : rebase_source : 21233543a2e668bacdd43af1055c99d3e4b8e8e8
On some window manager / panel combinations, drawing on the icon degrades its
quality; make the drawing optional.
--HG--
extra : amend_source : 689f688dc46159cf240773bd9ec39fc02ea1dcbc
The old (gpodder 2) trayicon.py (which was removed in
a198ecc400) had the functionality of showing a
download progress bar on the tray icon itself. The new Gtk status icon
extension did not copy over this functionlity. This changeset ports that
functionality over, and is heavily based on that original code.
--HG--
extra : amend_source : b6cd3349db7f54b8e30b86b9d514073cb80a15fd
This was removed in 34b54e94b8, since it was no
longer used. However, in the next changset we will start using it again.
Although we're about to use it from the extension, it makes a certain amount of
sense to add it back into draw rather than into the extension, since it uses
some other functions from draw, and is also generic in the sense that it could
conceivably be used elsewhere.
--HG--
extra : rebase_source : ef7edc382dfcd2537c2b3b08ded9cf103d13c41b
I'm finally migrating from gpodder 2 to 3, and when starting up gpodder3
after running the migration, I ran into the following uncaught exception
(which aborted gpodder):
TypeError: coercing to Unicode: need string or buffer, NoneType found
The 'Episode details', or shownotes, could be displayed but not
hidden. Further, the menu item and the context sensitive menu gave
inconsistent behavior when multiple episodes were selected. And
I've removed the 'Episode details' context sensitive menu from the
'Progress' notebook page since this displays the shownotes on the
hidden 'Podcasts' notebook page.
The unix_get_active_interfaces() function only partially works on
FreeBSD. Wireless interfaces do not have a status of "active", but
rather "associated".