Closed GoogleCodeExporter closed 9 years ago
Attached is a very basic implementation.
It informs you of the indices of the current selection (if there is one) and
the total number of colors in the palette.
For now, it only activates when you drop color(s) on the PaletteList.
Current issues:
* I haven't figured out how I can print a '#'. sending it to a stringstream
just makes it disappear.
* messy code.
* 'stats' command in file menu; i intend to get rid of it but for now it's
useful.
Original comment by 00a...@gmail.com
on 12 Dec 2012 at 2:37
Attachments:
The first point above is wrong. `s.str("#");` doesn't work, but `s.str("");s <<
"#";` does.
Updated patch attached; it gives updates in most cases when it should. However
I haven't figured out how to get it to update after adding a set of colors (eg.
from 'blend colors' panel or 'mix colors' dialog), nor does it update when
moving through the palette using the cursor keys.
Original comment by 00a...@gmail.com
on 12 Dec 2012 at 3:25
Attachments:
.. or when a color is added via the colorpicker
Original comment by 00a...@gmail.com
on 12 Dec 2012 at 4:25
I suggest using a separate widget in a status bar for this additional
information, because status bar messages are context sensitive, and thus, only
visible when palette widget is focused (changed in attached patch).
Palette widget needs 'cursor-changed' event handler to catch selection changes.
Original comment by thezbyg
on 13 Dec 2012 at 5:06
Attachments:
Fantastic! That is exactly the style I originally intended to implement this
in. It turns out to work quite well, better than I thought before.
Note that while debugging this, I encountered a crash while dragging multiple
colors to the end of the palette. However once I tried to reproduce it, I
couldn't -- whether compiled with or without debugging symbols, with or without
the changes I'm proposing in this issue, running under GDB or not. I'm
considering it as a possible compiler or GTK+ bug for now.
The attached patch fixes all known outstanding issues. Totals are updated in
all relevant circumstances. Unless there are any other issues you wish to
raise, I'll commit it sometime in the next 3 days.
Original comment by 00a...@gmail.com
on 13 Dec 2012 at 7:05
Attachments:
Committed in commit bc15d3666491756b16d51075504423aace9ae9b1 .
Closing.
Original comment by 00a...@gmail.com
on 17 Dec 2012 at 6:09
Original issue reported on code.google.com by
00a...@gmail.com
on 10 Dec 2012 at 3:24