Changeset 61c5043
- Timestamp:
- Nov 29, 2009, 10:14:51 PM (15 years ago)
- Branches:
- master, debian, mac, no-cups, web
- Children:
- b17d602
- Parents:
- d566e6b
- git-author:
- Nimrod Gileadi <nimrodg@…> (11/29/09 22:14:51)
- git-committer:
- Nimrod Gileadi <nimrodg@…> (11/29/09 22:14:51)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gutenbach-rhythmbox-plugin/__init__.py
rd566e6b r61c5043 1 """ 2 This module implements a Rhythmbox plugin that sends selected track to a 3 printer queue. It's meant to be used with gutenbach, a music spooling printer 4 server. 5 6 The plugin uses lpr to send the files to gutenbach. 7 """ 8 import gtk 1 9 import rb 2 import gtk 10 import subprocess 11 import urllib 3 12 import urlparse 4 import urllib5 import subprocess6 13 7 14 # UI Change is an extra item added to right-click menu when clicking on tracks … … 18 25 19 26 def activate(self, shell): 27 """Adds a new item to the right-click menu which allows 28 sending music files to the gutenbach server. 29 """ 20 30 self.shell = shell 21 31 # Create action for sending a track to gutenbach … … 38 48 39 49 def gutenbach_action(self, action, shell): 50 """An action called when the user clicks the right-click menu item 51 to send a track to gutenbach. 52 This function calls an instance of lpr for each file to be added. 53 """ 40 54 source = shell.get_property("selected-source") 41 55 # For each track currently selected in the song browser … … 51 65 printer = self.printer 52 66 command = 'lpr -P %s "%s"' % (printer, path) 53 print command67 print "About to run command '%s'" % command 54 68 subprocess.Popen(command, shell=True) 55 69
Note: See TracChangeset
for help on using the changeset viewer.