[pitivi] mainwindow: Show a title when the startup wizard is visible
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] mainwindow: Show a title when the startup wizard is visible
- Date: Wed, 24 Sep 2014 17:05:56 +0000 (UTC)
commit 3540cb9f5b232d02694d2b88e97e0fad9501c014
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Tue Apr 29 13:48:07 2014 +0200
mainwindow: Show a title when the startup wizard is visible
pitivi/mainwindow.py | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
---
diff --git a/pitivi/mainwindow.py b/pitivi/mainwindow.py
index 4d05460..7920a30 100644
--- a/pitivi/mainwindow.py
+++ b/pitivi/mainwindow.py
@@ -214,7 +214,6 @@ class PitiviMainWindow(Gtk.ApplicationWindow, Loggable):
The full hierarchy is also visible with accessibility tools like "sniff"
"""
- self.set_title("%s" % APPNAME)
self.set_icon_name("pitivi")
vbox = Gtk.VBox(homogeneous=False)
self.add(vbox)
@@ -331,6 +330,7 @@ class PitiviMainWindow(Gtk.ApplicationWindow, Loggable):
# Focus the timeline by default!
self.timeline_ui.grab_focus()
+ self.updateTitle()
def switchContextTab(self, bElement):
"""
@@ -1145,15 +1145,18 @@ class PitiviMainWindow(Gtk.ApplicationWindow, Loggable):
return ret
def updateTitle(self):
- name = touched = ""
- if self.app.project_manager.current_project:
- if self.app.project_manager.current_project.name:
- name = self.app.project_manager.current_project.name
+ project = self.app.project_manager.current_project
+ if project:
+ if project.name:
+ name = project.name
else:
name = _("Untitled")
- if self.app.project_manager.current_project.hasUnsavedModifications():
- touched = "*"
- title = "%s%s — %s" % (touched, name, APPNAME)
+ unsaved_mark = ""
+ if project.hasUnsavedModifications():
+ unsaved_mark = "*"
+ title = "%s%s — %s" % (unsaved_mark, name, APPNAME)
+ else:
+ title = APPNAME
self._headerbar.set_title(title)
self.set_title(title)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]