[pitivi] Correctly detect the running version for the about dialog
- From: Jean-François Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] Correctly detect the running version for the about dialog
- Date: Thu, 6 Feb 2014 18:11:27 +0000 (UTC)
commit a7d21670ce2bac8fc4b4e1d4f6f0a6c2756dc322
Author: Jean-François Fortin Tam <nekohayo gmail com>
Date: Sun Feb 2 23:05:06 2014 -0500
Correctly detect the running version for the about dialog
The about dialog was not calling the in_devel() function properly,
and that function did not look into the correct directory either.
Fixes bug #723489
pitivi/mainwindow.py | 2 +-
pitivi/utils/misc.py | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/pitivi/mainwindow.py b/pitivi/mainwindow.py
index 2ad9fb1..a5ebdb4 100644
--- a/pitivi/mainwindow.py
+++ b/pitivi/mainwindow.py
@@ -671,7 +671,7 @@ class PitiviMainWindow(Gtk.Window, Loggable):
def _aboutCb(self, unused_action):
abt = Gtk.AboutDialog()
abt.set_name(APPNAME)
- if in_devel:
+ if in_devel():
abt.set_version(_("Development version"))
else:
abt.set_version(pitivi_version)
diff --git a/pitivi/utils/misc.py b/pitivi/utils/misc.py
index 68886ab..a64800e 100644
--- a/pitivi/utils/misc.py
+++ b/pitivi/utils/misc.py
@@ -104,8 +104,9 @@ def in_devel():
Returns True if the current Pitivi instance is run from a git checkout
"""
try:
- # This code is the same as in the configure files
- root_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+ # This code is similar to configure.py.in, but we go up 3 dir levels
+ _parent = os.path.dirname
+ root_dir = _parent(_parent(_parent(os.path.abspath(__file__))))
return os.path.exists(os.path.join(root_dir, '.git'))
except:
return False
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]