After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 671057 - colorchooser can't remove palette
colorchooser can't remove palette
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2012-02-29 13:00 UTC by Christian Persch
Modified: 2012-03-04 05:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
colorchooser: Allow removing the palettes again (3.84 KB, patch)
2012-03-02 17:46 UTC, Christian Persch
accepted-commit_now Details | Review
colorchooser: Allow removing the palettes again (4.63 KB, patch)
2012-03-04 05:28 UTC, Matthias Clasen
committed Details | Review
Break out press-and-hold code as its own object (17.09 KB, patch)
2012-03-04 05:28 UTC, Matthias Clasen
committed Details | Review

Description Christian Persch 2012-02-29 13:00:41 UTC
Once added with gtk_color_chooser_add_palette, there doesn't appear to be a way to remove the palette(s) again.

Maybe do this when passed colours=NULL, n_colors=0 ?
Comment 1 Matthias Clasen 2012-02-29 15:11:31 UTC
Oh, I think I had been meaning to do that (add some special parameter combination to mean 'reset'). Patch welcome.
Comment 2 Christian Persch 2012-03-01 22:25:28 UTC
Reset to no palettes at all, or to the builtin stock palette?
Comment 3 Matthias Clasen 2012-03-02 05:58:59 UTC
No palette at all, I guess ?
Comment 4 Christian Persch 2012-03-02 17:46:25 UTC
Created attachment 208864 [details] [review]
colorchooser: Allow removing the palettes again
Comment 5 Matthias Clasen 2012-03-02 18:37:24 UTC
Review of attachment 208864 [details] [review]:

Looks ok. The --no-palette option seems dubious though :-)
Comment 6 Matthias Clasen 2012-03-04 05:28:43 UTC
The following fixes have been pushed:
5a8dba7 colorchooser: Allow removing the palettes again
912ad3b Break out press-and-hold code as its own object
Comment 7 Matthias Clasen 2012-03-04 05:28:46 UTC
Created attachment 208937 [details] [review]
colorchooser: Allow removing the palettes again
Comment 8 Matthias Clasen 2012-03-04 05:28:49 UTC
Created attachment 208938 [details] [review]
Break out press-and-hold code as its own object