Version strings

Libsaria and Ocarina have a __vers__ variable.  This contains a string
with the official version (eg. "Ocarina 4.1-dev" or "Libsaria 1.1").
"-dev" means that there have been changes since the last official
version.
This commit is contained in:
Bryan Schumaker 2010-10-24 17:22:24 -04:00
parent de68081e74
commit 4f371987a0
4 changed files with 8 additions and 2 deletions

View File

@ -6,6 +6,9 @@ __all__ = [ "collection", "music",
__major__ = 1
__minor__ = 1
__dev__ = True
__vers__ = "Libsaria %s.%s" % (__major__, __minor__)
if __dev__ == True:
__vers__ += "-dev"
import event
import path

View File

@ -16,7 +16,7 @@ libsaria.init_pref("window_size", (800,600))
prefs = libsaria.prefs
win = ocarina.get_window(prefs["window_size"])
ocarina.set_window_title("Ocarina 4.1")
ocarina.set_window_title(ocarina.__vers__)
ocarina.add_tab("Library", collection.Library())
ocarina.add_tab("Playlist", collection.Playlist())

View File

@ -7,6 +7,9 @@ import libsaria
__major__ = 4
__minor__ = 1
__dev__ = True
__vers__ = "Ocarina %s.%s" % (__major__, __minor__)
if __dev__ == True:
__vers__ += "-dev"
gobject.threads_init()

View File

@ -52,7 +52,7 @@ class InfoBar(Bar):
global button
global libsaria
self.title = gtk.Label("Ocarina 4.1")
self.title = gtk.Label(ocarina.__vers__)
self.title.show()
self.title.set_ellipsize(pango.ELLIPSIZE_END)