Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
le-control-panel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
le6
le-control-panel
Commits
a8d0e6dc
There was a problem fetching the pipeline summary.
Commit
a8d0e6dc
authored
7 years ago
by
André Machado
Browse files
Options
Downloads
Patches
Plain Diff
Botões do Family Shield se atualizam corretamente
parent
cbf5809d
No related branches found
No related tags found
1 merge request
!4
added toggle on/off family shield on CP
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
le-control-panel.py
+13
-2
13 additions, 2 deletions
le-control-panel.py
with
13 additions
and
2 deletions
le-control-panel.py
+
13
−
2
View file @
a8d0e6dc
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
import
gi
import
gi
gi
.
require_version
(
'
Gtk
'
,
'
3.0
'
)
gi
.
require_version
(
'
Gtk
'
,
'
3.0
'
)
from
gi.repository
import
Gtk
from
gi.repository
import
Gtk
import
subprocess
# Esta classe armazena as funcoes que sao executadas
# Esta classe armazena as funcoes que sao executadas
# quando o usuario interage com os componentes da GUI
# quando o usuario interage com os componentes da GUI
...
@@ -64,15 +65,25 @@ def statusEpoptes():
...
@@ -64,15 +65,25 @@ def statusEpoptes():
return
True
return
True
def
getShieldLocalState
():
def
getShieldLocalState
():
return
True
proc
=
subprocess
.
Popen
(
"
family-shield --status
"
,
shell
=
True
,
stdout
=
subprocess
.
PIPE
)
if
proc
.
communicate
()[
0
].
find
(
"
enabled
"
)
!=
-
1
:
return
True
else
:
return
False
def
getShieldRedeState
():
def
getShieldRedeState
():
return
True
proc
=
subprocess
.
Popen
(
"
family-shield --status --network
"
,
shell
=
True
,
stdout
=
subprocess
.
PIPE
)
if
proc
.
communicate
()[
0
].
find
(
"
enabled
"
)
!=
-
1
:
return
True
else
:
return
False
def
getAtualizacaoState
():
def
getAtualizacaoState
():
# TODO: retornar o estado atual das atualizações automáticas
return
True
return
True
def
getPortalP2PState
():
def
getPortalP2PState
():
# TODO: retornar o estado do compartilhamento P2P
return
True
return
True
if
__name__
==
"
__main__
"
:
if
__name__
==
"
__main__
"
:
...
...
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