[pitivi] Autofill the author's name in the project metadata
- From: Edward Hervey <edwardrv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] Autofill the author's name in the project metadata
- Date: Fri, 10 Dec 2010 17:54:03 +0000 (UTC)
commit 4e9756b08290d302e03582ab872c8068acaf17b5
Author: Jean-François Fortin Tam <nekohayo gmail com>
Date: Thu Nov 25 21:58:35 2010 -0500
Autofill the author's name in the project metadata
pitivi/ui/projectsettings.glade | 2 +-
pitivi/ui/projectsettings.py | 5 +++++
2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/ui/projectsettings.glade b/pitivi/ui/projectsettings.glade
index b4fbb18..c84021c 100644
--- a/pitivi/ui/projectsettings.glade
+++ b/pitivi/ui/projectsettings.glade
@@ -608,7 +608,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">â??</property>
- <property name="text" translatable="yes">(auto-filled from gnome's settings)</property>
+ <property name="text" translatable="yes"></property>
</widget>
<packing>
<property name="left_attach">1</property>
diff --git a/pitivi/ui/projectsettings.py b/pitivi/ui/projectsettings.py
index 90e9784..b708e12 100644
--- a/pitivi/ui/projectsettings.py
+++ b/pitivi/ui/projectsettings.py
@@ -26,6 +26,8 @@ Dialog box for project settings
import gtk
import gst
+import os
+from pwd import getpwuid
from datetime import datetime
from gettext import gettext as _
from pitivi.ui.glade import GladeWindow
@@ -108,6 +110,9 @@ class ProjectSettingsDialog(GladeWindow):
# FIXME: not saved in the project file
if self.year_spinbutton.get_value_as_int() == 1900:
self.year_spinbutton.set_value(datetime.now().year)
+ if self.author_entry.get_text() == "":
+ self.full_user_name = getpwuid(os.getuid()).pw_gecos.split(",")[0]
+ self.author_entry.set_text(self.full_user_name)
# behavior
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]