Implemented theme-bg option.
[drlaunch] / src / win_config.py
index ba0eac2..92ff48d 100755 (executable)
@@ -65,7 +65,7 @@ class WinConfig(StackableWindow): #, FremantleRotation):
 #1     self.pa.add_with_viewport(hbox)
 
        # Add the first column of options
-       al=gtk.Alignment(yscale=0)
+       al=gtk.Alignment(yscale=1)
 #1     hbox.add(al)
 
        vbox=gtk.VBox()
@@ -107,6 +107,15 @@ class WinConfig(StackableWindow): #, FremantleRotation):
 
            hbox2.add(but)
 
+       vbox2=gtk.VBox()
+
+       al=gtk.Alignment(xalign=0, yalign=1, xscale=1)
+       al.add(vbox2)
+       self.col11=al
+
+       vbox.add(al)
+       vbox=vbox2
+
        but=hildon.CheckButton(
                gtk.HILDON_SIZE_AUTO_WIDTH | gtk.HILDON_SIZE_FINGER_HEIGHT)
        but.set_label("Rotate icons individually")
@@ -137,6 +146,13 @@ class WinConfig(StackableWindow): #, FremantleRotation):
 
        but=hildon.CheckButton(
                gtk.HILDON_SIZE_AUTO_WIDTH | gtk.HILDON_SIZE_FINGER_HEIGHT)
+       but.set_label("Theme background")
+       #but.connect('toggled', self.slotButtonNoBackground)
+       self.buttonThemeBackground=but
+       vbox.add(but)
+
+       but=hildon.CheckButton(
+               gtk.HILDON_SIZE_AUTO_WIDTH | gtk.HILDON_SIZE_FINGER_HEIGHT)
        but.set_label("No background")
        #but.connect('toggled', self.slotButtonNoBackground)
        self.buttonNoBackground=but
@@ -172,6 +188,7 @@ class WinConfig(StackableWindow): #, FremantleRotation):
        self.setLongpress(self.config.getLongpress())
        self.setAnimate(self.config.getAnimate())
        self.setNoBg(self.config.getNoBg())
+       self.setThemeBg(self.config.getThemeBg())
 
        hbox=gtk.HBox()
        hbox.add(self.col1)
@@ -344,6 +361,9 @@ class WinConfig(StackableWindow): #, FremantleRotation):
     def setNoBg(self, nobg):
        self.buttonNoBackground.set_active(nobg)
 
+    def setThemeBg(self, themebg):
+       self.buttonThemeBackground.set_active(themebg)
+
     def doConfig(self, icon):
        aps=apps.scan()
 
@@ -433,6 +453,7 @@ class WinConfig(StackableWindow): #, FremantleRotation):
        lp=self.buttonRequireLongpress.get_active()
        ar=self.buttonAnimateRotation.get_active()
        nobg=self.buttonNoBackground.get_active()
+       themebg=self.buttonThemeBackground.get_active()
 
        ret={
            'size':         sz,
@@ -441,6 +462,7 @@ class WinConfig(StackableWindow): #, FremantleRotation):
            'longpress':    lp,
            'animate':      ar,
            'nobg':         nobg,
+           'themebg':      themebg,
            }
 
        return(ret)