[guilhem].PluginInstallerPlugin.Add configuration option for FTP TLS.Fixes #34
This commit is contained in:
@@ -301,8 +301,9 @@
|
|||||||
<object class="GtkCheckButton" id="check_update">
|
<object class="GtkCheckButton" id="check_update">
|
||||||
<property name="label" translatable="yes">Check update after start</property>
|
<property name="label" translatable="yes">Check update after start</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="receives_default">False</property>
|
<property name="receives_default">False</property>
|
||||||
|
<property name="focus_on_click">False</property>
|
||||||
<property name="draw_indicator">True</property>
|
<property name="draw_indicator">True</property>
|
||||||
<signal name="toggled" handler="on_check_update_toggled"/>
|
<signal name="toggled" handler="on_check_update_toggled"/>
|
||||||
</object>
|
</object>
|
||||||
@@ -311,6 +312,21 @@
|
|||||||
<property name="position">1</property>
|
<property name="position">1</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="TLS">
|
||||||
|
<property name="label" translatable="yes">Use TLS transport</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="receives_default">False</property>
|
||||||
|
<property name="focus_on_click">False</property>
|
||||||
|
<property name="draw_indicator">True</property>
|
||||||
|
<signal name="toggled" handler="on_tls_toggled"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
[info]
|
[info]
|
||||||
name: Plugin Installer
|
name: Plugin Installer
|
||||||
short_name: plugin_installer
|
short_name: plugin_installer
|
||||||
version: 0.10.4
|
version: 0.10.5
|
||||||
description: Install and upgrade plugins from ftp
|
description: Install and upgrade plugins from ftp
|
||||||
authors: Denis Fomin <fominde@gmail.com>
|
authors: Denis Fomin <fominde@gmail.com>
|
||||||
Yann Leboulanger <asterix@lagaule.org>
|
Yann Leboulanger <asterix@lagaule.org>
|
||||||
|
|||||||
@@ -63,7 +63,8 @@ class PluginInstaller(GajimPlugin):
|
|||||||
self.description = _('Install and upgrade plugins from ftp')
|
self.description = _('Install and upgrade plugins from ftp')
|
||||||
self.config_dialog = PluginInstallerPluginConfigDialog(self)
|
self.config_dialog = PluginInstallerPluginConfigDialog(self)
|
||||||
self.config_default_values = {'ftp_server': ('ftp.gajim.org', ''),
|
self.config_default_values = {'ftp_server': ('ftp.gajim.org', ''),
|
||||||
'check_update': (True, ''),}
|
'check_update': (True, ''),
|
||||||
|
'TLS': (True, ''),}
|
||||||
self.window = None
|
self.window = None
|
||||||
self.progressbar = None
|
self.progressbar = None
|
||||||
self.available_plugins_model = None
|
self.available_plugins_model = None
|
||||||
@@ -98,7 +99,7 @@ class PluginInstaller(GajimPlugin):
|
|||||||
'\n%s') % plugins_str, on_response_yes=open_update)
|
'\n%s') % plugins_str, on_response_yes=open_update)
|
||||||
|
|
||||||
def ftp_connect(self):
|
def ftp_connect(self):
|
||||||
if sys.version_info[:2] > (2, 6):
|
if sys.version_info[:2] > (2, 6) and self.config['TLS'] :
|
||||||
con = ftplib.FTP_TLS(self.config['ftp_server'])
|
con = ftplib.FTP_TLS(self.config['ftp_server'])
|
||||||
con.login()
|
con.login()
|
||||||
con.prot_p()
|
con.prot_p()
|
||||||
@@ -620,6 +621,8 @@ class PluginInstallerPluginConfigDialog(GajimPluginConfigDialog):
|
|||||||
widget.set_text(str(self.plugin.config['ftp_server']))
|
widget.set_text(str(self.plugin.config['ftp_server']))
|
||||||
self.xml.get_object('check_update').set_active(
|
self.xml.get_object('check_update').set_active(
|
||||||
self.plugin.config['check_update'])
|
self.plugin.config['check_update'])
|
||||||
|
self.xml.get_object('TLS').set_active(
|
||||||
|
self.plugin.config['TLS'])
|
||||||
|
|
||||||
def on_hide(self, widget):
|
def on_hide(self, widget):
|
||||||
widget = self.xml.get_object('ftp_server')
|
widget = self.xml.get_object('ftp_server')
|
||||||
@@ -627,3 +630,6 @@ class PluginInstallerPluginConfigDialog(GajimPluginConfigDialog):
|
|||||||
|
|
||||||
def on_check_update_toggled(self, widget):
|
def on_check_update_toggled(self, widget):
|
||||||
self.plugin.config['check_update'] = widget.get_active()
|
self.plugin.config['check_update'] = widget.get_active()
|
||||||
|
|
||||||
|
def on_tls_toggled(self, widget):
|
||||||
|
self.plugin.config['TLS'] = widget.get_active()
|
||||||
|
|||||||
Reference in New Issue
Block a user