diff --git a/Tst/tst/data_pool_tab.py b/Tst/tst/data_pool_tab.py index 263f3c036d3433c7509df2a3a8f27eb7322130e3..4e36de9527a2d52275aa2a286ad9f552ac1edd29 100644 --- a/Tst/tst/data_pool_tab.py +++ b/Tst/tst/data_pool_tab.py @@ -99,6 +99,14 @@ class DataPoolTable(Gtk.Grid): self.scrollable_treelist.add(self.treeview) + # Set up Drag and Drop + self.treeview.drag_source_set(Gdk.ModifierType.BUTTON1_MASK, [], Gdk.DragAction.COPY) + self.treeview.drag_source_set_target_list(None) + self.treeview.drag_source_add_text_targets() + + self.treeview.connect("drag-data-get", self.on_drag_data_get) + self.treeview.connect("drag-begin", self.on_drag_begin) + self.show_all() @@ -120,6 +128,9 @@ class DataPoolTable(Gtk.Grid): def item_selected(self, selection): model, row = selection.get_selected() if row is not None: + global pid + pid = model[row][0] + else: pass @@ -133,3 +144,15 @@ class DataPoolTable(Gtk.Grid): return True else: return model[iter][0] == self.current_filter_data_pool + + + + + def on_drag_data_get(self, treeview, drag_context, selection_data, info, time, *args): + treeselection = treeview.get_selection() + model, my_iter = treeselection.get_selected() + selection_data.set_text(pid, -1) + + + def on_drag_begin(self, *args): + pass diff --git a/Tst/tst/tst.cfg b/Tst/tst/tst.cfg index 12ad269abae8c2ceb61015e90d67da7fc73d5d5b..1030e094406664cc532f78b51c46c121cefe819c 100644 --- a/Tst/tst/tst.cfg +++ b/Tst/tst/tst.cfg @@ -14,11 +14,11 @@ output-file-path = ${paths:tst}/logs_test_runs/output_files/ [tst-preferences] show-json-view = True -main-window-height = 1016 -main-window-width = 1848 +main-window-height = 1043 +main-window-width = 1920 paned-position = 919 paned-position-codeblockreuse = 520 [tst-history] -last-folder = /home/sebastian/CCS/Tst/test_specs +last-folder = /home/sebastian/OBSW/Documentation/testspec/tst diff --git a/start_ccs.py b/start_ccs.py index dbb8c160eb660d0beb62c506d958fe7f8e6d66aa..8ff0a701e8640eb989cafaa7cfbc6292daa6339a 100755 --- a/start_ccs.py +++ b/start_ccs.py @@ -8,8 +8,8 @@ import ccs_function_lib as cfl if __name__ == '__main__': - files_to_open = ( - os.path.join(confignator.get_option('paths', 'tst'), 'prep_test_env.py'), - os.path.join(confignator.get_option('paths', 'obsw'), 'send_TC.py') - ) + files_to_open = () + # os.path.join(confignator.get_option('paths', 'tst'), 'prep_test_env.py'), + # os.path.join(confignator.get_option('paths', 'obsw'), 'send_TC.py') + cfl.start_editor(False, *files_to_open)