gtg-contributors team mailing list archive
-
gtg-contributors team
-
Mailing list archive
-
Message #00833
Re: tag-bg-color patch
Hi,
2012/3/29 Izidor Matušov <izidor.matusov@xxxxxxxxx>
> It is about really old API calls.
>
> If you replace lines 355 - 359 with this code:
>
> t = self.req.get_tag(tag)
> if t is None:
> pass # something bad has happened and it should be handled
> tag_color = t.get_attribute('color')
> if tag_color is None:
> tag_color = <default color>
>
I tried it out, but it doesn't work yet. I think that what I'm doing is
taking the color that has been assigned to the tag shapes in
on_colorchooser_activate, and assigning it instead of the default color
when it has been set, and keeping it 'default' when it hasn't. I think the
problem is that the highlight (default) color doesn't have a setter (maybe
the color is hardcoded in?).
Does this sound at all correct? I'm getting this debug message:
Traceback (most recent call last):
File "/home/meg/gtg/trunk/GTG/gtk/browser/browser.py", line 729, in
on_colorchooser_activate
t.set_attribute("color", strcolor)
AttributeError: 'str' object has no attribute 'set_attribute'
Meg
>
>
> That could should be equivalent. I haven't tested that code, writing that
> just top of my head.
>
> Izidor
>
Follow ups
References