Bug#834219: hamster-applet: Launches handler for directory (e.g. Decibel Audio Player) upon saving non-HTML report
J.P. Larocque
jpl-debian-bts at thoughtcrime.us
Sat Aug 13 10:11:05 UTC 2016
Package: hamster-applet
Version: 2.91.3+git20120514.b9fec3e1-1
Severity: normal
Hi,
While trying out Hamster, I saved a report in TSV format, and then
Decibel Audio Player launched and automatically started playing music
in a couple subdirectories down from the directory to which I saved
the TSV report. That is, I saved to /tmp/report, and Decibel fired up
playing music in /tmp/foo/bar/*.flac.
My best educated guess as to why this is happening is that Hamster
"launches" (in some sense) the directory to which the report is saved
(/tmp in my case), due to closure named on_report_chosen() in the
method on_export_active() in the class hamster.overview.Overview,
defined in /usr/share/pyshared/hamster/overview.py . Line 228 of this
file (in the version being reported against) seems to be the offender:
220 def on_report_chosen(widget, format, path):
221 self.report_chooser = None
222 reports.simple(self.facts, self.start_date, self.end_date, format, path)
223
224 if format == ("html"):
225 webbrowser.open_new("file://%s" % path)
226 else:
227 try:
228 gtk.show_uri(gtk.gdk.Screen(), "file://%s" % os.path.split(path)[0], 0L)
229 except:
230 pass # bug 626656 - no use in capturing this one i think
I notice that /usr/share/applications/mimeinfo.cache on my system
contains this entry:
inode/directory=decibel-audio-player.desktop;
And I notice that Decibel does a recursive search and starts
automatically playing when you start it with a directory name on the
command line.
What is the intention the call to gtk.show_uri() on line 228? Is
Hamster doing the right thing? Is Decibel in the wrong here? I don't
know exactly what's supposed to happen, but I figure it's probably not
this.
(Decibel fixed this; see #611938, but this looks like a more general
problem with Hamster. Also, I had no luck finding any relevant "bug
626656" on the web, which I thought might shed some light on the
intended action.)
Thanks for looking into this!
-J.P. Larocque
-- System Information:
Debian Release: 8.5
APT prefers stable-updates
APT policy: (700, 'stable-updates'), (700, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages hamster-applet depends on:
ii gconf2 3.2.6-3
ii python 2.7.9-1
ii python-cairo 1.8.8-1+b2
ii python-dbus 1.2.0-2+b3
ii python-gconf 2.28.1+dfsg-1.1
ii python-gnome2 2.28.1+dfsg-1.1
ii python-gobject-2 2.28.6-12+b1
ii python-gtk2 2.24.0-4
ii python-wnck 2.32.0+dfsg-3
ii python-xdg 0.25-4
ii python2.6 2.6.8-1.1
ii python2.7 2.7.9-2
Versions of packages hamster-applet recommends:
ii gnome-icon-theme 3.12.0-1
ii python-notify 0.1.1-4
Versions of packages hamster-applet suggests:
pn python-evolution <none>
-- no debconf information
--
J.P. Larocque <jpl-debian-bts at thoughtcrime.us>
More information about the pkg-gnome-maintainers
mailing list