Plugins: openterminal.2.py

File openterminal.2.py, 0.6 kB (added by jmcantrell@gmail.com, 2 months ago)

Updated version of openterminal.py that uses x-terminal-emulator, which makes it use the prefered terminal.

Line 
1 import gtk
2 from qltk import ErrorMessage
3 from plugins.songsmenu import SongsMenuPlugin
4 from qltk.entry import ValidatingEntry
5 import util
6 import config
7 import os
8
9 class BrowseFolders(SongsMenuPlugin):
10     PLUGIN_ID = 'Open Terminal'
11     PLUGIN_NAME = _('Open Terminal')
12     PLUGIN_DESC = "Open a terminal at this location"
13     PLUGIN_ICON = 'gtk-about'
14     PLUGIN_VERSION = '0.1'
15
16     def plugin_songs(self, songs):
17         c = os.getcwd()
18         d = dict.fromkeys([song('~dirname') for song in songs]).keys()[0]
19         os.chdir(d)
20         os.system('x-terminal-emulator')
21         os.chdir(c)