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
017b2988
Commit
017b2988
authored
3 years ago
by
Marko Mecina
Browse files
Options
Downloads
Patches
Plain Diff
add TST About dialog
parent
6c17f83b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Tst/tst/tst.cfg
+4
-4
4 additions, 4 deletions
Tst/tst/tst.cfg
Tst/tst/tst.py
+36
-5
36 additions, 5 deletions
Tst/tst/tst.py
with
40 additions
and
9 deletions
Tst/tst/tst.cfg
+
4
−
4
View file @
017b2988
...
@@ -14,11 +14,11 @@ output-file-path = ${paths:tst}/logs_test_runs/output_files/
...
@@ -14,11 +14,11 @@ output-file-path = ${paths:tst}/logs_test_runs/output_files/
[tst-preferences]
[tst-preferences]
show-json-view
=
True
show-json-view
=
True
main-window-height
=
10
16
main-window-height
=
10
90
main-window-width
=
1
848
main-window-width
=
1
920
paned-position
=
9
19
paned-position
=
9
53
paned-position-codeblockreuse
=
520
paned-position-codeblockreuse
=
520
[tst-history]
[tst-history]
last-folder
=
/home/
sebastian/CCS/Tst
/test
_
spec
s
last-folder
=
/home/
marko/space/smile/OBSW/Documentation
/testspec
/tst
This diff is collapsed.
Click to expand it.
Tst/tst/tst.py
+
36
−
5
View file @
017b2988
...
@@ -6,7 +6,7 @@ import time
...
@@ -6,7 +6,7 @@ import time
import
gi
import
gi
gi
.
require_version
(
'
Gtk
'
,
'
3.0
'
)
gi
.
require_version
(
'
Gtk
'
,
'
3.0
'
)
gi
.
require_version
(
'
GtkSource
'
,
'
3.0
'
)
gi
.
require_version
(
'
GtkSource
'
,
'
3.0
'
)
from
gi.repository
import
Gtk
,
Gdk
,
Gio
,
GtkSource
,
GLib
from
gi.repository
import
Gtk
,
Gdk
,
Gio
,
GtkSource
,
GLib
,
GdkPixbuf
import
confignator
import
confignator
import
sys
import
sys
sys
.
path
.
append
(
confignator
.
get_option
(
'
paths
'
,
'
ccs
'
))
sys
.
path
.
append
(
confignator
.
get_option
(
'
paths
'
,
'
ccs
'
))
...
@@ -31,9 +31,6 @@ import spec_to_json
...
@@ -31,9 +31,6 @@ import spec_to_json
# creating lists for type and subtype to get rid of duplicate entries, for TC List
# creating lists for type and subtype to get rid of duplicate entries, for TC List
path_icon
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'
style/tst.svg
'
)
path_icon
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'
style/tst.svg
'
)
menu_xml
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'
app_menu.xml
'
)
menu_xml
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'
app_menu.xml
'
)
css_file
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'
style/style.css
'
)
css_file
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'
style/style.css
'
)
...
@@ -49,6 +46,9 @@ file_hdlr = toolbox.create_file_handler(file=log_file)
...
@@ -49,6 +46,9 @@ file_hdlr = toolbox.create_file_handler(file=log_file)
logger
.
addHandler
(
hdlr
=
file_hdlr
)
logger
.
addHandler
(
hdlr
=
file_hdlr
)
VERSION
=
'
0.9
'
class
TstApp
(
Gtk
.
Application
):
class
TstApp
(
Gtk
.
Application
):
def
__init__
(
self
,
application_id
,
flags
,
logger
=
logger
):
def
__init__
(
self
,
application_id
,
flags
,
logger
=
logger
):
...
@@ -228,6 +228,10 @@ class TstAppWindow(Gtk.ApplicationWindow):
...
@@ -228,6 +228,10 @@ class TstAppWindow(Gtk.ApplicationWindow):
action
.
connect
(
'
activate
'
,
self
.
on_apply_css
)
action
.
connect
(
'
activate
'
,
self
.
on_apply_css
)
self
.
add_action
(
action
)
self
.
add_action
(
action
)
action
=
Gio
.
SimpleAction
.
new
(
'
about_us
'
,
None
)
action
.
connect
(
'
activate
'
,
self
.
on_about
)
self
.
add_action
(
action
)
self
.
create_make_menu
()
self
.
create_make_menu
()
self
.
set_icon_from_file
(
path_icon
)
self
.
set_icon_from_file
(
path_icon
)
...
@@ -280,8 +284,21 @@ class TstAppWindow(Gtk.ApplicationWindow):
...
@@ -280,8 +284,21 @@ class TstAppWindow(Gtk.ApplicationWindow):
self
.
toolbar
.
insert
(
self
.
btn_generate_products
,
3
)
self
.
toolbar
.
insert
(
self
.
btn_generate_products
,
3
)
self
.
toolbar
.
insert
(
self
.
btn_start_ccs_editor
,
4
)
self
.
toolbar
.
insert
(
self
.
btn_start_ccs_editor
,
4
)
self
.
toolbar
.
insert
(
self
.
btn_open_progress_view
,
5
)
self
.
toolbar
.
insert
(
self
.
btn_open_progress_view
,
5
)
# logo
sepa
=
Gtk
.
SeparatorToolItem
()
sepa
.
set_expand
(
True
)
self
.
toolbar
.
insert
(
sepa
,
6
)
self
.
unilogo
=
Gtk
.
ToolButton
()
pixbuf
=
GdkPixbuf
.
Pixbuf
.
new_from_file_at_size
(
confignator
.
get_option
(
'
paths
'
,
'
ccs
'
)
+
'
/pixmap/Icon_Space_blau_en.png
'
,
32
,
32
)
icon
=
Gtk
.
Image
.
new_from_pixbuf
(
pixbuf
)
self
.
unilogo
.
set_icon_widget
(
icon
)
#self.unilogo.set_tooltip_text('New test specification')
self
.
unilogo
.
connect
(
'
clicked
'
,
self
.
on_about
)
self
.
toolbar
.
insert
(
self
.
unilogo
,
7
)
self
.
box
.
pack_start
(
self
.
toolbar
,
False
,
True
,
0
)
self
.
box
.
pack_start
(
self
.
toolbar
,
False
,
True
,
0
)
self
.
info_bar
=
None
self
.
info_bar
=
None
# packing the widgets
# packing the widgets
...
@@ -1021,6 +1038,20 @@ class TstAppWindow(Gtk.ApplicationWindow):
...
@@ -1021,6 +1038,20 @@ class TstAppWindow(Gtk.ApplicationWindow):
Gtk
.
STYLE_PROVIDER_PRIORITY_APPLICATION
)
Gtk
.
STYLE_PROVIDER_PRIORITY_APPLICATION
)
Gtk
.
StyleContext
.
reset_widgets
(
Gdk
.
Screen
.
get_default
())
Gtk
.
StyleContext
.
reset_widgets
(
Gdk
.
Screen
.
get_default
())
def
on_about
(
self
,
*
args
):
about_dialog
=
Gtk
.
AboutDialog
(
transient_for
=
self
,
modal
=
True
)
about_dialog
.
set_authors
([
'
Stefan Winkler
'
,
'
Dominik Möslinger
'
,
'
Sebastian Miksch
'
,
'
Marko Mecina
'
])
about_dialog
.
set_website
(
'
https://space.univie.ac.at/en
'
)
about_dialog
.
set_website_label
(
'
space.univie.ac.at
'
)
about_dialog
.
set_version
(
VERSION
)
pixbuf
=
GdkPixbuf
.
Pixbuf
.
new_from_file
(
style_path
+
'
/tst.png
'
)
about_dialog
.
set_logo
(
pixbuf
)
about_dialog
.
set_program_name
(
'
Test Specification Tool
'
)
about_dialog
.
set_copyright
(
'
UVIE 11/2021
'
)
about_dialog
.
set_license_type
(
Gtk
.
License
.
GPL_2_0
)
about_dialog
.
present
()
return
class
ViewModelAsJson
(
Gtk
.
Box
):
class
ViewModelAsJson
(
Gtk
.
Box
):
def
__init__
(
self
,
*
args
,
**
kwargs
):
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
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