Merge branch 'module.laditools'
This commit is contained in:
commit
72fd5322e8
|
@ -29,13 +29,14 @@ if not exists (config_dir):
|
||||||
|
|
||||||
# Note to users of the config class. Only applications should create an instance
|
# Note to users of the config class. Only applications should create an instance
|
||||||
# of the config object. The ladimenu is *NOT* an application...
|
# of the config object. The ladimenu is *NOT* an application...
|
||||||
class config:
|
class config(object):
|
||||||
def __init__ (self):
|
def __init__ (self):
|
||||||
try:
|
try:
|
||||||
with open (config_filename) as config_file:
|
with open (config_filename) as config_file:
|
||||||
self.appdict = yaml.load (config_file)
|
self.appdict = yaml.load (config_file)
|
||||||
except:
|
except:
|
||||||
print "Config file doesn't exist, creating a new one..."
|
sys.stderr.write("Config file doesn't exist, creating a new one...\n")
|
||||||
|
sys.stderr.flush()
|
||||||
self.appdict = dict ()
|
self.appdict = dict ()
|
||||||
|
|
||||||
# Returns the section named <app_name> from the global config
|
# Returns the section named <app_name> from the global config
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import dbus
|
import dbus
|
||||||
|
import sys
|
||||||
|
|
||||||
name_base = 'org.jackaudio'
|
name_base = 'org.jackaudio'
|
||||||
controller_interface_name = name_base + '.JackControl'
|
controller_interface_name = name_base + '.JackControl'
|
||||||
|
@ -30,7 +31,8 @@ class jack_controller:
|
||||||
# self.bus.add_signal_receiver (self.name_owner_changed, dbus_interface = controller_interface_name, signal_name = "NameOwnerChanged")
|
# self.bus.add_signal_receiver (self.name_owner_changed, dbus_interface = controller_interface_name, signal_name = "NameOwnerChanged")
|
||||||
|
|
||||||
def name_owner_changed (name = None, old_owner = None, new_owner = None):
|
def name_owner_changed (name = None, old_owner = None, new_owner = None):
|
||||||
print "Name changed : %r" % name
|
sys.stderr.write("Name changed : %r\n" % name)
|
||||||
|
sys.stderr.flush()
|
||||||
|
|
||||||
def is_available (self):
|
def is_available (self):
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -352,8 +352,9 @@ def find_data_file(path):
|
||||||
start_dir = "."
|
start_dir = "."
|
||||||
|
|
||||||
paths = [
|
paths = [
|
||||||
start_dir + os.sep + "data" + os.sep + path,
|
os.path.join(sys.path[0], 'data', path),
|
||||||
start_dir + os.sep + ".." + os.sep + "share"+ os.sep + "laditools" + os.sep + "data" + os.sep + path,
|
os.path.join(os.path.join(sys.path[0], os.pardir), 'data', path),
|
||||||
|
os.path.join(os.path.join(sys.path[0], os.pardir), 'share', 'laditools', 'data', path),
|
||||||
]
|
]
|
||||||
|
|
||||||
for path in paths:
|
for path in paths:
|
||||||
|
|
Loading…
Reference in New Issue