Index: channels/search.py ================================================================== --- channels/search.py +++ channels/search.py @@ -166,16 +166,18 @@ # config.quicksearch_fields text = text.lower() # simple string match (probably doesn't need full search expression support) if len(q) and text.find(q) >= 0: - model.set_value(iter, color, "#fe9") # highlighting color - model.set_value(iter, flag, True) # background-set flag + model.set_value(iter, color, "#fe9") # highlighting color + model.set_value(iter, flag, True) # background-set flag # color = 12 in liststore, flag = 13th position else: - model.set_value(iter, color, "") # for some reason the cellrenderer colors get applied to all rows, even if we specify an iter (=treelist position?, not?) - model.set_value(iter, flag, False) # that's why we need the secondary -set option + normal_bg = uikit.get_bg_color(self.main.channel().gtk_list) + #normal_bg = "#ffffff" + model.set_value(iter, color, normal_bg) # for some reason the cellrenderer colors get applied to all rows, even if we specify an iter (=treelist position?, not?) + model.set_value(iter, flag, False) # that's why we need the secondary -set option #?? return False Index: uikit.py ================================================================== --- uikit.py +++ uikit.py @@ -164,17 +164,18 @@ int: 0, gtk.gdk.Pixbuf: empty_pixbuf } if gtk.gdk.Pixbuf in vartypes: pix_entry = vartypes.index(gtk.gdk.Pixbuf) - + + normal_bg = uikit.get_bg_color(widget) # sort data into gtk liststore array for row in entries: # preset some values if absent row.setdefault("deleted", False) - row.setdefault("search_col", "#ffffff") + row.setdefault("search_col", normal_bg) #ffffff row.setdefault("search_set", False) # generate ordered list from dictionary, using rowmap association row = [ row.get( skey , defaults[vartypes[i]] ) for i,skey in enumerate(rowmap) ] @@ -207,10 +208,20 @@ return ls, rowmap, pix_entry pass + # figure out standard background + @staticmethod + def get_bg_color(widget): + try: + # Gtk3 only + normal_bg = widget.get_style_context().get_background_color(gtk.StateType.NORMAL) + normal_bg = normal_bg.to_string() + except: + normal_bg = "#ffffff" # Gtk2 default + return normal_bg #-- treeview for categories # # simple two-level treeview display in one column