GNOME Bugzilla – Bug 682292
Add favorite emblems support
Last modified: 2016-03-31 13:54:59 UTC
SSIA
Created attachment 221883 [details] [review] util-app: copy create_symbolic_emblem() from gnome-documents
Created attachment 221884 [details] [review] display-config: add set_category() to add/remove a category
Created attachment 221885 [details] [review] selectionbar: update favorite button when selection changes Update favorite button sensitivity and state depending on selected machines.
Created attachment 221886 [details] [review] Rename s/favourite/favorite category Internal, now follows gtk naming
Created attachment 221887 [details] [review] collection-view: draw emblem on favorite machine SSIA, adapted from similar code from gnome-documents. Styling might not be good atm, but my local configuration doesn't work so I can't see what is really the current result or improve it. What I see isn't so bad, but doesn't look great either..
Review of attachment 221883 [details] [review]: ACK
Review of attachment 221884 [details] [review]: ::: src/display-config.vala @@ -48,2 +58,5 @@ categories += category; this.categories = categories; + } + + public void set_category (string category, bool enabled) { IMHO this seems like a weird API and i don't think this saves a lot of LOCs to caller but not really a big deal so keep it if you disagree.
Review of attachment 221885 [details] [review]: ::: src/selectionbar.vala @@ +77,3 @@ + + var is_favorite = "favorite" in machine.config.categories; + if (!active) { i don't quite follow the logic here. When do we want the button to be inactive and when do we want it insensitive? I'm guessing I'm missing something fundamental here.
Review of attachment 221886 [details] [review]: Seems you are doing a bit more than renaming here? ACK with the commit log corrected.
(In reply to comment #8) > Review of attachment 221885 [details] [review]: > > ::: src/selectionbar.vala > @@ +77,3 @@ > + > + var is_favorite = "favorite" in machine.config.categories; > + if (!active) { > > i don't quite follow the logic here. When do we want the button to be inactive > and when do we want it insensitive? I'm guessing I'm missing something > fundamental here. I am not sure what we should really do, but I am not fond of gnome-documents behaviour either, so here is the interaction: - no vm selection, favorite in insensitive - all vm selected are favorite or not favorite, the button is sensitive - the toggle state is set according to favorite or not - if the vm are mixed favorite and not favorite, the button is insensitive
Review of attachment 221886 [details] [review]: selectionbar: button toggles machine "favorite" category now internal, now follows gtk naming s/favourite/favorite category
Attachment 221883 [details] pushed as 9659102 - util-app: copy create_symbolic_emblem() from gnome-documents Attachment 221884 [details] pushed as 09c6cc5 - display-config: add set_category() to add/remove a category Attachment 221885 [details] pushed as 32c1f7f - selectionbar: update favorite button when selection changes Attachment 221887 [details] pushed as dd0be51 - collection-view: draw emblem on favorite machine