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 ();
if (t_indices.length != 0 && o_indices.length != 0) {
AppCore.core.compose_object (window, t_indices[0], o_indices[0]);
fill_objects_list ();
statusbar_show (_("After composing all objects print the document."));
} else {
statusbar_show (_("Select an object first."));
@ -271,18 +272,23 @@ namespace LAview.Desktop {
edit_selected_templates ();
}
[CCode (instance_pos = -1)]
public void templates_cursor_changed (Gtk.TreeView treeview) {
void fill_objects_list () throws Error {
liststore_doc_objects.clear();
var indices = get_template_indices ();
if (indices.length != 0) {
try {
var doc_objects = AppCore.core.get_objects_list (indices[0]);
liststore_doc_objects.clear();
Gtk.TreeIter iter = Gtk.TreeIter();
foreach (var t in doc_objects) {
liststore_doc_objects.append (out iter);
liststore_doc_objects.set (iter, 0, t);
}
}
}
[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);
@ -290,7 +296,7 @@ namespace LAview.Desktop {
msg.show ();
return;
}
}
statusbar_show (_("Document analized, select an object and set it's properties."));
}