Re: MediaTray 0.0.1
Dennis Tomas <[email protected]> Fri, 13 Mar 2015 18:42:59 +0100
| Newsgroups | gmane.comp.desktop.rox.user |
|---|---|
| Message-ID | <[email protected]> |
On 13.03.2015 18:23, Abrolag wrote: > On Fri, 13 Mar 2015 18:12:36 +0100 > Dennis Tomas <[email protected]> wrote: > >> On 13.03.2015 18:04, Abrolag wrote: >>> On Fri, 13 Mar 2015 17:41:14 +0100 >>> Dennis Tomas <[email protected]> wrote: >>> >>>> On 13.03.2015 17:33, Abrolag wrote: >>>>> On Fri, 13 Mar 2015 16:30:17 +0100 >>>>> Dennis Tomas <[email protected]> wrote: >>>>> >>>>>> On 13.03.2015 16:23, Abrolag wrote: >>>>>>> On Fri, 13 Mar 2015 13:54:05 +0100 >>>>>>> Dennis Tomas <[email protected]> wrote: >>>>>>> >>>>>>>> Digging out TaskTray has got me back into ROX applet development, so I >>>>>>>> wrote a little applet to show removable media, since DevTray does not >>>>>>>> work on recent distros. You need python-gobject to run it. If >>>>>>>> python-wnck is installed, it also shows open filer windows of mounted >>>>>>>> volumes. >>>>>>>> >>>>>>>> Installation (on debian-based distros): >>>>>>>> >>>>>>>> sudo apt-get install git python-gobject python-wnck >>>>>>>> git clone --recursive https://github.com/dtomas/MediaTray.git >>>>>>>> >>>>>>>> And if you'd like to add it to an XFCE panel: >>>>>>>> cd MediaTray >>>>>>>> sudo python install_xfce.py >>>>>>> Absolutely delighted to see this. I've been bumping along the bottom using >>>>>>> pmount for some time :( >>>>>>> >>>>>>> However I'm getting a problem with removable hard drives with 2 partitions. Only >>>>>>> one of them disappears when it's unplugged, and I get the message: >>>>>>> KeyError: None >>>>>> Can you get at the stack trace (click on "Details" in the error dialog)? >>>>> I can see it, but I can't save it! I get a 'save' window that is totally >>>>> unresponsive :( >>>>> >>>>> OK, worked that one out. You have to close the error report window before the >>>>> save one becomes active - strange! >>>>> >>>>> Contents: >>>>> Traceback (most recent call last): >>>>> File "/home/will/LocalProgs/MediaTray/AppletRun", line 20, in <module> >>>>> MediaTrayMain().mainloop(sys.argv) >>>>> File "/home/will/LocalProgs/MediaTray/mediatray/main.py", line 30, in mainloop >>>>> Main.mainloop(self, app_args, MediaTray, self.__win_config) >>>>> File "/home/will/LocalProgs/MediaTray/TrayLib/traylib/main.py", line 70, in >>>>> mainloop rox.mainloop() >>>>> File >>>>> "/home/will/LocalProgs/MediaTray/rox-lib/ROX-Lib2/python/rox/__init__.py", line >>>>> 359, in mainloop g.main() File >>>>> "/home/will/LocalProgs/MediaTray/mediatray/mediaicon_manager.py", line 38, in >>>>> __volume_removed self.tray.remove_icon(volume.get_uuid()) File >>>>> "/home/will/LocalProgs/MediaTray/TrayLib/traylib/tray.py", line 114, in >>>>> remove_icon icon = self.__icons[icon_id] KeyError: None >>>> This might have been caused by both of the volumes not having a UUID, >>>> which is used by MediaTray as a unique identifier for the icon. I've >>>> fixed this by using the volume object's hash as icon ID. Can you please >>>> git pull and report back? >>> That was quick! :) >>> >>> Yes, that solves the problem... >>> but highlights another oddity I hadn't noticed. >>> >>> I hadn't been getting the normal partition bobbles before. >> I have an external hard drive which didn't get displayed, so I removed >> the check for the drive having removable media. I did not find a better >> way to tell them apart yet. >> >>> I do now, but they >>> stay grey and when I click on the icon, although it opens quite correctly I get >>> the following error (this also happens with a single USB stick): >>> >>> AttributeError: 'MediaIcon' object has no attribute >>> '_MediaIcon__unmount_handler' >>> >>> Traceback (most recent call last): >>> File "/home/will/LocalProgs/MediaTray/AppletRun", line 20, in <module> >>> MediaTrayMain().mainloop(sys.argv) >>> File "/home/will/LocalProgs/MediaTray/mediatray/main.py", line 30, in mainloop >>> Main.mainloop(self, app_args, MediaTray, self.__win_config) >>> File "/home/will/LocalProgs/MediaTray/TrayLib/traylib/main.py", line 70, in >>> mainloop rox.mainloop() >>> File >>> "/home/will/LocalProgs/MediaTray/rox-lib/ROX-Lib2/python/rox/__init__.py", line >>> 359, in mainloop g.main() File >>> "/home/will/LocalProgs/MediaTray/mediatray/mediaicon.py", line 102, in mounted >>> if self.__unmount_handler is not None: AttributeError: 'MediaIcon' object has >>> no attribute '_MediaIcon__unmount_handler' >>> >> Fixed, sorry! > No need for apologies. We're cooking on gas now :) > > Thanks a lot for this. > > I shall copy it across to my (several) computers and give it a thorough > workout :) Ok, let the bugs fly! > It hadn't occurred to me that git could be used with ROX apps - it actually > works really well doesn't it? > It does, which is part of the reason I've been starting to work on this again. ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/