eugenia colors as default, fix in makeing menus, and better regexp (doesn't detect http://) anymore) [thanks jajcus]
This commit is contained in:
parent
2295a319ce
commit
a1a2e1e3fc
|
@ -741,9 +741,9 @@ class plugin:
|
|||
# (?!\S) is the same thing but it's a lookahead assertion
|
||||
# basic_pattern is one string literal.
|
||||
# I've put spaces to make the regexp look better.
|
||||
links = r'\bhttp://\S+|' r'\bhttps://\S+|' r'\bnews://\S+|' r'\bftp://\S+|' r'\bed2k://\S+|' r'\bwww\.\S+|' r'\bftp\.\S+|'
|
||||
links = r'\bhttp://[^)\s]+|' r'\bhttps://[^)\s]+|' r'\bnews://[^)\s]+|' r'\bftp://[^)\s]+|' r'\bed2k://[^)\s]+|' r'\bwww\.[^)\s]+|' r'\bftp\.[^)\s]+|'
|
||||
#2nd one: at_least_one_char@at_least_one_char.at_least_one_char
|
||||
mail = r'\bmailto:\S+|' r'\b\S+@\S+\.\S+|'
|
||||
mail = r'\bmailto:[^)\s]+|' r'\b[^)\s]+@[^)\s]+\.[^)\s]+|'
|
||||
|
||||
#detects eg. *b* *bold* *bold bold* test *bold*
|
||||
#doesn't detect (it's a feature :P) * bold* *bold * * bold * test*bold*
|
||||
|
@ -767,7 +767,7 @@ class plugin:
|
|||
def on_launch_browser_mailer(self, widget, url, kind):
|
||||
self.launch_browser_mailer(kind, url)
|
||||
|
||||
def init_regex(self):
|
||||
def init_regexp(self):
|
||||
if self.config['useemoticons']:
|
||||
"""initialize emoticons dictionary"""
|
||||
self.emoticons = dict()
|
||||
|
@ -822,14 +822,14 @@ class plugin:
|
|||
'outmsgcolor': '#0000ff',\
|
||||
'statusmsgcolor':'#1eaa1e',\
|
||||
'hiddenlines':'',\
|
||||
'accounttextcolor': '#ff0000',\
|
||||
#'#ffffff'
|
||||
'accountbgcolor': '#9fdfff',\
|
||||
#'#94aa8c'
|
||||
'accounttextcolor': '#ffffff',\
|
||||
#ff0000
|
||||
'accountbgcolor': '#94aa8c',\
|
||||
#9fdfff
|
||||
'accountfont': 'Sans Bold 10',\
|
||||
'grouptextcolor': '#0000ff',\
|
||||
'groupbgcolor': '#ffffff',\
|
||||
#'#eff3e7'
|
||||
'groupbgcolor': '##eff3e7',\
|
||||
#ffffff
|
||||
'groupfont': 'Sans Italic 10',\
|
||||
'usertextcolor': '#000000',\
|
||||
'userbgcolor': '#ffffff',\
|
||||
|
@ -915,7 +915,7 @@ class plugin:
|
|||
if self.config['trayicon']:
|
||||
self.show_systray()
|
||||
|
||||
self.init_regex()
|
||||
self.init_regexp()
|
||||
|
||||
# get instances for windows/dialogs that will show_all()/hide()
|
||||
self.windows['preferences'] = Preferences_window(self)
|
||||
|
|
|
@ -259,7 +259,9 @@ class Roster_window:
|
|||
sub_menu = gtk.Menu()
|
||||
service_disco_menuitem.set_submenu(sub_menu)
|
||||
for account in self.plugin.accounts.keys():
|
||||
item = gtk.MenuItem(_('as ') + self.plugin.accounts[account]['jid'])
|
||||
our_jid = self.plugin.accounts[account]['name'] + '@' +\
|
||||
self.plugin.accounts[account]['hostname']
|
||||
item = gtk.MenuItem(_('as ') + our_jid)
|
||||
sub_menu.append(item)
|
||||
item.connect('activate', self.on_service_disco_menuitem_activate, account)
|
||||
sub_menu.show_all()
|
||||
|
@ -267,7 +269,9 @@ class Roster_window:
|
|||
sub_menu = gtk.Menu()
|
||||
join_gc_menuitem.set_submenu(sub_menu)
|
||||
for account in self.plugin.accounts.keys():
|
||||
item = gtk.MenuItem(_('as ') + self.plugin.accounts[account]['jid'])
|
||||
our_jid = self.plugin.accounts[account]['name'] + '@' +\
|
||||
self.plugin.accounts[account]['hostname']
|
||||
item = gtk.MenuItem(_('as ') + our_jid)
|
||||
sub_menu.append(item)
|
||||
item.connect("activate", self.on_join_gc_activate, account)
|
||||
sub_menu.show_all()
|
||||
|
@ -275,7 +279,9 @@ class Roster_window:
|
|||
sub_menu = gtk.Menu()
|
||||
new_message_menuitem.set_submenu(sub_menu)
|
||||
for account in self.plugin.accounts.keys():
|
||||
item = gtk.MenuItem(_('as ') + self.plugin.accounts[account]['jid'])
|
||||
our_jid = self.plugin.accounts[account]['name'] + '@' +\
|
||||
self.plugin.accounts[account]['hostname']
|
||||
item = gtk.MenuItem(_('as ') + our_jid)
|
||||
sub_menu.append(item)
|
||||
item.connect('activate', self.on_new_message_menuitem_activate, account)
|
||||
sub_menu.show_all()
|
||||
|
|
|
@ -141,13 +141,15 @@ class systray:
|
|||
new_message_menuitem.set_submenu(account_menu_for_new_message)
|
||||
|
||||
for account in self.plugin.accounts.keys():
|
||||
our_jid = self.plugin.accounts[account]['name'] + '@' +\
|
||||
self.plugin.accounts[account]['hostname']
|
||||
#for chat_with
|
||||
item = gtk.MenuItem(_('as ') + plugin.accounts[account]['jid'])
|
||||
item = gtk.MenuItem(_('as ') + our_jid)
|
||||
account_menu_for_chat_with.append(item)
|
||||
group_menu = self.make_groups_submenus_for_chat_with(account)
|
||||
item.set_submenu(group_menu)
|
||||
#for new_message
|
||||
item = gtk.MenuItem(_('as ') + plugin.accounts[account]['jid'])
|
||||
item = gtk.MenuItem(_('as ') + our_jid)
|
||||
item.connect('activate',\
|
||||
self.on_new_message_menuitem_activate, account)
|
||||
account_menu_for_new_message.append(item)
|
||||
|
|
Loading…
Reference in New Issue