Merge lp:~simon-d-bull/cappella/cappella10_about_dialog into lp:cappella

Proposed by Simon Bull
Status: Merged
Approved by: Andrew Hayzen
Approved revision: 101
Merged at revision: 101
Proposed branch: lp:~simon-d-bull/cappella/cappella10_about_dialog
Merge into: lp:cappella
Diff against target: 84 lines (+15/-5)
5 files modified
cappella/data/default/config.js (+2/-2)
cappella/data/glade/about_dialog.ui (+1/-1)
cappella/gui/widget/about_dialog.py (+10/-2)
runner/cappella (+1/-0)
standalone.sh (+1/-0)
To merge this branch: bzr merge lp:~simon-d-bull/cappella/cappella10_about_dialog
Reviewer Review Type Date Requested Status
Andrew Hayzen Approve
Review via email: mp+161482@code.launchpad.net

Description of the change

- Modified the about dialog, so that the version name and codename are dynamic.

To post a comment you must log in.
Revision history for this message
Andrew Hayzen (ahayzen) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cappella/data/default/config.js'
2--- cappella/data/default/config.js 2013-04-20 21:21:08 +0000
3+++ cappella/data/default/config.js 2013-04-29 19:15:35 +0000
4@@ -23,10 +23,10 @@
5 "/statics/lock": "*CAPPELLA_ROOT*/lock",
6 "/statics/program_name": "Cappella",
7 "/statics/version_number": "*CAPPELLA_VERSION*",
8- "/statics/version_name": "Development Model",
9+ "/statics/version_name": "*CAPPELLA_CODENAME*",
10 "/statics/logo": "*CAPPELLA_DATA_PATH*/cappella.png",
11 "/statics/album_art_colour": "*CAPPELLA_DATA_PATH*/album_art_colour.jpg",
12 "/statics/album_art_grey": "*CAPPELLA_DATA_PATH*/album_art_grey.jpg",
13 "/statics/glade": "*CAPPELLA_DATA_PATH*/glade",
14 "/statics/root": "*CAPPELLA_ROOT*"
15-}
16\ No newline at end of file
17+}
18
19=== modified file 'cappella/data/glade/about_dialog.ui'
20--- cappella/data/glade/about_dialog.ui 2013-04-04 18:13:06 +0000
21+++ cappella/data/glade/about_dialog.ui 2013-04-29 19:15:35 +0000
22@@ -7,7 +7,7 @@
23 <property name="title" translatable="yes">About Cappella Media Player</property>
24 <property name="type_hint">dialog</property>
25 <property name="program_name">Cappella Media Player</property>
26- <property name="version">0.1 Development Model</property>
27+ <property name="version">{CAPPELLA_VERSION} - {CAPPELLA_CODENAME}</property>
28 <property name="copyright" translatable="yes">Copyright © 2011-2013 Andrew Hayzen &amp; Simon Bull</property>
29 <property name="comments" translatable="yes">A simple media player based on PyGObject for Ubuntu</property>
30 <property name="website">http://cappella.hayzentech.co.uk</property>
31
32=== modified file 'cappella/gui/widget/about_dialog.py'
33--- cappella/gui/widget/about_dialog.py 2013-04-02 22:48:35 +0000
34+++ cappella/gui/widget/about_dialog.py 2013-04-29 19:15:35 +0000
35@@ -23,7 +23,7 @@
36
37 # Import Gtk, GObject etc
38 from gi.repository import Gtk, Gdk, GdkPixbuf
39-
40+from os import getenv
41 from ...config.cappella import settings
42
43
44@@ -40,7 +40,15 @@
45 "about_dialog.ui"]))
46
47 about = builder.get_object("about_dialog")
48-
49+
50+ # Set version
51+ version = about.get_version()
52+
53+ for i in ["CAPPELLA_VERSION", "CAPPELLA_CODENAME"]:
54+ version = version.replace("{%s}" % i, getenv(i))
55+
56+ about.set_version(version)
57+
58 # Set logo
59 logo = GdkPixbuf.Pixbuf.new_from_file(settings["/statics/logo"])
60 about.set_logo(logo)
61
62=== modified file 'runner/cappella'
63--- runner/cappella 2013-04-02 22:48:35 +0000
64+++ runner/cappella 2013-04-29 19:15:35 +0000
65@@ -4,6 +4,7 @@
66 os.environ["CAPPELLA_PATH"] = "/usr/lib/python3/dist-packages/cappella"
67 os.environ["CAPPELLA_DATA_PATH"] = "/usr/share/cappella"
68 os.environ["CAPPELLA_VERSION"] = "1.0"
69+os.environ["CAPPELLA_CODENAME"] = "Antecedent Accordion"
70
71 import cappella
72
73
74=== modified file 'standalone.sh'
75--- standalone.sh 2013-04-03 17:20:57 +0000
76+++ standalone.sh 2013-04-29 19:15:35 +0000
77@@ -3,6 +3,7 @@
78 export CAPPELLA_PATH="$PWD/cappella"
79 export CAPPELLA_DATA_PATH="$PWD/cappella/data"
80 export CAPPELLA_VERSION="1.0"
81+export CAPPELLA_CODENAME="Antecedent Accordion"
82 export PYTHONPATH="$PWD"
83
84 for p in "$@";

Subscribers

People subscribed via source and target branches

to all changes: