Re: On Emblems



Hi,

ok let's see now...

> From what I gathered above, the main features in your api are
> 1) and icon can have multiple emblems
> 2) each emblem can have a  type or origin
> 3) you can get the emblems back
> 
> I think this can easily be achieved in GEmblemedIcon by allowing it to
> have more than
> one emblem, and associate some extra information with it. Like

More than one emblem is really a must, in my opinion. For solving the
issues with the device icons, one emblem is probably enough but not for
tackling the other cases, which I already talked about.

> g_emblemed_icon_add_emblem (GEmblemedIcon *icon,
>                                                      GIcon
>      *emblem,
>                                                      const char
>    *origin)

Could you expand on how you would implement that within gemblemedicon?
I don't see the code in front of me right now...
Would you extend the instance-struct with a GList of emblems or sth alike?
Or would you just provide a function which does the recursion? But
aren't we implementing a single-linked list then?

> a GEmblem class, but I'm sure that is really necessary (you haven't
> said what  additional
> properties your GEmblem provides).

You are right, I didn't explicitly talk about that. I thought of having
something like boolean properties: from_livemetadata, from_usermetadata.
Something like a gchar* origin is perhaps equally fine but besides the
cleaner accessibility of properties, the beauty of those is that we can
adapt them more easily, I guess.

> What I'm not convinced about is adding an extra interface for
> 'emblemable' icons and
> implementing it multiple times [...]

OK, I agree that reimplementing this is not quite appealing, but I guess
with my Ansatz this is price one would have to pay due to the GObject
Class Model not allowing multiple inheritance(which I don't want to say
is a bad thing ...). On the other hand the implementation is
straight-forward.

Esthetically, I just think that themed and file icons on the one hand
and an emblemed icon on the other hand are different. With themed and
file icons we say that an icon comes from a file or should be looked up
in a theme.
Compared with this an icon with emblems is an icon with some other icons
on top of it. I would prefer to have that represented in the API.



Best Regards,


Clemens


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]