Changeset 9265
- Timestamp:
- 01/23/08 17:10:28 (10 months ago)
- Location:
- trunk/src
- Files:
-
- 3 modified
-
common/gajim.py (modified) (2 diffs)
-
gajim.py (modified) (1 diff)
-
roster_window.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/common/gajim.py
r9213 r9265 269 269 '''returns the number of the accounts that are SSL/TLS connected''' 270 270 num_of_secured = 0 271 for account in connections :271 for account in connections.keys(): 272 272 if account_is_securely_connected(account): 273 273 num_of_secured += 1 … … 275 275 276 276 def account_is_securely_connected(account): 277 if account in con_types and con_types[account] in ('tls', 'ssl'): 277 if account_is_connected(account) and \ 278 account in con_types and con_types[account] in ('tls', 'ssl'): 278 279 return True 279 280 else: -
trunk/src/gajim.py
r9256 r9265 1877 1877 gajim.block_signed_in_notifications[account] = True 1878 1878 self.roster.set_actions_menu_needs_rebuild() 1879 self.roster.draw_account(account) 1879 1880 if self.sleeper.getState() != common.sleepy.STATE_UNKNOWN and \ 1880 1881 gajim.connections[account].connected in (2, 3): -
trunk/src/roster_window.py
r9260 r9265 212 212 model = self.tree.get_model() 213 213 iter = self.get_account_iter(account) 214 if self.regroup: 215 accounts = gajim.connections.keys() 216 else: 217 accounts = [account] 218 num_of_accounts = len(accounts) 214 215 num_of_accounts = gajim.get_number_of_connected_accounts() 219 216 num_of_secured = gajim.get_number_of_securely_connected_accounts() 220 if num_of_secured and gajim.con_types.has_key(account) and \ 221 gajim.con_types[account] in ('tls', 'ssl'): 217 218 if gajim.account_is_securely_connected(account) and not self.regroup or \ 219 self.regroup and num_of_secured and num_of_secured == num_of_accounts: 222 220 tls_pixbuf = self.window.render_icon(gtk.STOCK_DIALOG_AUTHENTICATION, 223 221 gtk.ICON_SIZE_MENU) # the only way to create a pixbuf from stock 224 if num_of_secured < num_of_accounts:225 # Make it transparent226 colorspace = tls_pixbuf.get_colorspace()227 bps = tls_pixbuf.get_bits_per_sample()228 rowstride = tls_pixbuf.get_rowstride()229 pixels = tls_pixbuf.get_pixels()230 new_pixels = ''231 width = tls_pixbuf.get_width()232 height = tls_pixbuf.get_height()233 for i in range(0, width*height):234 rgb = pixels[4*i:4*i+3]235 new_pixels += rgb236 if rgb == chr(0)*3:237 new_pixels += chr(0)238 else:239 new_pixels += chr(128)240 tls_pixbuf = gtk.gdk.pixbuf_new_from_data(new_pixels, colorspace,241 True, bps, width, height, rowstride)242 222 model[iter][C_PADLOCK_PIXBUF] = tls_pixbuf 243 223 else: … … 1440 1420 return 1441 1421 info[contact.jid] = vcard.ZeroconfVcardWindow(contact, account) 1442 1443 1422 1444 1423 def show_tooltip(self, contact):
