Merge branch 'master' into Ocarina-4.2
This commit is contained in:
commit
eb5a788a95
|
@ -7,7 +7,7 @@ __major__ = 1
|
|||
__minor__ = 1
|
||||
__dev__ = True
|
||||
__vers__ = "Libsaria %s.%s" % (__major__, __minor__)
|
||||
if __dev__ == True:
|
||||
if __dev__ == False:
|
||||
__vers__ += "-dev"
|
||||
|
||||
import event
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
# Bryan Schumaker (8/7/2010)
|
||||
|
||||
import libsaria
|
||||
import os
|
||||
|
||||
exists = os.path.exists
|
||||
|
@ -40,7 +41,10 @@ def plugin_dir_once():
|
|||
global p_dir
|
||||
global saria_dir
|
||||
saria = saria_dir()
|
||||
p_dir = join(saria, "plugins")
|
||||
dir = "plugins"
|
||||
if libsaria.__dev__ == True:
|
||||
dir += "-dev"
|
||||
p_dir = join(saria, dir)
|
||||
if exists(p_dir) == False:
|
||||
mkdir(p_dir)
|
||||
plugin_dir = plugin_dir_rest
|
||||
|
|
|
@ -81,6 +81,13 @@ def load_plugin_rest(name, file):
|
|||
print "Error loading plugin: %s" % file
|
||||
print e
|
||||
|
||||
try:
|
||||
if mod.check_version() == False:
|
||||
print "Error: plugin %s requires a different version" % name
|
||||
return
|
||||
except:
|
||||
print "Warning: plugin %s doesn't check versions" % name
|
||||
|
||||
try:
|
||||
globals()[name] = mod
|
||||
loaded[name] = mod
|
||||
|
|
|
@ -11,7 +11,7 @@ __major__ = 4
|
|||
__minor__ = 1
|
||||
__dev__ = True
|
||||
__vers__ = "Ocarina %s.%s" % (__major__, __minor__)
|
||||
if __dev__ == True:
|
||||
if __dev__ == False:
|
||||
__vers__ += "-dev"
|
||||
|
||||
gdk.threads_init()
|
||||
|
|
|
@ -23,3 +23,10 @@ def start():
|
|||
|
||||
def stop():
|
||||
pass
|
||||
|
||||
def check_version():
|
||||
if ocarina.__major__ != 4:
|
||||
return False
|
||||
if ocarina.__minor__ != 1:
|
||||
return False
|
||||
return True
|
||||
|
|
|
@ -41,7 +41,13 @@ def start():
|
|||
children.append("Groove Shark")
|
||||
ocarina.add_tab("Groove Shark", groove)
|
||||
|
||||
|
||||
def stop():
|
||||
for child in children:
|
||||
ocarina.remove_tab(child)
|
||||
|
||||
def check_version():
|
||||
if ocarina.__major__ != 4:
|
||||
return False
|
||||
if ocarina.__minor__ != 1:
|
||||
return False
|
||||
return True
|
||||
|
|
|
@ -27,6 +27,12 @@ def start():
|
|||
invite("POSTLOAD", tweak_title)
|
||||
invite("POSTGETART", tweak_icon)
|
||||
|
||||
|
||||
def stop():
|
||||
pass
|
||||
|
||||
def check_version():
|
||||
if ocarina.__major__ != 4:
|
||||
return False
|
||||
if ocarina.__minor__ != 1:
|
||||
return False
|
||||
return True
|
||||
|
|
Loading…
Reference in New Issue