Open asechrest opened 9 years ago
I will add a reference to another similar problem: https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=1088296
Apparently, there are a problem when some gif will be scaled preserving the aspect radio, there are a patch here: https://bugzilla.gnome.org/show_bug.cgi?id=164874 from a similar situation.
Edit: Please also see, https://bugs.launchpad.net/gwibber/+bug/940182
Maybe, could be used instead of a Pixbuf this implementation: https://github.com/linuxmint/Cinnamon/blob/master/files/usr/lib/cinnamon-settings/bin/imtools.py
Also i see this: https://github.com/linuxmint/Cinnamon/blob/master/files/usr/lib/cinnamon-settings/bin/XletSettingsWidgets.py#L926
Best check for none:
if filename and os.path.isfile(filename):
To prevent errors like:
Traceback (most recent call last):
File "/usr/lib/cinnamon-settings/bin/XletSettingsWidgets.py", line 926, in update_icon_preview_cb
if os.path.isfile(filename):
File "/usr/lib/python2.7/genericpath.py", line 29, in isfile
st = os.stat(path)
TypeError: coercing to Unicode: need string or buffer, NoneType found
-1 to adding support for animated gif. +1 to fixing the menu applet configure option so it still functions if the user uses a bad gif
@leigh123linux Well, i don't use gif and this is not trascendental for me, i only provide references to some different alternatives.
Agree with leigh123linux. My suggestion would be to fail gracefully (gif does not animate, Config remains possible), or prevent selection of an animated gif in the first place. The former seems the better option, though I'm no coder.
lestcape: thanks for the references.
1) VERSIONS: Linux Mint 17.1 "Rebecca", Cinnamon 2.4.8 2) REPEAT: Right click menu, Configure, Use custom icon, select an animated gif 3) HAPPENED: Process appears to work, and a snapshot of the gif appears as the icon. However, further attempts to right-click menu and Configure instead brings up the broad Applet menu rather than the Menu Applet Config window. Attempts to configure the Menu applet will fail, and no Configure window will open. 4) EXPECTED: Icon will be accepted, and further attempts to Configure menu applet will not fail. 5) FREQUENCY: Has happened with every animated gif I've tried. However it doesn't appear to happen with a static gif.
The issue can be "fixed" by navigating to ~/.cinnamon/configs/menu@cinnamon.org, opening file menu@cinnamon.org.json, and adjusting the filepath under menu-icon to point to a different file than the animated gif.