Commit aa861b90 authored by Yann Leboulanger's avatar Yann Leboulanger

configuration is now in common/config

currently gajim cannot be accessed from every where, even with global gajim :(
parent aaf349f1
......@@ -33,7 +33,7 @@
gtk.glade.bindtextdomain(APP, i18n.DIR)
gtk.glade.textdomain(APP)
GTKGUI_GLADE='plugins/gtkgui/gtkgui.glade'
GTKGUI_GLADE='gtkgui.glade'
class Chat:
"""Class for chat/groupchat windows"""
......@@ -58,15 +58,15 @@ def __init__(self, plugin, account, widget_name):
def update_tags(self):
for jid in self.tagIn:
self.tagIn[jid].set_property("foreground", \
self.plugin.config['inmsgcolor'])
self.tagOut[jid].set_property("foreground", \
self.plugin.config['outmsgcolor'])
self.tagStatus[jid].set_property("foreground", \
self.plugin.config['statusmsgcolor'])
self.tagIn[jid].set_property('foreground', \
gajim.config.get('inmsgcolor'))
self.tagOut[jid].set_property('foreground', \
gajim.config.get('outmsgcolor'))
self.tagStatus[jid].set_property('foreground', \
gajim.config.get('statusmsgcolor'))
def update_print_time(self):
if self.plugin.config['print_time'] != 'sometimes':
if gajim.config.get('print_time') != 'sometimes':
list_jid = self.print_time_timeout_id.keys()
for jid in list_jid:
gobject.source_remove(self.print_time_timeout_id[jid])
......@@ -85,9 +85,9 @@ def show_title(self):
unread += self.nb_unread[jid]
start = ""
if unread > 1:
start = "[" + str(unread) + "] "
start = '[' + str(unread) + '] '
elif unread == 1:
start = "* "
start = '* '
chat = self.names[jid]
if len(self.xmls) > 1: # if more than one tabs in the same window
if self.widget_name == 'tabbed_chat_window':
......@@ -105,9 +105,9 @@ def redraw_tab(self, jid):
"""redraw the label of the tab"""
start = ''
if self.nb_unread[jid] > 1:
start = "[" + str(self.nb_unread[jid]) + "] "
start = '[' + str(self.nb_unread[jid]) + '] '
elif self.nb_unread[jid] == 1:
start = "* "
start = '* '
child = self.childs[jid]
tab_label = self.notebook.get_tab_label(child).get_children()[0]
tab_label.set_text(start + self.names[jid])
......@@ -134,8 +134,7 @@ def get_active_jid(self):
return active_jid
def on_close_button_clicked(self, button, jid):
"""When close button is pressed :
close a tab"""
"""When close button is pressed : close a tab"""
self.remove_tab(jid)
def on_chat_window_focus_in_event(self, widget, event):
......@@ -219,13 +218,13 @@ def new_tab(self, jid):
conversation_buffer.create_mark('end', end_iter, False)
self.tagIn[jid] = conversation_buffer.create_tag('incoming')
color = self.plugin.config['inmsgcolor']
color = gajim.config.get('inmsgcolor')
self.tagIn[jid].set_property('foreground', color)
self.tagOut[jid] = conversation_buffer.create_tag('outgoing')
color = self.plugin.config['outmsgcolor']
color = gajim.config.get('outmsgcolor')
self.tagOut[jid].set_property('foreground', color)
self.tagStatus[jid] = conversation_buffer.create_tag('status')
color = self.plugin.config['statusmsgcolor']
color = gajim.config.get('statusmsgcolor')
self.tagStatus[jid].set_property('foreground', color)
tag = conversation_buffer.create_tag('time_sometimes')
......@@ -405,7 +404,7 @@ def on_conversation_textview_button_press_event(self, widget, event):
def print_time_timeout(self, jid):
if not jid in self.xmls.keys():
return 0
if self.plugin.config['print_time'] == 'sometimes':
if gajim.config.get('print_time') == 'sometimes':
conversation_textview = self.xmls[jid].\
get_widget('conversation_textview')
conversation_buffer = conversation_textview.get_buffer()
......@@ -487,7 +486,7 @@ def detect_and_print_special_text(self, otext, jid, other_tags, \
index = 0
# basic: links + mail + formatting is always checked (we like that)
if self.plugin.config['useemoticons']: # search for emoticons & urls
if gajim.config.get('useemoticons'): # search for emoticons & urls
iterator = self.plugin.emot_and_basic_re.finditer(otext)
else: # search for just urls + mail + formatting
iterator = self.plugin.basic_pattern_re.finditer(otext)
......@@ -593,11 +592,11 @@ def print_conversation_line(self, text, jid, kind, name, tim, \
text = ''
if conversation_buffer.get_char_count() > 0:
conversation_buffer.insert(end_iter, '\n')
if self.plugin.config['print_time'] == 'always':
if gajim.config.get('print_time') == 'always':
if not tim:
tim = time.localtime()
self.before_time_symbols = self.plugin.config['before_time']
self.after_time_symbols = self.plugin.config['after_time']
self.before_time_symbols = gajim.config.get('before_time')
self.after_time_symbols = gajim.config.get('after_time')
format = self.before_time_symbols + '%H:%M:%S' + self.after_time_symbols
tim_format = time.strftime(format, tim)
conversation_buffer.insert(end_iter, tim_format + ' ')
......@@ -614,8 +613,8 @@ def print_conversation_line(self, text, jid, kind, name, tim, \
tags = other_tags_for_name[:] #create a new list
tags.append(kind)
if name and not print_all_special:
self.before_nickname_symbols = self.plugin.config['before_nickname']
self.after_nickname_symbols = self.plugin.config['after_nickname']
self.before_nickname_symbols = gajim.config.get('before_nickname')
self.after_nickname_symbols = gajim.config.get('after_nickname')
format = self.before_nickname_symbols + name\
+ self.after_nickname_symbols + ' '
self.print_with_tag_list(conversation_buffer, format, end_iter, tags)
......
## Core/connection.py
## common/connection.py
##
## Gajim Team:
## - Yann Le Boulanger <asterix@lagaule.org>
......@@ -86,13 +86,12 @@ class connection:
def __init__(self, name = None):
# dict of function to be calledfor each event
self.handlers = {'ROSTER': [], 'WARNING': [], 'ERROR': [], 'STATUS': [], \
'NOTIFY': [], 'MSG': [], 'MSGERROR': [], 'SUBSCRIBED': [], \
'UNSUBSCRIBED': [], 'SUBSCRIBE': [], 'AGENTS': [], 'AGENT_INFO': [], \
'AGENT_INFO_ITEMS': [], 'AGENT_INFO_INFO': [], 'REG_AGENT_INFO': [], \
'QUIT': [], 'ACC_OK': [], 'CONFIG': [], 'MYVCARD': [], 'OS_INFO': [], \
'VCARD': [], 'LOG_NB_LINE': [], 'LOG_LINE': [], 'VISUAL': [], \
'NOTIFY': [], 'MSG': [], 'MSGERROR': [], 'MSGSENT': [] , \
'SUBSCRIBED': [], 'UNSUBSCRIBED': [], 'SUBSCRIBE': [], \
'AGENT_INFO': [], 'AGENT_INFO_ITEMS': [], 'AGENT_INFO_INFO': [], \
'QUIT': [], 'ACC_OK': [], 'MYVCARD': [], 'OS_INFO': [], 'VCARD': [], \
'GC_MSG': [], 'GC_SUBJECT': [], 'BAD_PASSPHRASE': [], \
'GPG_SECRETE_KEYS': [], 'ROSTER_INFO': [], 'MSGSENT': []}
'ROSTER_INFO': []}
self.name = name
self.connected = 0 # offline
self.connection = None # Jabber.py instance
......
......@@ -31,7 +31,7 @@
from dialogs import *
import gtkgui
GTKGUI_GLADE='plugins/gtkgui/gtkgui.glade'
GTKGUI_GLADE='gtkgui.glade'
class Preferences_window:
......@@ -1213,9 +1213,13 @@ def on_edit_details_button_clicked(self, widget):
self.plugin.send('ASK_VCARD', self.account, jid)
def on_gpg_choose_button_clicked(self, widget, data=None):
w = choose_gpg_key_dialog()
self.plugin.windows['gpg_keys'] = w
self.plugin.send('GPG_SECRETE_KEYS', None, ())
#FIXME:
secret_keys = connection.ask_gpg_secrete_keys()
if not secret_keys:
Error_dialog(_('error contacting %s') % service)
return
secret_keys['None'] = 'None'
w = choose_gpg_key_dialog(secret_keys)
keyID = w.run()
if keyID == -1:
return
......@@ -1796,7 +1800,12 @@ def on_register_button_clicked(self, widget):
if not iter :
return
service = model.get_value(iter, 1)
self.plugin.send('REG_AGENT_INFO', self.account, service)
#FIXME:
infos = connection.ask_register_agent_info(service)
if not infos.has_key('instructions'):
Error_dialog(_('error contacting %s') % service)
else:
Service_registration_window(service, infos, self.plugin, self.account)
self.window.destroy()
def on_services_treeview_cursor_changed(self, widget):
......
......@@ -27,9 +27,8 @@
gtk.glade.textdomain (APP)
import gtkgui
import version
GTKGUI_GLADE='plugins/gtkgui/gtkgui.glade'
GTKGUI_GLADE='gtkgui.glade'
class Vcard_information_window:
"""Class for user's information window"""
......@@ -363,7 +362,7 @@ def fill_tree(self, list):
for keyID in list.keys():
model.append((keyID, list[keyID]))
def __init__(self):
def __init__(self, secret_keys):
#list : {keyID: userName, ...}
xml = gtk.glade.XML(GTKGUI_GLADE, 'choose_gpg_key_dialog', APP)
self.window = xml.get_widget('choose_gpg_key_dialog')
......@@ -377,6 +376,7 @@ def __init__(self):
renderer = gtk.CellRendererText()
self.keys_treeview.insert_column_with_attributes(-1, _('User name'), \
renderer, text=1)
self.fill_tree(secret_keys)
self.window.show_all()
......@@ -389,12 +389,12 @@ def __init__(self, plugin, status, autoconnect = 0):
self.autoconnect = autoconnect
message_textview = self.xml.get_widget('message_textview')
self.message_buffer = message_textview.get_buffer()
self.message_buffer.set_text(self.plugin.config['last_msg'])
self.message_buffer.set_text(gajim.config.get('last_msg'))
self.values = {'':''}
i = 0
while self.plugin.config.has_key('msg%s_name' % i):
self.values[self.plugin.config['msg%s_name' % i]] = \
self.plugin.config['msg%s' % i]
while gajim.config.exist('msg%s_name' % i):
self.values[gajim.config.get('msg%s_name' % i)] = \
gajim.config.get('msg%s' % i)
i += 1
liststore = gtk.ListStore(str, str)
message_comboboxentry = self.xml.get_widget('message_comboboxentry')
......@@ -413,7 +413,7 @@ def run(self):
if rep == gtk.RESPONSE_OK:
beg, end = self.message_buffer.get_bounds()
message = self.message_buffer.get_text(beg, end, 0)
self.plugin.config['last_msg'] = message
gajim.config.set('last_msg', message)
else:
message = -1
self.window.destroy()
......@@ -565,7 +565,7 @@ def __init__(self):
dlg = gtk.AboutDialog()
dlg.set_name('Gajim')
dlg.set_version(version.version)
dlg.set_version(gajim.version.version)
s = u'Copyright \xa9 2003-2005 Gajim Team'
dlg.set_copyright(s)
text = open('COPYING').read()
......@@ -683,7 +683,7 @@ def __init__(self, plugin, account, server='', room = ''):
cell = gtk.CellRendererText()
self.recently_combobox.pack_start(cell, True)
self.recently_combobox.add_attribute(cell, 'text', 0)
self.recently_groupchat = self.plugin.config['recently_groupchat'].split()
self.recently_groupchat = gajim.config.get('recently_groupchat').split()
for g in self.recently_groupchat:
self.recently_combobox.append_text(g)
......@@ -720,8 +720,7 @@ def on_join_button_clicked(self, widget):
self.recently_groupchat.insert(0, jid)
if len(self.recently_groupchat) > 10:
self.recently_groupchat = self.recently_groupchat[0:10]
self.plugin.config['recently_groupchat'] = \
' '.join(self.recently_groupchat)
gajim.config.set('recently_groupchat', ' '.join(self.recently_groupchat))
self.plugin.roster.new_group(jid, nickname, self.account)
self.plugin.send('GC_JOIN', self.account, (nickname, room, server, \
password))
......
......@@ -34,7 +34,7 @@
gtk.glade.bindtextdomain(APP, i18n.DIR)
gtk.glade.textdomain(APP)
GTKGUI_GLADE='plugins/gtkgui/gtkgui.glade'
GTKGUI_GLADE='gtkgui.glade'
class Groupchat_window(Chat):
"""Class for Groupchat window"""
......
This diff is collapsed.
......@@ -28,7 +28,7 @@
gtk.glade.bindtextdomain(APP, i18n.DIR)
gtk.glade.textdomain(APP)
GTKGUI_GLADE='plugins/gtkgui/gtkgui.glade'
GTKGUI_GLADE='gtkgui.glade'
class history_window:
"""Class for bowser agent window:
......@@ -148,13 +148,13 @@ def __init__(self, plugin, jid):
self.latest_button = xml.get_widget('latest_button')
xml.signal_autoconnect(self)
tagIn = self.history_buffer.create_tag('incoming')
color = self.plugin.config['inmsgcolor']
color = gajim.config.get('inmsgcolor')
tagIn.set_property('foreground', color)
tagOut = self.history_buffer.create_tag('outgoing')
color = self.plugin.config['outmsgcolor']
color = gajim.config.get('outmsgcolor')
tagOut.set_property('foreground', color)
tagStatus = self.history_buffer.create_tag('status')
color = self.plugin.config['statusmsgcolor']
color = gajim.config.get('statusmsgcolor')
tagStatus.set_property('foreground', color)
self.window.show_all()
self.plugin.send('LOG_NB_LINE', None, jid)
......@@ -39,7 +39,7 @@
gtk.glade.bindtextdomain(APP, i18n.DIR)
gtk.glade.textdomain(APP)
GTKGUI_GLADE='plugins/gtkgui/gtkgui.glade'
GTKGUI_GLADE='gtkgui.glade'
class Roster_window:
"""Class for main window of gtkgui plugin"""
......@@ -120,7 +120,7 @@ def remove_newly_added(self, jid, account):
def add_user_to_roster(self, jid, account):
"""Add a user to the roster and add groups if they aren't in roster"""
showOffline = self.plugin.config['showoffline']
showOffline = gajim.config.get('showoffline')
if not self.contacts[account].has_key(jid):
return
users = self.contacts[account][jid]
......@@ -148,7 +148,8 @@ def add_user_to_roster(self, jid, account):
self.groups[account][g] = {'expand': False}
else:
self.groups[account][g] = {'expand': True}
if not account in self.hidden_lines and not self.plugin.config['mergeaccounts']:
if not account in self.hidden_lines and not gajim.config.get(\
'mergeaccounts'):
self.tree.expand_row((model.get_path(iterG)[0]), False)
typestr = 'user'
......@@ -365,7 +366,7 @@ def mklists(self, array, account):
def chg_user_status(self, user, show, status, account):
"""When a user change his status"""
showOffline = self.plugin.config['showoffline']
showOffline = gajim.config.get('showoffline')
model = self.tree.get_model()
luser = self.contacts[account][user.jid]
user.show = show
......@@ -721,7 +722,7 @@ def send_status(self, account, status, txt, autoconnect=0):
if self.plugin.accounts[account].has_key('keyid'):
keyid = self.plugin.accounts[account]['keyid']
if keyid and self.plugin.connected[account] < 2 and \
self.plugin.config['usegpg']:
gajim.config.get('usegpg'):
if save_gpg_pass:
passphrase = self.plugin.accounts[account]['gpgpassword']
else:
......@@ -749,9 +750,8 @@ def send_status(self, account, status, txt, autoconnect=0):
self.plugin.sleeper_state[account] = 0
def get_status_message(self, status, autoconnect = 0):
if (status == 'online' and not self.plugin.config['ask_online_status']) \
or (status == 'offline' and not \
self.plugin.config['ask_offline_status']):
if (status == 'online' and not gajim.config.get('ask_online_status')) or \
(status == 'offline' and not gajim.config.get('ask_offline_status')):
return status
dlg = Change_status_message_dialog(self.plugin, status, autoconnect)
message = dlg.run()
......@@ -829,7 +829,7 @@ def on_status_changed(self, account, status):
self.update_status_comboxbox()
def new_chat(self, user, account):
if self.plugin.config['usetabbedchat']:
if gajim.config.get('usetabbedchat'):
if not self.plugin.windows[account]['chats'].has_key('tabbed'):
self.plugin.windows[account]['chats']['tabbed'] = \
Tabbed_chat_window(user, self.plugin, account)
......@@ -845,7 +845,7 @@ def new_chat(self, user, account):
Tabbed_chat_window(user, self.plugin, account)
def new_group(self, jid, nick, account):
if self.plugin.config['usetabbedchat']:
if gajim.config.get('usetabbedchat'):
if not self.plugin.windows[account]['gc'].has_key('tabbed'):
self.plugin.windows[account]['gc']['tabbed'] = \
Groupchat_window(jid, nick, self.plugin, account)
......@@ -871,8 +871,8 @@ def on_message(self, jid, msg, tim, account):
path = self.tree.get_model().get_path(iters[0])
else:
path = None
autopopup = self.plugin.config['autopopup']
autopopupaway = self.plugin.config['autopopupaway']
autopopup = gajim.config.get('autopopup')
autopopupaway = gajim.config.get('autopopupaway')
if (autopopup == 0 or ( not autopopupaway and \
self.plugin.connected[account] > 2)) and not \
self.plugin.windows[account]['chats'].has_key(jid):
......@@ -964,16 +964,17 @@ def on_roster_window_delete_event(self, widget, event):
def quit_gtkgui_plugin(self):
"""When we quit the gtk plugin :
tell that to the core and exit gtk"""
if self.plugin.config.has_key('saveposition'):
if self.plugin.config['saveposition']:
self.plugin.config['x-position'], self.plugin.config['y-position']=\
self.window.get_position()
self.plugin.config['width'], self.plugin.config['height'] = \
self.window.get_size()
if gajim.config.exist('saveposition'):
if gajim.config.get('saveposition'):
x, y = self.window.get_position()
gajim.config.set('x-position', x)
gajim.config.set('y-position', y)
width, height = self.window.get_size()
gajim.config.set('width', width)
gajim.config.set('height', height)
self.plugin.save_config()
self.plugin.send('QUIT', None, ('gtkgui', 1))
print _("plugin gtkgui stopped")
self.close_all(self.plugin.windows)
if self.plugin.systray_enabled:
self.plugin.hide_systray()
......@@ -1010,7 +1011,7 @@ def on_roster_treeview_row_activated(self, widget, path, col=0):
self.tree.expand_row(path, False)
else:
if self.plugin.windows[account]['chats'].has_key(jid):
if self.plugin.config['usetabbedchat']:
if gajim.config.get('usetabbedchat'):
self.plugin.windows[account]['chats'][jid].active_tab(jid)
self.plugin.windows[account]['chats'][jid].window.present()
elif self.contacts[account].has_key(jid):
......@@ -1103,7 +1104,7 @@ def on_service_disco_menuitem_activate(self, widget, account):
def mkpixbufs(self):
"""initialise pixbufs array"""
iconset = self.plugin.config['iconset']
iconset = gajim.config.get('iconset')
if not iconset:
iconset = 'sun'
self.path = 'plugins/gtkgui/iconsets/' + iconset + '/'
......@@ -1161,19 +1162,18 @@ def reload_pixbufs(self):
def on_show_offline_contacts_menuitem_activate(self, widget):
"""when show offline option is changed:
redraw the treeview"""
self.plugin.config['showoffline'] = 1 - self.plugin.config['showoffline']
self.plugin.send('CONFIG', None, ('GtkGui', self.plugin.config, 'GtkGui'))
gajim.config.set('showoffline', 1 - gajim.config.get('showoffline'))
self.draw_roster()
def iconCellDataFunc(self, column, renderer, model, iter, data=None):
"""When a row is added, set properties for icon renderer"""
if model.get_value(iter, 2) == 'account':
renderer.set_property('cell-background', \
self.plugin.config['accountbgcolor'])
gajim.config.get('accountbgcolor'))
renderer.set_property('xalign', 0)
elif model.get_value(iter, 2) == 'group':
renderer.set_property('cell-background', \
self.plugin.config['groupbgcolor'])
gajim.config.get('groupbgcolor'))
renderer.set_property('xalign', 0.5)
else:
jid = model.get_value(iter, 3)
......@@ -1184,7 +1184,7 @@ def iconCellDataFunc(self, column, renderer, model, iter, data=None):
renderer.set_property('cell-background', '#ab6161')
else:
renderer.set_property('cell-background', \
self.plugin.config['userbgcolor'])
gajim.config.get('userbgcolor'))
renderer.set_property('xalign', 1)
renderer.set_property('width', 20)
......@@ -1192,31 +1192,31 @@ def nameCellDataFunc(self, column, renderer, model, iter, data=None):
"""When a row is added, set properties for name renderer"""
if model.get_value(iter, 2) == 'account':
renderer.set_property('foreground', \
self.plugin.config['accounttextcolor'])
gajim.config.get('accounttextcolor'))
renderer.set_property('cell-background', \
self.plugin.config['accountbgcolor'])
renderer.set_property('font', self.plugin.config['accountfont'])
gajim.config.get('accountbgcolor'))
renderer.set_property('font', gajim.config.get('accountfont'))
renderer.set_property('xpad', 0)
elif model.get_value(iter, 2) == 'group':
renderer.set_property('foreground', \
self.plugin.config['grouptextcolor'])
gajim.config.get('grouptextcolor'))
renderer.set_property('cell-background', \
self.plugin.config['groupbgcolor'])
renderer.set_property('font', self.plugin.config['groupfont'])
gajim.config.get('groupbgcolor'))
renderer.set_property('font', gajim.config.get('groupfont'))
renderer.set_property('xpad', 4)
else:
jid = model.get_value(iter, 3)
account = model.get_value(iter, 4)
renderer.set_property('foreground', \
self.plugin.config['usertextcolor'])
gajim.config.get('usertextcolor'))
if jid in self.newly_added[account]:
renderer.set_property('cell-background', '#adc3c6')
elif jid in self.to_be_removed[account]:
renderer.set_property('cell-background', '#ab6161')
else:
renderer.set_property('cell-background', \
self.plugin.config['userbgcolor'])
renderer.set_property('font', self.plugin.config['userfont'])
gajim.config.get('userbgcolor'))
renderer.set_property('font', gajim.config.get('userfont'))
renderer.set_property('xpad', 8)
def compareIters(self, model, iter1, iter2, data = None):
......@@ -1249,7 +1249,7 @@ def drag_data_get_data(self, treeview, context, selection, target_id, etime):
def drag_data_received_data(self, treeview, context, x, y, selection, info,
etime):
merge = 0
if self.plugin.config['mergeaccounts']:
if gajim.config.get('mergeaccounts'):
merge = 1
model = treeview.get_model()
data = selection.data
......@@ -1325,18 +1325,12 @@ def __init__(self, plugin):
self.join_gc_handler_id = False
self.new_message_menuitem_handler_id = False
self.regroup = 0
if self.plugin.config.has_key('mergeaccounts'):
self.regroup = self.plugin.config['mergeaccounts']
if self.plugin.config.has_key('saveposition'):
if self.plugin.config['saveposition']:
if self.plugin.config.has_key('x-position') and \
self.plugin.config.has_key('y-position'):
self.window.move(self.plugin.config['x-position'], \
self.plugin.config['y-position'])
if self.plugin.config.has_key('width') and \
self.plugin.config.has_key('height'):
self.window.resize(self.plugin.config['width'], \
self.plugin.config['height'])
self.regroup = gajim.config.get('mergeaccounts')
if gajim.config.get('saveposition'):
self.window.move(gajim.config.get('x-position'), \
gajim.config.get('y-position'))
self.window.resize(gajim.config.get('width'), \
gajim.config.get('height'))
self.window.show_all()
self.groups = {}
self.contacts = {}
......@@ -1380,7 +1374,7 @@ def __init__(self, plugin):
self.status_combobox.set_model(liststore)
self.status_combobox.set_active(5)
showOffline = self.plugin.config['showoffline']
showOffline = gajim.config.get('showoffline')
self.xml.get_widget('show_offline_contacts_menuitem').set_active(showOffline)
#columns
......@@ -1420,7 +1414,7 @@ def __init__(self, plugin):
self.id_signal_cb = self.status_combobox.connect('changed',\
self.on_status_combobox_changed)
self.hidden_lines = self.plugin.config['hiddenlines'].split('\t')
self.hidden_lines = gajim.config.get('hiddenlines').split('\t')
self.draw_roster()
if len(self.plugin.accounts) == 0: # if no account
self.plugin.windows['account_modification'] = \
......
......@@ -28,7 +28,7 @@
gtk.glade.bindtextdomain(APP, i18n.DIR)
gtk.glade.textdomain(APP)
GTKGUI_GLADE='plugins/gtkgui/gtkgui.glade'
GTKGUI_GLADE='gtkgui.glade'
class Systray:
"""Class for icon in the systray"""
......
......@@ -34,7 +34,7 @@
gtk.glade.bindtextdomain(APP, i18n.DIR)
gtk.glade.textdomain(APP)
GTKGUI_GLADE='plugins/gtkgui/gtkgui.glade'
GTKGUI_GLADE='gtkgui.glade'
class Tabbed_chat_window(Chat):
"""Class for tabbed chat window"""
......@@ -144,7 +144,7 @@ def new_user(self, user):
if self.plugin.queues[self.account].has_key(user.jid):
self.read_queue(user.jid)
if self.plugin.config['print_time'] == 'sometimes':
if gajim.config.get('print_time') == 'sometimes':
self.print_time_timeout(user.jid)
self.print_time_timeout_id[user.jid] = gobject.timeout_add(300000, \
self.print_time_timeout, user.jid)
......@@ -211,7 +211,7 @@ def read_queue(self, jid):
self.plugin.roster.redraw_jid(jid, self.account)
if self.plugin.systray_enabled:
self.plugin.systray.remove_jid(jid, self.account)
showOffline = self.plugin.config['showoffline']
showOffline = gajim.config.get('showoffline')
if (user.show == 'offline' or user.show == 'error') and \
not showOffline:
if len(self.plugin.roster.contacts[self.account][jid]) == 1:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment