Clone in a terminal:
Commit a565bc8
Johan Mattsson - 2012-05-18T10:52:48+00:00
a565bc8b47c57111f5bc2eeecaa15ed34e30c9f7johan.mattsson.m@gmail.com

catch glib error in ContentDisplay

Changed files (1)

Diff

diff --git a/src/ContentDisplay.vala b/src/ContentDisplay.valaindex a6e5829..6f7b927 100644--- a/src/ContentDisplay.vala+++ b/src/ContentDisplay.vala@@ -523,7 +523,11 @@ class ContentDisplay : FontDisplay { 		FileChooserDialog file_chooser = new FileChooserDialog ("Open font file", MainWindow.get_current_window (), FileChooserAction.OPEN, Stock.CANCEL, ResponseType.CANCEL, Stock.OPEN, ResponseType.ACCEPT); 		Font f = Supplement.get_current_font (); 		-		file_chooser.set_current_folder_file (f.get_folder ());+		try {+			file_chooser.set_current_folder_file (f.get_folder ());+		} catch (GLib.Error e) {+			stderr.printf (e.message);+		} 		 		if (file_chooser.run () == ResponseType.ACCEPT) {	 			MainWindow.get_glyph_canvas ().redraw ();

Contact

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