Clone in a terminal:
Commit c6c2b23
Johan Mattsson - 2012-07-17T19:08:20+00:00
c6c2b239658f06f638301a6941dd63c64ec976a7johan.mattsson.m@gmail.com

set window title to font name

Changed files (2)

Diff

diff --git a/src/ContentDisplay.vala b/src/ContentDisplay.valaindex 6f7b927..1748715 100644--- a/src/ContentDisplay.vala+++ b/src/ContentDisplay.vala@@ -541,6 +541,7 @@ class ContentDisplay : FontDisplay { 				MainWindow.close_all_tabs (); 				f.load ((!)fn); 				+				MainWindow.get_singleton ().set_title (f.get_name ()); 				select_overview ();		 				Preferences.add_recent_files ((!) fn); 			}@@ -582,10 +583,12 @@ class ContentDisplay : FontDisplay { 			 			if (!unlikely (loaded)) { 				warning (@"Failed to load fond $fn");-			} else {-				Preferences.add_recent_files (fn);			-				select_overview ();+				return; 			}+			+			MainWindow.get_singleton ().set_title (f.get_name ());+			Preferences.add_recent_files (fn);			+			select_overview (); 		} 	} diff --git a/src/MainWindow.vala b/src/MainWindow.valaindex 3c7eae9..aa81dce 100644--- a/src/MainWindow.vala+++ b/src/MainWindow.vala@@ -37,7 +37,7 @@ public class MainWindow : Gtk.Window { 	static DrawingArea margin_bottom;
 	static DrawingArea margin_right;
 	
-	public MainWindow(string title) {
+	public MainWindow (string title) {
 		singleton = this;
 		
 		key_bindings = new KeyBindings ();

Contact

Email: johan.mattsson.m@gmail.com
Mastodon: typo.social/@birdfont
GitHub: johanmattssonm
LinkedIn: johan-mattsson-2ab324112