Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SipAndPuff4Butiá
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
Package registry
Model registry
Operate
Environments
Terraform modules
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
Santiago Freire Lopez
SipAndPuff4Butiá
Commits
fe0c0d15
Commit
fe0c0d15
authored
3 years ago
by
Santiago Freire Lopez
Browse files
Options
Downloads
Patches
Plain Diff
added restore to defaults option in settings gui
parent
759e9ac2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
principal.py
+20
-2
20 additions, 2 deletions
principal.py
with
20 additions
and
2 deletions
principal.py
+
20
−
2
View file @
fe0c0d15
...
...
@@ -300,7 +300,7 @@ def mouse(window,salgo):
while
etapa
==
0
and
salgo
==
False
:
#Si no recibo nada fuera de lo normal, no hago nada.
while
aspiro
==
0
and
soplido
==
0
and
salgo
==
False
and
event
not
in
{
'
Guardar
'
,
'
Ajustes
'
,
'
Salir
'
,
'
Guia Morse
'
,
'
Cambiar a teclado
'
}:
while
aspiro
==
0
and
soplido
==
0
and
salgo
==
False
and
event
not
in
{
'
Guardar
'
,
'
Ajustes
'
,
'
Salir
'
,
'
Guia Morse
'
,
'
Cambiar a teclado
'
,
'
Restaurar valores por defecto
'
}:
event
,
values
=
window
.
Read
(
timeout
=
10
)
soplido
=
robot
.
getButton
(
5
)
aspiro
=
robot
.
getButton
(
4
)
...
...
@@ -312,6 +312,24 @@ def mouse(window,salgo):
guardarAjustes
(
values
)
sg
.
PopupAutoClose
(
'
Ajustes guardados. Reinicie el programa para que tengan efecto.
'
,
keep_on_top
=
True
,
title
=
'
Aviso
'
)
#Reestablezco los ajustes a los predeterminados, en caso de que se ingrese una combinación de ajustes que haga imposible su uso
if
event
==
'
Restaurar valores por defecto
'
:
event
=
''
#Cambio el texto de los cuadros de texto
cambiarTextoGUI
(
'
__MSPEED__
'
,
window
,
'
10
'
)
cambiarTextoGUI
(
'
__KTIMEOUT__
'
,
window
,
'
10
'
)
cambiarTextoGUI
(
'
__STIMEOUT__
'
,
window
,
'
3
'
)
#Leo los nuevos valores
event
,
values
=
window
.
Read
(
timeout
=
10
)
#Guardo los ajustes con los valores reestablecidos
guardarAjustes
(
values
)
#Popup de información
sg
.
PopupAutoClose
(
'
Ajustes reestablecidos a predeterminados. Reinicie el programa para que el cambio tenga efecto.
'
,
keep_on_top
=
True
,
title
=
'
Aviso
'
)
#Cambio al módulo teclado
if
event
==
'
Cambiar a teclado
'
:
event
=
''
...
...
@@ -471,7 +489,7 @@ settingsLayout = [
[
sg
.
Text
(
'
Mouse:
'
,
font
=
(
'
Helvetica
'
,
10
,
'
underline
'
))],
[
sg
.
Text
(
'
Velocidad del Mouse (1-250)
'
,
size
=
(
45
,
1
)),
sg
.
InputText
(
mouseSpeed
,
size
=
(
20
,
1
),
key
=
'
__MSPEED__
'
)],
[
sg
.
Text
(
'
Tiempo de aspirado para cambiar a teclado (1-10 seg.)
'
,
size
=
(
45
,
1
)),
sg
.
InputText
(
sipTimeout
,
size
=
(
20
,
1
),
key
=
'
__STIMEOUT__
'
)],
[
sg
.
Button
(
'
Guardar
'
,
enable_events
=
True
)],
[
sg
.
Button
(
'
Guardar
'
,
enable_events
=
True
),
sg
.
Button
(
'
Restaurar valores por defecto
'
,
enable_events
=
True
)],
]
doubleLayout
=
[
...
...
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