Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim-plugins.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wicd_support/__init__.py1
-rw-r--r--wicd_support/manifest.ini10
-rw-r--r--wicd_support/wicd_support.pngbin608 -> 0 bytes
-rw-r--r--wicd_support/wicd_support.py77
4 files changed, 0 insertions, 88 deletions
diff --git a/wicd_support/__init__.py b/wicd_support/__init__.py
deleted file mode 100644
index 2b30f26..0000000
--- a/wicd_support/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from .wicd_support import WicdPlugin
diff --git a/wicd_support/manifest.ini b/wicd_support/manifest.ini
deleted file mode 100644
index a55d09a..0000000
--- a/wicd_support/manifest.ini
+++ /dev/null
@@ -1,10 +0,0 @@
-[info]
-name: Wicd support
-short_name: wicd_support
-version: 1.2.1
-description: Support for autodetecting network status from Wicd network connection manager.
- Requires wicd and python-dbus.
-authors = Denis Fomin <fominde@gmail.com>
-homepage = https://dev.gajim.org/gajim/gajim-plugins/wikis/WicdSupportPlugin
-min_gajim_version: 1.1.91
-max_gajim_version: 1.2.90
diff --git a/wicd_support/wicd_support.png b/wicd_support/wicd_support.png
deleted file mode 100644
index 5d946ff..0000000
--- a/wicd_support/wicd_support.png
+++ /dev/null
Binary files differ
diff --git a/wicd_support/wicd_support.py b/wicd_support/wicd_support.py
deleted file mode 100644
index 88df149..0000000
--- a/wicd_support/wicd_support.py
+++ /dev/null
@@ -1,77 +0,0 @@
-import os
-
-from gajim.common import app
-from gajim.common import dbus_support
-
-from gajim.plugins import GajimPlugin
-from gajim.plugins.helpers import log_calls
-from gajim.plugins.plugins_i18n import _
-
-
-class WicdPlugin(GajimPlugin):
- @log_calls('WicdPlugin')
- def init(self):
- self.description = _(
- 'Support for autodetection of network status '
- 'for Wicd Network Manager.\nRequires wicd and python-dbus.')
- self.config_dialog = None
- self.test_activatable()
-
- def test_activatable(self):
- self.available_text = ''
- if os.name == 'nt':
- self.available_text = _('Plugin can\'t be run under Windows.')
- self.activatable = False
- return
- if not dbus_support.supported:
- self.activatable = False
- self.available_text += _('python-dbus is missing! '
- 'Install python-dbus.')
-
- @log_calls('WicdPlugin')
- def activate(self):
- try:
- import dbus
- from gajim.common.dbus_support import system_bus
-
- self.bus = system_bus.bus()
-
- if 'org.wicd.daemon' not in self.bus.list_names():
- return
- wicd_object = self.bus.get_object('org.wicd.daemon',
- '/org/wicd/daemon')
- self.props = dbus.Interface(wicd_object,
- 'org.freedesktop.DBus.Properties')
- self.bus.add_signal_receiver(self.state_changed,
- 'StatusChanged',
- 'org.wicd.daemon',
- 'org.wicd.daemon',
- '/org/wicd/daemon')
- except dbus.DBusException:
- pass
-
- @log_calls('WicdPlugin')
- def deactivate(self):
- self.bus.remove_signal_receiver(self.state_changed,
- 'StatusChanged',
- 'org.wicd.daemon',
- 'org.wicd.daemon',
- '/org/wicd/daemon')
-
- def state_changed(self, state, _info):
- # Connection state constants
- # NOT_CONNECTED = 0
- # CONNECTING = 1
- # WIRELESS = 2
- # WIRED = 3
- # SUSPENDED = 4
- if state in (2, 3):
- for connection in app.connections.values():
- if app.config.get_per('accounts', connection.name,
- 'listen_to_network_manager') and connection.time_to_reconnect:
- connection._reconnect()
- else:
- for connection in app.connections.values():
- if app.config.get_per('accounts', connection.name,
- 'listen_to_network_manager') and connection.connected > 1:
- connection._disconnectedReconnCB()