GNOME Bugzilla – Bug 558576
Add segmented bar to properties
Last modified: 2018-05-24 13:45:52 UTC
To show what would be sync'ed, and what's already there. Python version: http://bazaar.launchpad.net/%7Eubuntu-installer/ubiquity/trunk/annotate/2936?file_id=segmented_bar.py-20080826141124-1epjtw32ze49o2s2-1 C# version: http://svn.gnome.org/viewvc/banshee/trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Widgets/SegmentedBar.cs?view=log Screenshots attached.
Created attachment 121672 [details] media-sync-mac.jpg
Created attachment 121673 [details] smsm-index_03.png
Created attachment 121674 [details] g1-linux-integration-crop.png
Created attachment 121675 [details] partitioner.png
Created attachment 123288 [details] [review] Initial work Some initial work for this bug, I ported the C# from Banshee to a C widget. So far it compiles but the widget displays nothing (I haven't had time to investigate yet). I haven't ported the text support yet, but it shouldn't be too hard, just a bit more code to write. I'm also planning to change the licence so something more liberal (LGPL, or maybe the same licence as banshee).
Created attachment 123334 [details] [review] Working widget The widget can now display text, the API needs refining, some properties may be missing, but it's mostly working, the final tweaking and polishing can be done after experimenting with it.
Created attachment 123335 [details] screenshot Forgot to mention that the size_allocate/size_request methods are probably buggy at the moment, I haven't investigated how those work. a11y should also be added.
Review of attachment 123334 [details] [review]: This generally looks good to me, and I'd like to make use of it in the media player source info dialog, instead of the normal progress bar we currently have there. ::: widgets/rb-segmented-bar.c @@ +131,3 @@ + priv->segment_box_spacing = 6; + priv->bar_height = 26; /* why is that necessary? the corresponding + * property has a default value */ if you make it a construction property, the default value will be set during construction @@ +492,3 @@ + +static void hsb_from_color (Color *color, gdouble *hue, + gdouble *saturation, gdouble *brightness) this function doesn't exist somewhere in cairo or gdk or any other library we already use? ::: widgets/rb-segmented-bar.h @@ +67,3 @@ + gdouble red, gdouble green, + gdouble blue, gdouble alpha); +void rb_segmented_bar_add_segment_default_color (RBSegmentedBar *bar, maybe the add_segment functions should return the segment index to make it easier to update later?
Created attachment 151387 [details] [review] Add segmented bar to properties Port the segmented bar from Banshee.
Created attachment 151389 [details] [review] Add segmented bar widget Port the segmented bar from Banshee.
Created attachment 151390 [details] [review] Add segmented bar widget Port the segmented bar from Banshee.
This fixes all 3 comments from comment 8, and implements size_request with the minimum height set to the size of the bar +/- labels, and a minimum width of either 200, or the width of the labels (so they're not clipped). Go to go?
Review of attachment 151390 [details] [review]: I think so.. now we just have to use it for something.
Comment on attachment 151390 [details] [review] Add segmented bar widget Attachment 151390 [details] pushed as 88e7e9c - Add segmented bar widget
Leaving opened so we can close this when it's used in media player properties.
Created attachment 152854 [details] [review] fix compilation Rhythmbox master doesn't build for me without this patch.
Very possibly. Feel free to commit.
Can this bug be closed ?
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/rhythmbox/issues/653.