Browse Source

Closes #103: Object list double click should call object.compose().

develop
Kolan Sh 5 years ago
parent
commit
5a872acd87
2 changed files with 15 additions and 4 deletions
  1. +14
    -4
      src/MainWindow.vala
  2. +1
    -0
      ui/glade/laview-desktop.glade

+ 14
- 4
src/MainWindow.vala View File

@ -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();


+ 1
- 0
ui/glade/laview-desktop.glade View File

@ -988,6 +988,7 @@
<property name="can_focus">True</property>
<property name="model">liststore_objects</property>
<signal name="cursor-changed" handler="laview_desktop_main_window_objects_cursor_changed" swapped="no"/>
<signal name="row-activated" handler="laview_desktop_main_window_objects_activated" swapped="no"/>
<child internal-child="selection">
<object class="GtkTreeSelection" id="treeview-selection_objects"/>
</child>


Loading…
Cancel
Save