From 5a872acd870a0300ed80f79270b9f6d2cb27e2be Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Fri, 26 Feb 2016 16:09:09 +0300 Subject: [PATCH] Closes #103: Object list double click should call object.compose(). --- src/MainWindow.vala | 18 ++++++++++++++---- ui/glade/laview-desktop.glade | 1 + 2 files changed, 15 insertions(+), 4 deletions(-) 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 +