diff --git a/src/MainWindow.vala b/src/MainWindow.vala
index 11e1f3f..9b7417d 100644
--- a/src/MainWindow.vala
+++ b/src/MainWindow.vala
@@ -161,16 +161,26 @@ namespace LAview.Desktop {
return indices;
}
- [CCode (instance_pos = -1)]
- public void action_compose_activate (Gtk.Action action) {
+ void compose_object () {
var t_indices = get_template_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 (t_indices[0], o_indices[0]);
- }
statusbar_show (_("After composing all objects print the document."));
}
+ [CCode (instance_pos = -1)]
+ public void action_compose_activate (Gtk.Action action) {
+ compose_object();
+ }
+
+ [CCode (instance_pos = -1)]
+ public void objects_activated (Gtk.TreeView treeview,
+ Gtk.TreePath path,
+ Gtk.TreeViewColumn column) {
+ compose_object();
+ }
+
[CCode (instance_pos = -1)]
public void action_edit_result_activate (Gtk.Action action) {
var indices = get_template_indices();
diff --git a/ui/glade/laview-desktop.glade b/ui/glade/laview-desktop.glade
index 7584ecf..8de6936 100644
--- a/ui/glade/laview-desktop.glade
+++ b/ui/glade/laview-desktop.glade
@@ -988,6 +988,7 @@
True
liststore_objects
+