+ def buildInterfaceList(self,iface,name,default,active ):
+ divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/div-h.png"))
+ defaultpng = None
+ activepng = None
+ description = None
+ interfacepng = None
+
+ if iface in iNetwork.lan_interfaces:
+ if active is True:
+ interfacepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/network_wired-active.png"))
+ elif active is False:
+ interfacepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/network_wired-inactive.png"))
+ else:
+ interfacepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/network_wired.png"))
+ elif iface in iNetwork.wlan_interfaces:
+ if active is True:
+ interfacepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/network_wireless-active.png"))
+ elif active is False:
+ interfacepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/network_wireless-inactive.png"))
+ else:
+ interfacepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/network_wireless.png"))
+
+ num_configured_if = len(iNetwork.getConfiguredAdapters())
+ if num_configured_if >= 2:
+ if default is True:
+ defaultpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/buttons/button_blue.png"))
+ elif default is False:
+ defaultpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/buttons/button_blue_off.png"))
+ if active is True:
+ activepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/lock_on.png"))
+ elif active is False:
+ activepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/lock_error.png"))
+
+ description = iNetwork.getFriendlyAdapterDescription(iface)
+
+ return((iface, name, description, interfacepng, defaultpng, activepng, divpng))