diff --git a/configure.ac b/configure.ac index 35e67f8e..8b0dab09 100644 --- a/configure.ac +++ b/configure.ac @@ -130,10 +130,12 @@ shell/intro/Makefile shell/hardware/Makefile shell/view/Makefile shell/view/devices/Makefile +shell/view/devices/network/Makefile shell/view/frame/Makefile shell/view/home/Makefile shell/model/Makefile shell/model/devices/Makefile +shell/model/devices/network/Makefile services/console/lib/Makefile services/console/lib/procmem/Makefile services/console/Makefile diff --git a/shell/model/devices/Makefile.am b/shell/model/devices/Makefile.am index f798c96c..5440eeba 100644 --- a/shell/model/devices/Makefile.am +++ b/shell/model/devices/Makefile.am @@ -1,8 +1,8 @@ +SUBDIRS = network + sugardir = $(pkgdatadir)/shell/model/devices sugar_PYTHON = \ __init__.py \ device.py \ devicesmodel.py \ - battery.py \ - wirednetwork.py \ - wirelessnetwork.py + battery.py diff --git a/shell/model/devices/devicesmodel.py b/shell/model/devices/devicesmodel.py index df5e6fa0..3caa0391 100644 --- a/shell/model/devices/devicesmodel.py +++ b/shell/model/devices/devicesmodel.py @@ -1,8 +1,8 @@ import gobject from model.devices import device -from model.devices import wirednetwork -from model.devices import wirelessnetwork +from model.devices.network import wired +from model.devices.network import wireless from model.devices import battery from hardware import hardwaremanager from hardware import nmclient @@ -59,7 +59,7 @@ class DevicesModel(gobject.GObject): return self._devices[nm_device.get_op()] def _add_network_device(self, nm_device): - self.add_device(wirelessnetwork.Device(nm_device)) + self.add_device(wireless.Device(nm_device)) nm_device.connect('state-changed', self._network_device_state_changed_cb) diff --git a/shell/model/devices/network/Makefile.am b/shell/model/devices/network/Makefile.am new file mode 100644 index 00000000..3801a148 --- /dev/null +++ b/shell/model/devices/network/Makefile.am @@ -0,0 +1,5 @@ +sugardir = $(pkgdatadir)/shell/model/devices/network +sugar_PYTHON = \ + __init__.py \ + wired.py \ + wireless.py diff --git a/shell/model/devices/network/__init__.py b/shell/model/devices/network/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/shell/model/devices/wirednetwork.py b/shell/model/devices/network/wired.py similarity index 89% rename from shell/model/devices/wirednetwork.py rename to shell/model/devices/network/wired.py index 5ea0bb69..ff791be3 100644 --- a/shell/model/devices/wirednetwork.py +++ b/shell/model/devices/network/wired.py @@ -9,4 +9,4 @@ class Device(device.Device): return self._nm_device.get_op() def get_type(self): - return 'wirednetwork' + return 'network.wired' diff --git a/shell/model/devices/wirelessnetwork.py b/shell/model/devices/network/wireless.py similarity index 98% rename from shell/model/devices/wirelessnetwork.py rename to shell/model/devices/network/wireless.py index 50793b5c..826f726e 100644 --- a/shell/model/devices/wirelessnetwork.py +++ b/shell/model/devices/network/wireless.py @@ -70,7 +70,7 @@ class Device(device.Device): return _nm_state_to_state[nm_state] def get_type(self): - return 'wirelessnetwork' + return 'network.wireless' def get_id(self): return self._nm_device.get_op() diff --git a/shell/view/devices/Makefile.am b/shell/view/devices/Makefile.am index d48504da..c040beb8 100644 --- a/shell/view/devices/Makefile.am +++ b/shell/view/devices/Makefile.am @@ -1,7 +1,7 @@ +SUBDIRS = network + sugardir = $(pkgdatadir)/shell/view/devices sugar_PYTHON = \ __init__.py \ battery.py \ - deviceview.py \ - wirednetwork.py \ - wirelessnetwork.py + deviceview.py diff --git a/shell/view/devices/network/Makefile.am b/shell/view/devices/network/Makefile.am new file mode 100644 index 00000000..3c21490c --- /dev/null +++ b/shell/view/devices/network/Makefile.am @@ -0,0 +1,5 @@ +sugardir = $(pkgdatadir)/shell/view/devices/network +sugar_PYTHON = \ + __init__.py \ + wired.py \ + wireless.py diff --git a/shell/view/devices/network/__init__.py b/shell/view/devices/network/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/shell/view/devices/wirednetwork.py b/shell/view/devices/network/wired.py similarity index 100% rename from shell/view/devices/wirednetwork.py rename to shell/view/devices/network/wired.py diff --git a/shell/view/devices/wirelessnetwork.py b/shell/view/devices/network/wireless.py similarity index 91% rename from shell/view/devices/wirelessnetwork.py rename to shell/view/devices/network/wireless.py index 2acb231e..0387156c 100644 --- a/shell/view/devices/wirelessnetwork.py +++ b/shell/view/devices/network/wireless.py @@ -18,7 +18,7 @@ from sugar.graphics import canvasicon from sugar.graphics import color from sugar.graphics import units -from model.devices import wirelessnetwork +from model.devices.network import wireless from view.pulsingicon import PulsingIcon _ICON_NAME = 'device-network-wireless' @@ -57,12 +57,12 @@ class DeviceView(PulsingIcon): def _update_state(self): # FIXME Change icon colors once we have real icons state = self._model.props.state - if state == wirelessnetwork.STATE_ACTIVATING: + if state == wireless.STATE_ACTIVATING: self.props.fill_color = color.ICON_FILL_INACTIVE self.props.stroke_color = color.ICON_STROKE_INACTIVE - elif state == wirelessnetwork.STATE_ACTIVATED: + elif state == wireless.STATE_ACTIVATED: self.props.fill_color = None self.props.stroke_color = None - elif state == wirelessnetwork.STATE_INACTIVE: + elif state == wireless.STATE_INACTIVE: self.props.fill_color = color.ICON_FILL_INACTIVE self.props.stroke_color = color.ICON_STROKE_INACTIVE