def __init__(self, socket=None): self.conns = [] self.chat_windows = [] self.buddy_list = tc_client.BuddyList(self.callbackMessage, socket) print "TorChat: %s" % config.getProfileLongName()
def updateTitle(self): if self.unread == 1: title = '* ' elif self.unread > 1: title = '*[%i] ' % self.unread else: title = '' title += self.buddy.address if self.buddy.name != '': title += ' (%s)' % self.buddy.name self.SetTitle(title + ' %s' % config.getProfileLongName())
def __init__(self, socket=None): wx.Frame.__init__(self, None, -1, 'TorChat', size=(250, 350)) self.conns = [] self.chat_windows = [] self.notification_window = None self.buddy_list = tc_client.BuddyList(self.callbackMessage, socket) self.SetTitle('TorChat: %s' % config.getProfileLongName()) self.Bind(wx.EVT_CLOSE, self.onClose) # setup gui elements self.taskbar_icon = TaskbarIcon(self) self.main_panel = wx.Panel(self) sizer = wx.BoxSizer(wx.VERTICAL) self.gui_bl = BuddyList(self.main_panel, self) sizer.Add(self.gui_bl, 1, wx.EXPAND) self.status_switch = StatusSwitch(self.main_panel, self) sizer.Add(self.status_switch, 0, wx.EXPAND) self.main_panel.SetSizer(sizer) sizer.FitInside(self) icon = wx.Icon(name=os.path.join(config.get('internal', 'icon_dir'), 'torchat.ico'), type=wx.BITMAP_TYPE_ICO) self.SetIcon(icon) if not config.getint('gui', 'open_main_window_hidden'): self.Show() if config.get('logging', 'log_file') and config.getint('logging' , 'log_level'): log.debug('logging to file may leave sensitive information on disk' ) wx.MessageBox(lang.D_LOG_WARNING_MESSAGE % config.log_writer.file_name, lang.D_LOG_WARNING_TITLE, wx.ICON_WARNING)
def __init__(self, socket=None): wx.Frame.__init__(self, None, -1, 'TorChat', size=(250, 350)) self.conns = [] self.chat_windows = [] self.notification_window = None self.buddy_list = tc_client.BuddyList(self.callbackMessage, socket) self.SetTitle('TorChat: %s' % config.getProfileLongName()) self.Bind(wx.EVT_CLOSE, self.onClose) # setup gui elements self.taskbar_icon = TaskbarIcon(self) self.main_panel = wx.Panel(self) sizer = wx.BoxSizer(wx.VERTICAL) self.gui_bl = BuddyList(self.main_panel, self) sizer.Add(self.gui_bl, 1, wx.EXPAND) self.status_switch = StatusSwitch(self.main_panel, self) sizer.Add(self.status_switch, 0, wx.EXPAND) self.main_panel.SetSizer(sizer) sizer.FitInside(self) icon = wx.Icon(name=os.path.join(config.get('internal', 'icon_dir'), 'torchat.ico'), type=wx.BITMAP_TYPE_ICO) self.SetIcon(icon) if not config.getint('gui', 'open_main_window_hidden'): self.Show() if config.get('logging', 'log_file') and config.getint( 'logging', 'log_level'): log.debug( 'logging to file may leave sensitive information on disk') wx.MessageBox( lang.D_LOG_WARNING_MESSAGE % config.log_writer.file_name, lang.D_LOG_WARNING_TITLE, wx.ICON_WARNING)
def getToolTipText(self): text = 'TorChat: %s' % config.getProfileLongName() for window in self.mw.chat_windows: if not window.IsShown(): text += '\n' + window.getTitleShort() return text