projects
/
lilass.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fb24d60
)
fix the zenity backend to work. it doesn't provide all the possible functionality...
author
Ralf Jung
<post@ralfj.de>
Mon, 9 Mar 2015 09:56:04 +0000
(10:56 +0100)
committer
Ralf Jung
<post@ralfj.de>
Mon, 9 Mar 2015 09:56:04 +0000
(10:56 +0100)
gui.py
patch
|
blob
|
history
zenity_dialogue.py
patch
|
blob
|
history
diff --git
a/gui.py
b/gui.py
index c1f045d6c1d5ecdeae46f46307c821aaa73f9386..998783f65c68f4c7372af00771768607f035bdb3 100644
(file)
--- a/
gui.py
+++ b/
gui.py
@@
-68,7
+68,7
@@
class ZenityFrontend:
@staticmethod
def isAvailable():
try:
@staticmethod
def isAvailable():
try:
- from
dsl
import processOutputIt
+ from
screen
import processOutputIt
processOutputIt("zenity", "--version")
return True
except Exception:
processOutputIt("zenity", "--version")
return True
except Exception:
diff --git
a/zenity_dialogue.py
b/zenity_dialogue.py
index b5e72d07d7f331b1cb77255f221f5859c160f9e4..7dbbc877a34c50ee2dd47eef30d12cd2fffcb30f 100644
(file)
--- a/
zenity_dialogue.py
+++ b/
zenity_dialogue.py
@@
-31,18
+31,12
@@
def userChoose (title, choices, returns, fallback):
return fallback
def run (internalResolutions, externalResolutions):
return fallback
def run (internalResolutions, externalResolutions):
- relpos = userChoose ("Position of external screen", ["Left of internal screen", "Right of internal screen"
, "Use external screen only"], [RelativeScreenPosition.LEFT, RelativeScreenPosition.RIGHT, RelativeScreenPosition.EXTERNAL_ONLY
], None)
+ relpos = userChoose ("Position of external screen", ["Left of internal screen", "Right of internal screen"
], [RelativeScreenPosition.LEFT, RelativeScreenPosition.RIGHT
], None)
if relpos == None:
return None
intres = internalResolutions[0]
extres = externalResolutions[0]
if relpos == None:
return None
intres = internalResolutions[0]
extres = externalResolutions[0]
- extprim = None
- if relpos != RelativeScreenPosition.EXTERNAL_ONLY:
- intres = userChoose ("internal display resolution", list(map(str,internalResolutions)), internalResolutions, None)
- if intres == None:
- return None
- else:
- extprim = True
+ extprim = True
extres = userChoose ("external display resolution", list(map(str,externalResolutions)), externalResolutions, None)
if extres == None:
return None
extres = userChoose ("external display resolution", list(map(str,externalResolutions)), externalResolutions, None)
if extres == None:
return None
@@
-50,4
+44,4
@@
def run (internalResolutions, externalResolutions):
extprim = userChoose ("Which display should be the primary display?", ["internal display", "external display"], [False, True], None)
if extprim == None:
return None
extprim = userChoose ("Which display should be the primary display?", ["internal display", "external display"], [False, True], None)
if extprim == None:
return None
- return ScreenSetup(intres,
extres,relpos,
extprim)
+ return ScreenSetup(intres,
extres, relpos, extIsPrimary =
extprim)