Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Fachrat Informatik
pter
Commits
90827451
Commit
90827451
authored
Nov 25, 2020
by
dwoiwode
Browse files
Enable GUI when pad is approved
parent
32d77f58
Changes
1
Hide whitespace changes
Inline
Side-by-side
protokollGUI.py
View file @
90827451
...
...
@@ -46,9 +46,10 @@ class ProtokollGUI(tk.Tk):
self
.
currentPads
=
[
p
for
p
in
self
.
folders
[
folderName
]
if
isinstance
(
p
,
pter
.
ProtocolPad
)]
for
i
,
pad
in
enumerate
(
self
.
currentPads
):
assert
isinstance
(
pad
,
pter
.
ProtocolPad
)
tk
.
Label
(
self
.
padFrame
,
text
=
pad
.
source
.
url
,
anchor
=
tk
.
W
,
bg
=
"red"
).
grid
(
row
=
i
,
column
=
0
,
sticky
=
tk
.
W
)
# URL
tk
.
Label
(
self
.
padFrame
,
text
=
pad
.
date
,
anchor
=
tk
.
W
,
bg
=
"blue"
).
grid
(
row
=
i
,
column
=
1
)
# Date
approvedState
=
tk
.
NORMAL
if
pad
.
isApproved
else
tk
.
DISABLED
color
=
"green"
if
pad
.
isApproved
else
"red"
tk
.
Label
(
self
.
padFrame
,
text
=
pad
.
date
.
strftime
(
"%Y-%m-%d"
),
anchor
=
tk
.
W
).
grid
(
row
=
i
,
column
=
0
)
# Date
tk
.
Label
(
self
.
padFrame
,
text
=
pad
.
source
.
url
,
anchor
=
tk
.
W
).
grid
(
row
=
i
,
column
=
1
,
sticky
=
tk
.
W
)
# URL
# Button Download
btnDownload
=
tk
.
Button
(
self
.
padFrame
,
text
=
"Download"
,
command
=
pad
.
download
)
btnDownload
.
grid
(
row
=
i
,
column
=
2
)
...
...
@@ -62,16 +63,16 @@ class ProtokollGUI(tk.Tk):
btnMailFR
.
grid
(
row
=
i
,
column
=
4
)
# Button Mail FR-Info
btnMailFRInfo
=
tk
.
Button
(
self
.
padFrame
,
text
=
"FR-Info Mail"
,
state
=
tk
.
DISABLED
,
btnMailFRInfo
=
tk
.
Button
(
self
.
padFrame
,
text
=
"FR-Info Mail"
,
state
=
approvedState
,
bg
=
color
,
command
=
pad
.
sendMailAsApproved
)
btnMailFRInfo
.
grid
(
row
=
i
,
column
=
5
)
# Button Website
btnWebsite
=
tk
.
Button
(
self
.
padFrame
,
text
=
"Approved Website"
,
state
=
tk
.
DISABLED
,
command
=
pad
.
uploadToGrav
)
btnWebsite
=
tk
.
Button
(
self
.
padFrame
,
text
=
"Approved Website"
,
state
=
approvedState
,
bg
=
color
,
command
=
pad
.
uploadToGrav
)
btnWebsite
.
grid
(
row
=
i
,
column
=
6
)
# Button Cloud
btnCloud
=
tk
.
Button
(
self
.
padFrame
,
text
=
"Approved Cloud"
,
state
=
tk
.
DISABLED
,
command
=
pad
.
uploadToCloud
)
btnCloud
=
tk
.
Button
(
self
.
padFrame
,
text
=
"Approved Cloud"
,
state
=
approvedState
,
bg
=
color
,
command
=
pad
.
uploadToCloud
)
btnCloud
.
grid
(
row
=
i
,
column
=
7
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment