[gnome-subtitles] Fixed #596355 - title app bar shows previous srt played/viewed information.
- From: Pedro Daniel da Rocha Melo e Castro <pcastro src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-subtitles] Fixed #596355 - title app bar shows previous srt played/viewed information.
- Date: Sat, 26 Sep 2009 01:05:13 +0000 (UTC)
commit 63678184f6b2281cc3527bfa0063778e2cdfece4
Author: Pedro Castro <mail pedrocastro org>
Date: Sat Sep 26 02:04:54 2009 +0100
Fixed #596355 - title app bar shows previous srt played/viewed information.
src/GnomeSubtitles/Ui/MainUi.cs | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/src/GnomeSubtitles/Ui/MainUi.cs b/src/GnomeSubtitles/Ui/MainUi.cs
index 5024c33..66e953d 100644
--- a/src/GnomeSubtitles/Ui/MainUi.cs
+++ b/src/GnomeSubtitles/Ui/MainUi.cs
@@ -438,10 +438,12 @@ public class MainUi {
return true;
}
- private void UpdateTitleModificationStatus (bool modified) {
- string prefix = (modified ? "*" : String.Empty);
- window.Title = prefix + Base.Document.TextFile.Filename +
- " - " + Base.ExecutionContext.ApplicationName;
+ private void UpdateTitleModificationStatus (bool showFilename, bool modified) {
+ if (showFilename) {
+ string prefix = (modified ? "*" : String.Empty);
+ window.Title = prefix + Base.Document.TextFile.Filename + " - " + Base.ExecutionContext.ApplicationName;
+ }
+ else window.Title = Base.ExecutionContext.ApplicationName;
}
/* Event members */
@@ -452,6 +454,7 @@ public class MainUi {
}
private void OnBaseDocumentLoaded (Document document) {
+ UpdateTitleModificationStatus(true, false);
document.ModificationStatusChanged += OnBaseDocumentModificationStatusChanged;
}
@@ -459,11 +462,11 @@ public class MainUi {
if (document != null) {
document.ModificationStatusChanged -= OnBaseDocumentModificationStatusChanged;
}
- UpdateTitleModificationStatus(false);
+ UpdateTitleModificationStatus(false, false);
}
private void OnBaseDocumentModificationStatusChanged (bool modified) {
- UpdateTitleModificationStatus(modified);
+ UpdateTitleModificationStatus(true, modified);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]