fixing colors and prettying the gc and chat window a bit

This commit is contained in:
Nikos Kouremenos 2005-06-11 13:45:48 +00:00
parent d994d8128e
commit 2214478e87
4 changed files with 15 additions and 12 deletions

View File

@ -647,10 +647,10 @@ class GroupchatWindow(chat.Chat):
# set the fg colour of the label to white # set the fg colour of the label to white
self.name_labels[room_jid].modify_fg(gtk.STATE_NORMAL, gtk.gdk.color_parse('white')) self.name_labels[room_jid].modify_fg(gtk.STATE_NORMAL, gtk.gdk.color_parse('white'))
gc_banner_eventbox = self.xmls[room_jid].get_widget('gc_banner_eventbox') banner_eventbox = self.xmls[room_jid].get_widget('banner_eventbox')
# get the background color from the current theme # get the background color from the current theme
bgcolor = gajim.config.get('accountbgcolor') bgcolor = gajim.config.get('accountbgcolor')
gc_banner_eventbox.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse(bgcolor)) banner_eventbox.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse(bgcolor))
# connect the menuitems to their respective functions # connect the menuitems to their respective functions
xm = gtk.glade.XML(GTKGUI_GLADE, 'gc_actions_menu', APP) xm = gtk.glade.XML(GTKGUI_GLADE, 'gc_actions_menu', APP)
@ -703,10 +703,13 @@ class GroupchatWindow(chat.Chat):
conversation_textview.grab_focus() conversation_textview.grab_focus()
def tree_cell_data_func(self, column, renderer, model, iter, data=None): def tree_cell_data_func(self, column, renderer, model, iter, data=None):
if not model.iter_parent(iter): # is iter toplevel? (ie. group) if model.iter_parent(iter):
bgcolor = gajim.config.get('userbgcolor')
renderer.set_property('cell-background', bgcolor)
else: # it is root (eg. group)
bgcolor = gajim.config.get('groupbgcolor') bgcolor = gajim.config.get('groupbgcolor')
renderer.set_property('cell-background', bgcolor) renderer.set_property('cell-background', bgcolor)
renderer.set_property('cell-background', bgcolor)
def on_actions_button_clicked(self, button): def on_actions_button_clicked(self, button):
"""popup action menu""" """popup action menu"""

View File

@ -8173,7 +8173,7 @@ Custom</property>
<property name="spacing">0</property> <property name="spacing">0</property>
<child> <child>
<widget class="GtkEventBox" id="gc_banner_eventbox"> <widget class="GtkEventBox" id="banner_eventbox">
<property name="visible">True</property> <property name="visible">True</property>
<property name="visible_window">True</property> <property name="visible_window">True</property>
<property name="above_child">False</property> <property name="above_child">False</property>
@ -9650,7 +9650,7 @@ This is the subject.</property>
<property name="ypad">0</property> <property name="ypad">0</property>
</widget> </widget>
<packing> <packing>
<property name="padding">0</property> <property name="padding">3</property>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">False</property> <property name="fill">False</property>
</packing> </packing>
@ -9702,7 +9702,7 @@ JID: whatever@jabber.org</property>
<property name="ypad">0</property> <property name="ypad">0</property>
</widget> </widget>
<packing> <packing>
<property name="padding">5</property> <property name="padding">3</property>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">False</property> <property name="fill">False</property>
</packing> </packing>

View File

@ -795,7 +795,7 @@ class RosterWindow:
model = self.tree.get_model() model = self.tree.get_model()
iter = model.get_iter(path) iter = model.get_iter(path)
type = model.get_value(iter, 2) type = model.get_value(iter, 2)
if (type == 'group'): if type == 'group':
if x < 20: # first cell in 1st column (the arrow SINGLE clicked) if x < 20: # first cell in 1st column (the arrow SINGLE clicked)
if (self.tree.row_expanded(path)): if (self.tree.row_expanded(path)):
self.tree.collapse_row(path) self.tree.collapse_row(path)
@ -1192,8 +1192,8 @@ class RosterWindow:
account = model.get_value(iter, 4) account = model.get_value(iter, 4)
type = model.get_value(iter, 2) type = model.get_value(iter, 2)
jid = model.get_value(iter, 3) jid = model.get_value(iter, 3)
if (type == 'group') or (type == 'account'): if type == 'group' or type == 'account':
if (self.tree.row_expanded(path)): if self.tree.row_expanded(path):
self.tree.collapse_row(path) self.tree.collapse_row(path)
else: else:
self.tree.expand_row(path, False) self.tree.expand_row(path, False)

View File

@ -132,7 +132,7 @@ class TabbedChatWindow(chat.Chat):
pixbufloader.write(img_decoded) pixbufloader.write(img_decoded)
pixbuf = pixbufloader.get_pixbuf() pixbuf = pixbufloader.get_pixbuf()
pixbufloader.close() pixbufloader.close()
scaled_buf = pixbuf.scale_simple(46, 46, gtk.gdk.INTERP_HYPER) scaled_buf = pixbuf.scale_simple(52, 52, gtk.gdk.INTERP_HYPER)
image = self.xmls[vcard['jid']].get_widget('avatar_image') image = self.xmls[vcard['jid']].get_widget('avatar_image')
image.set_from_pixbuf(scaled_buf) image.set_from_pixbuf(scaled_buf)
image.show_all() image.show_all()