Object List: Show ready flag for composed objects.

This commit is contained in:
Kolan Sh 2016-04-08 03:32:57 +03:00
parent db189624ce
commit fbe3ef30aa
1 changed files with 22 additions and 16 deletions

View File

@ -167,6 +167,7 @@ namespace LAview.Desktop {
var o_indices = get_objects_indices (); var o_indices = get_objects_indices ();
if (t_indices.length != 0 && o_indices.length != 0) { if (t_indices.length != 0 && o_indices.length != 0) {
AppCore.core.compose_object (window, t_indices[0], o_indices[0]); AppCore.core.compose_object (window, t_indices[0], o_indices[0]);
fill_objects_list ();
statusbar_show (_("After composing all objects print the document.")); statusbar_show (_("After composing all objects print the document."));
} else { } else {
statusbar_show (_("Select an object first.")); statusbar_show (_("Select an object first."));
@ -271,26 +272,31 @@ namespace LAview.Desktop {
edit_selected_templates (); edit_selected_templates ();
} }
[CCode (instance_pos = -1)] void fill_objects_list () throws Error {
public void templates_cursor_changed (Gtk.TreeView treeview) { liststore_doc_objects.clear();
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]); Gtk.TreeIter iter = Gtk.TreeIter();
liststore_doc_objects.clear(); foreach (var t in doc_objects) {
Gtk.TreeIter iter = Gtk.TreeIter(); liststore_doc_objects.append (out iter);
foreach (var t in doc_objects) { liststore_doc_objects.set (iter, 0, t);
liststore_doc_objects.append (out iter);
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;
} }
} }
}
[CCode (instance_pos = -1)]
public void templates_cursor_changed (Gtk.TreeView treeview) {
try {
fill_objects_list ();
} 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."));
} }