Use icons from IconTheme in Dialogs
This commit is contained in:
parent
2c2e946a88
commit
4f92142d09
1 changed files with 10 additions and 15 deletions
|
@ -928,10 +928,10 @@ class AddNewContactWindow:
|
||||||
'prompt': None}
|
'prompt': None}
|
||||||
self.available_types.append(type_)
|
self.available_types.append(type_)
|
||||||
# Combobox with transport/jabber icons
|
# Combobox with transport/jabber icons
|
||||||
liststore = Gtk.ListStore(str, GdkPixbuf.Pixbuf, str)
|
liststore = Gtk.ListStore(str, str, str)
|
||||||
cell = Gtk.CellRendererPixbuf()
|
cell = Gtk.CellRendererPixbuf()
|
||||||
self.protocol_combobox.pack_start(cell, False)
|
self.protocol_combobox.pack_start(cell, False)
|
||||||
self.protocol_combobox.add_attribute(cell, 'pixbuf', 1)
|
self.protocol_combobox.add_attribute(cell, 'icon_name', 1)
|
||||||
cell = Gtk.CellRendererText()
|
cell = Gtk.CellRendererText()
|
||||||
cell.set_property('xpad', 5)
|
cell.set_property('xpad', 5)
|
||||||
self.protocol_combobox.pack_start(cell, True)
|
self.protocol_combobox.pack_start(cell, True)
|
||||||
|
@ -940,21 +940,16 @@ class AddNewContactWindow:
|
||||||
uf_type = {'jabber': 'XMPP', 'aim': 'AIM', 'gadu-gadu': 'Gadu Gadu',
|
uf_type = {'jabber': 'XMPP', 'aim': 'AIM', 'gadu-gadu': 'Gadu Gadu',
|
||||||
'icq': 'ICQ', 'msn': 'MSN', 'yahoo': 'Yahoo'}
|
'icq': 'ICQ', 'msn': 'MSN', 'yahoo': 'Yahoo'}
|
||||||
# Jabber as first
|
# Jabber as first
|
||||||
img = app.interface.jabber_state_images['16']['online']
|
online_icon = gtkgui_helpers.get_iconset_name_for('online')
|
||||||
liststore.append(['XMPP', img.get_pixbuf(), 'jabber'])
|
liststore.append(['XMPP', online_icon, 'jabber'])
|
||||||
for type_ in self.agents:
|
for type_ in self.agents:
|
||||||
if type_ == 'jabber':
|
if type_ == 'jabber':
|
||||||
continue
|
continue
|
||||||
imgs = app.interface.roster.transports_state_images
|
|
||||||
img = None
|
|
||||||
if type_ in imgs['16'] and 'online' in imgs['16'][type_]:
|
|
||||||
img = imgs['16'][type_]['online']
|
|
||||||
if type_ in uf_type:
|
if type_ in uf_type:
|
||||||
liststore.append([uf_type[type_], img.get_pixbuf(), type_])
|
liststore.append([uf_type[type_], type_ + '-online', type_])
|
||||||
else:
|
else:
|
||||||
liststore.append([type_, img.get_pixbuf(), type_])
|
liststore.append([type_, type_ + '-online', type_])
|
||||||
else:
|
|
||||||
liststore.append([type_, img, type_])
|
|
||||||
if account:
|
if account:
|
||||||
for service in self.agents[type_]:
|
for service in self.agents[type_]:
|
||||||
app.connections[account].request_gateway_prompt(service)
|
app.connections[account].request_gateway_prompt(service)
|
||||||
|
@ -3328,8 +3323,8 @@ class SingleMessageWindow:
|
||||||
keys = sorted(self.completion_dict.keys())
|
keys = sorted(self.completion_dict.keys())
|
||||||
for jid in keys:
|
for jid in keys:
|
||||||
contact = self.completion_dict[jid]
|
contact = self.completion_dict[jid]
|
||||||
img = app.interface.jabber_state_images['16'][contact.show]
|
status_icon = gtkgui_helpers.get_iconset_name_for(contact.show)
|
||||||
liststore.append((img.get_pixbuf(), jid))
|
liststore.append((status_icon, jid))
|
||||||
else:
|
else:
|
||||||
self.completion_dict = {}
|
self.completion_dict = {}
|
||||||
self.xml.connect_signals(self)
|
self.xml.connect_signals(self)
|
||||||
|
|
Loading…
Add table
Reference in a new issue