Merge pull request #1 from ConnyOnny/master
[lilass.git] / qt_dialogue.py
index 96c04a73e74c6e3f9a6e2205d5b1c7a47a8da727..26f6717df32a95b82531fe899c04c6e56cc4ffc6 100644 (file)
@@ -18,15 +18,6 @@ import os
 from screen import RelativeScreenPosition, ScreenSetup
 from PyQt4 import QtCore, QtGui, uic
 
-relPosNames = {
-    RelativeScreenPosition.LEFT: "left of",
-    RelativeScreenPosition.RIGHT: "right of",
-    RelativeScreenPosition.ABOVE: "above",
-    RelativeScreenPosition.BELOW: "below",
-    RelativeScreenPosition.MIRROR: "same as",
-}
-
-
 class PositionSelection(QtGui.QDialog):
     def __init__(self, situation):
         # set up main window
@@ -37,7 +28,7 @@ class PositionSelection(QtGui.QDialog):
         
         # fill relative position box
         for pos in RelativeScreenPosition:
-            self.relPos.addItem(relPosNames[pos], pos)
+            self.relPos.addItem(pos.text, pos)
         
         # keep resolutions in sync when in mirror mode
         def syncIfMirror(source, target):