Handle AppCore.core.get_objects_list exceptions.
This commit is contained in:
parent
514c36efd4
commit
755a69fd9e
|
@ -242,6 +242,7 @@ namespace LAview.Desktop {
|
||||||
public void templates_cursor_changed (Gtk.TreeView treeview) {
|
public void templates_cursor_changed (Gtk.TreeView treeview) {
|
||||||
var indices = get_template_indices ();
|
var indices = get_template_indices ();
|
||||||
if (indices.length != 0) {
|
if (indices.length != 0) {
|
||||||
|
try {
|
||||||
var doc_objects = AppCore.core.get_objects_list (indices[0]);
|
var doc_objects = AppCore.core.get_objects_list (indices[0]);
|
||||||
liststore_doc_objects.clear();
|
liststore_doc_objects.clear();
|
||||||
Gtk.TreeIter iter = Gtk.TreeIter();
|
Gtk.TreeIter iter = Gtk.TreeIter();
|
||||||
|
@ -249,6 +250,13 @@ namespace LAview.Desktop {
|
||||||
liststore_doc_objects.append (out iter);
|
liststore_doc_objects.append (out iter);
|
||||||
liststore_doc_objects.set (iter, 0, t);
|
liststore_doc_objects.set (iter, 0, t);
|
||||||
}
|
}
|
||||||
|
} catch (Error err) {
|
||||||
|
var msg = new MessageDialog (window, DialogFlags.MODAL, MessageType.ERROR,
|
||||||
|
ButtonsType.CLOSE, _("Error")+@": $(err.message).");
|
||||||
|
msg.response.connect ((response_id) => { msg.destroy (); } );
|
||||||
|
msg.show ();
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
statusbar_show (_("Document analized, select an object and set it's properties."));
|
statusbar_show (_("Document analized, select an object and set it's properties."));
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,6 @@ namespace LAview.Desktop {
|
||||||
}
|
}
|
||||||
|
|
||||||
~LAviewDesktopApp () {
|
~LAviewDesktopApp () {
|
||||||
print ("~LAviewDesktopApp()\n");
|
|
||||||
Resources.terminate ();
|
Resources.terminate ();
|
||||||
AppCore.terminate ();
|
AppCore.terminate ();
|
||||||
AppDirs.terminate ();
|
AppDirs.terminate ();
|
||||||
|
|
Loading…
Reference in New Issue