[pitivi] configure: Rename constant name to be uppercase



commit e318234910ef61f08b700958ca0722add307a1d6
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Sat Feb 1 03:32:02 2014 +0100

    configure: Rename constant name to be uppercase

 pitivi/application.py     |    6 +++---
 pitivi/configure.py.in    |    2 +-
 pitivi/mainwindow.py      |    8 ++++----
 tests/test_application.py |   10 +++++-----
 4 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/pitivi/application.py b/pitivi/application.py
index 14242e0..ae8d683 100644
--- a/pitivi/application.py
+++ b/pitivi/application.py
@@ -45,7 +45,7 @@ from gettext import gettext as _
 from optparse import OptionParser
 
 from pitivi.effects import EffectsHandler
-from pitivi.configure import pitivi_version, RELEASES_URL
+from pitivi.configure import VERSION, RELEASES_URL
 from pitivi.settings import GlobalSettings
 from pitivi.utils.threads import ThreadMaster
 from pitivi.mainwindow import PitiviMainWindow
@@ -203,7 +203,7 @@ class Pitivi(Loggable, Signallable):
             status = "UNSUPPORTED"
             current_version = None
             for version, version_status in data:
-                if pitivi_version == version:
+                if VERSION == version:
                     status = version_status
                 if version_status.upper() == "CURRENT":
                     # This is the latest.
@@ -211,7 +211,7 @@ class Pitivi(Loggable, Signallable):
 
             self.info("Latest software version is %s", current_version)
             if status is "UNSUPPORTED":
-                self.warning("Using an outdated version of Pitivi (%s)", pitivi_version)
+                self.warning("Using an outdated version of Pitivi (%s)", VERSION)
 
             self._version_information["current"] = current_version
             self._version_information["status"] = status
diff --git a/pitivi/configure.py.in b/pitivi/configure.py.in
index 61c7b3d..2cbbfcb 100644
--- a/pitivi/configure.py.in
+++ b/pitivi/configure.py.in
@@ -41,7 +41,7 @@ def in_devel():
 
 LIBDIR = '@LIBDIR@'
 PKGDATADIR = '@DATADIR@/@PACKAGE@'
-pitivi_version = '@VERSION@'
+VERSION = '@VERSION@'
 APPNAME = '@PACKAGE_NAME@'
 APPURL = 'http://www.pitivi.org/'
 RELEASES_URL = 'http://pitivi.org/releases.txt'
diff --git a/pitivi/mainwindow.py b/pitivi/mainwindow.py
index 42eaeaa..7388e50 100644
--- a/pitivi/mainwindow.py
+++ b/pitivi/mainwindow.py
@@ -40,7 +40,7 @@ from gi.repository import GdkPixbuf
 from gi.repository.GstPbutils import InstallPluginsContext, install_plugins_async
 
 from pitivi.clipproperties import ClipProperties
-from pitivi.configure import in_devel, pitivi_version, APPNAME, APPURL, get_pixmap_dir, get_ui_dir
+from pitivi.configure import in_devel, VERSION, APPNAME, APPURL, get_pixmap_dir, get_ui_dir
 from pitivi.effects import EffectListWidget
 from pitivi.mediafilespreviewer import PreviewWidget
 from pitivi.medialibrary import MediaLibraryWidget
@@ -352,7 +352,7 @@ class PitiviMainWindow(Gtk.Window, Loggable):
 
         The full hierarchy is also visible with accessibility tools like "sniff"
         """
-        self.set_title("%s" % (APPNAME))
+        self.set_title("%s" % APPNAME)
         self.set_icon_name("pitivi")
         vbox = Gtk.VBox(homogeneous=False)
         self.add(vbox)
@@ -667,10 +667,10 @@ class PitiviMainWindow(Gtk.Window, Loggable):
             version_str = _("Development version")
         elif not self.app.isLatest():
             version_str = _("Version %(cur_ver)s — %(new_ver)s is available" %
-                            {"cur_ver": pitivi_version,
+                            {"cur_ver": VERSION,
                              "new_ver": self.app.getLatest()})
         else:
-            version_str = _("Version %s" % pitivi_version)
+            version_str = _("Version %s" % VERSION)
         abt.set_version(version_str)
 
         comments = ["",
diff --git a/tests/test_application.py b/tests/test_application.py
index cdbb9f8..8ea2509 100644
--- a/tests/test_application.py
+++ b/tests/test_application.py
@@ -46,14 +46,14 @@ class TestPitivi(TestCase):
         self.assertTrue(app.isLatest())
 
         app = application.Pitivi()
-        app._versionInfoReceivedCb(MockGioFile(), "%s=CURRENT" % configure.pitivi_version, None)
+        app._versionInfoReceivedCb(MockGioFile(), "%s=CURRENT" % configure.VERSION, None)
         self.assertTrue(app.isLatest())
-        self.assertEqual(configure.pitivi_version, app.getLatest())
+        self.assertEqual(configure.VERSION, app.getLatest())
 
         app = application.Pitivi()
-        app._versionInfoReceivedCb(MockGioFile(), "%s=current\n0=supported" % configure.pitivi_version, None)
+        app._versionInfoReceivedCb(MockGioFile(), "%s=current\n0=supported" % configure.VERSION, None)
         self.assertTrue(app.isLatest())
-        self.assertEqual(configure.pitivi_version, app.getLatest())
+        self.assertEqual(configure.VERSION, app.getLatest())
 
         app = application.Pitivi()
         app._versionInfoReceivedCb(MockGioFile(), "999.0=CURRENT", None)
@@ -61,6 +61,6 @@ class TestPitivi(TestCase):
         self.assertEqual("999.0", app.getLatest())
 
         app = application.Pitivi()
-        app._versionInfoReceivedCb(MockGioFile(), "999.0=CURRENT\n%s=SUPPORTED" % configure.pitivi_version, 
None)
+        app._versionInfoReceivedCb(MockGioFile(), "999.0=CURRENT\n%s=SUPPORTED" % configure.VERSION, None)
         self.assertFalse(app.isLatest())
         self.assertEqual("999.0", app.getLatest())


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]