[Sugar-devel] [PATCH] Record: icons for the toolbar that replace strings "timer" and "duration"

Daniel Drake dsd at laptop.org
Fri Jul 22 18:34:36 EDT 2011


2011/7/20 Gary Martin <garycmartin at googlemail.com>:
> Apologies for the long delay getting back, and thanks for the screen shot! I've also now tried it out with the updated Record in the os874 xo-1 build. Very nice :) I think this works great as a solution to remove the long text. +1 for landing this officially, this is way better than what we previously had.

Thanks for reviewing.

> Option 1. Ideally the icon would only show in the combo widget when it is not currently open, and when a user does click to open the combo, the menu options would be text only (no repeated clock icons for each contained item).

I've just looked into this, without success. I looked at how
GtkComboBoxEntry is based on a GtkComboBox but the un-expanded mode
shows something different (a text entry). This is because if you add a
child widget to a GtkComboBox it will replace the default unexpanded
rendering. Nice.

However, I got so far and then realised that if you replace the
default rendering in this way, your own widget doesn't get "enclosed"
in the combo box. It appears distinct, at the side of it. Looking at
GtkComboBox source code, this isn't avoidable - we'd have to write our
own combo box widget to solve this (unless I'm missing something).

Attaching the demo app anyway - this shows a combo box with custom
widgets in the unexpanded rendering, vs a normal one below iit.

Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cb.py
Type: text/x-python
Size: 1262 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20110722/ddf2abc5/attachment.py>


More information about the Sugar-devel mailing list