Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CCS
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marko Mecina
CCS
Commits
b4d6d7b6
Commit
b4d6d7b6
authored
3 years ago
by
Sebastian
Browse files
Options
Downloads
Patches
Plain Diff
implemented drag and drop for data pool
parent
ba720ffb
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Tst/tst/data_pool_tab.py
+23
-0
23 additions, 0 deletions
Tst/tst/data_pool_tab.py
Tst/tst/tst.cfg
+3
-3
3 additions, 3 deletions
Tst/tst/tst.cfg
start_ccs.py
+4
-4
4 additions, 4 deletions
start_ccs.py
with
30 additions
and
7 deletions
Tst/tst/data_pool_tab.py
+
23
−
0
View file @
b4d6d7b6
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Tst/tst/tst.cfg
+
3
−
3
View file @
b4d6d7b6
...
...
@@ -14,11 +14,11 @@ output-file-path = ${paths:tst}/logs_test_runs/output_files/
[tst-preferences]
show-json-view
=
True
main-window-height
=
10
16
main-window-width
=
1
848
main-window-height
=
10
43
main-window-width
=
1
920
paned-position
=
919
paned-position-codeblockreuse
=
520
[tst-history]
last-folder
=
/home/sebastian/
CCS/Tst
/test
_
spec
s
last-folder
=
/home/sebastian/
OBSW/Documentation
/testspec
/tst
This diff is collapsed.
Click to expand it.
start_ccs.py
+
4
−
4
View file @
b4d6d7b6
...
...
@@ -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
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment