Primitivus: added Gateways support
This commit is contained in:
parent
c95e2aeea3
commit
fa3557cbef
1 changed files with 189 additions and 39 deletions
|
|
@ -26,15 +26,14 @@ import pdb
|
|||
from xml.dom import minidom
|
||||
from logging import debug, info, error
|
||||
from tools.jid import JID
|
||||
from quick_frontend.quick_gateways import QuickGatewaysManager
|
||||
|
||||
WARNING_MSG = _(u"""Be careful ! Gateways allow you to use an external IM (legacy IM), so you can see your contact as jabber contacts.
|
||||
But when you do this, all your messages go throught the external legacy IM server, it is a huge privacy issue (i.e.: all your messages throught the gateway can be monitored, recorded, analyzed by the external server, most of time a private company).""")
|
||||
class GatewaysManager(wx.Frame,QuickGatewaysManager):
|
||||
|
||||
class GatewaysManager(wx.Frame):
|
||||
def __init__(self, host, gateways, title=_("Gateways manager"), server=None):
|
||||
super(GatewaysManager, self).__init__(None, title=title)
|
||||
wx.Frame.__init__(self, None, title=title)
|
||||
QuickGatewaysManager.__init__(self, host, gateways, server)
|
||||
|
||||
self.host = host
|
||||
if server:
|
||||
self.SetTitle(title+" (%s)" % server)
|
||||
|
||||
|
|
@ -49,7 +48,7 @@ class GatewaysManager(wx.Frame):
|
|||
self.ctl_list = {} # usefull to access ctrl, key = (name, category)
|
||||
|
||||
self.sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
warning = wx.TextCtrl(self, -1, value=WARNING_MSG, style = wx.TE_MULTILINE |
|
||||
warning = wx.TextCtrl(self, -1, value=self.WARNING_MSG, style = wx.TE_MULTILINE |
|
||||
wx.TE_READONLY |
|
||||
wx.TE_LEFT)
|
||||
warning.SetFont(self.bold_font)
|
||||
|
|
@ -113,8 +112,6 @@ class GatewaysManager(wx.Frame):
|
|||
|
||||
|
||||
def addGateway(self, gateway, param):
|
||||
|
||||
|
||||
|
||||
#First The icon
|
||||
isz = (16,16)
|
||||
|
|
@ -126,29 +123,7 @@ class GatewaysManager(wx.Frame):
|
|||
label.SetFont(self.normal_font)
|
||||
|
||||
#Then the transport type message
|
||||
|
||||
type_label_txt = _('Unknown IM')
|
||||
|
||||
if param['type'] == 'irc':
|
||||
type_label_txt = "Internet Relay Chat"
|
||||
elif param['type'] == 'xmpp':
|
||||
type_label_txt = "XMPP"
|
||||
elif param['type'] == 'qq':
|
||||
type_label_txt = "Tencent QQ"
|
||||
elif param['type'] == 'simple':
|
||||
type_label_txt = "SIP/SIMPLE"
|
||||
elif param['type'] == 'icq':
|
||||
type_label_txt = "ICQ"
|
||||
elif param['type'] == 'yahoo':
|
||||
type_label_txt = "Yahoo! Messenger"
|
||||
elif param['type'] == 'gadu-gadu':
|
||||
type_label_txt = "Gadu-Gadu"
|
||||
elif param['type'] == 'aim':
|
||||
type_label_txt = "AOL Instant Messenger"
|
||||
elif param['type'] == 'msn':
|
||||
type_label_txt = 'Windows Live Messenger'
|
||||
|
||||
type_label_txt = type_label_txt
|
||||
type_label_txt = self.getGatewayDesc(param['type'])
|
||||
|
||||
type_label = wx.StaticText(self.panel, -1, type_label_txt)
|
||||
type_label.SetFont(self.italic_font)
|
||||
|
|
|
|||
Loading…
Reference in a new issue