Skip to content
Snippets Groups Projects
Commit d5e31f56 authored by ptangu01's avatar ptangu01
Browse files

refactoring method name and variabls to fit with changement in xAAL stack for PEP8 support

git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/trunk@1365 b32b6428-25c9-4566-ad07-03861ab6144f
parent 86c74294
Branches
No related tags found
No related merge requests found
......@@ -20,6 +20,8 @@
from __future__ import print_function
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk,GObject
# xAAL
......@@ -34,11 +36,11 @@ class DummySwitch(xAAL.devices.Device):
def toggle(self):
attr = self.__pos
if attr.getValue()==True:
attr.setValue(False)
if attr.get_value()==True:
attr.set_value(False)
else:
attr.setValue(True)
return attr.getValue()
attr.set_value(True)
return attr.get_value()
class MyWindow(Gtk.Window):
......@@ -54,12 +56,12 @@ class MyWindow(Gtk.Window):
def setup(self):
""" create xAAlEngine, buttons and wraps each other"""
addr = xAAL.tools.getConfigFileAddr('DummyGtkSwitches')
addr = xAAL.tools.get_cfg_addr('DummyGtkSwitches')
self.engine = xAAL.core.Engine()
for i in range(0,5):
obj = DummySwitch('%s%s' % (addr[0:-1],i)) # uggly addr manipulation
self.engine.registerDevices([obj,])
self.engine.register_devices([obj,])
button = Gtk.CheckButton(label="ON/OFF switch %s " % i)
button.connect_data("clicked", self.on_button_clicked,obj)
self.vbox.add(button)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment