show a connecting gif in systray and in account's treeiter while connecting
This commit is contained in:
parent
d970399c78
commit
32b0a5052e
|
@ -1390,6 +1390,13 @@ class roster_Window:
|
||||||
|
|
||||||
def send_status(self, account, status, txt, autoconnect=0):
|
def send_status(self, account, status, txt, autoconnect=0):
|
||||||
if status != 'offline':
|
if status != 'offline':
|
||||||
|
if not self.plugin.connected[account]:
|
||||||
|
model = self.tree.get_model()
|
||||||
|
accountIter = self.get_account_iter(account)
|
||||||
|
if accountIter:
|
||||||
|
model.set_value(accountIter, 0, self.pixbufs['connecting'])
|
||||||
|
self.plugin.systray.set_status('connecting')
|
||||||
|
|
||||||
save_pass = 0
|
save_pass = 0
|
||||||
if self.plugin.accounts[account].has_key("savepass"):
|
if self.plugin.accounts[account].has_key("savepass"):
|
||||||
save_pass = self.plugin.accounts[account]["savepass"]
|
save_pass = self.plugin.accounts[account]["savepass"]
|
||||||
|
@ -1402,6 +1409,9 @@ class roster_Window:
|
||||||
else:
|
else:
|
||||||
passphrase, save = w.run()
|
passphrase, save = w.run()
|
||||||
if passphrase == -1:
|
if passphrase == -1:
|
||||||
|
if accountIter:
|
||||||
|
model.set_value(accountIter, 0, self.pixbufs['offline'])
|
||||||
|
self.set_cb()
|
||||||
return
|
return
|
||||||
self.plugin.send('PASSPHRASE', account, passphrase)
|
self.plugin.send('PASSPHRASE', account, passphrase)
|
||||||
if save:
|
if save:
|
||||||
|
@ -1710,9 +1720,9 @@ class roster_Window:
|
||||||
iconstyle = 'sun'
|
iconstyle = 'sun'
|
||||||
self.path = 'plugins/gtkgui/icons/' + iconstyle + '/'
|
self.path = 'plugins/gtkgui/icons/' + iconstyle + '/'
|
||||||
self.pixbufs = {}
|
self.pixbufs = {}
|
||||||
for state in ('online', 'chat', 'away', 'xa', 'dnd', 'invisible', \
|
for state in ('connecting', 'online', 'chat', 'away', 'xa', 'dnd', \
|
||||||
'offline', 'error', 'requested', 'message', 'opened', 'closed', \
|
'invisible', 'offline', 'error', 'requested', 'message', 'opened', \
|
||||||
'not in list'):
|
'closed', 'not in list'):
|
||||||
# try to open a pixfile with the correct method
|
# try to open a pixfile with the correct method
|
||||||
state_file = state.replace(" ", "_")
|
state_file = state.replace(" ", "_")
|
||||||
files = []
|
files = []
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
Loading…
Reference in New Issue