GNOME Bugzilla – Bug 760656
Turn layersPopover.js into a composite templated widget
Last modified: 2016-01-29 23:22:35 UTC
The file layersPopover.js right now uses GtkBuilder to load UI resources from layers-popover.ui. We want to convert to using templates instead. Look at for instance zoomControl.js/zoom-control.ui or sidebar.js/sidebar.ui to get inspiration!
Created attachment 319745 [details] [review] Turn layersPopover.js into a composite templated widget
Review of attachment 319745 [details] [review]: Thanks! Don't you also need to change the ui file to <template class="Gjs_LayersPopover" parent="GtkPopover"> ? Like for instance sidebar.ui? ::: data/ui/layers-popover.ui @@ +22,2 @@ <property name="visible">True</property> + <property name="pixbuf">data/media/maptype-street.png</property> why is this needed? And why can't we use icon-name for these?
Review of attachment 319745 [details] [review]: Also, could commit log be something like: "layersPopover: Convert to composite template"
Review of attachment 319745 [details] [review]: ::: data/ui/layers-popover.ui @@ +22,2 @@ <property name="visible">True</property> + <property name="pixbuf">data/media/maptype-street.png</property> Without data/media/ it can't find .png file. I am not sure why behavior was different before but now it said: Could not load image 'maptype-street.png': Failed to open file '/home/alaf/jhbuild/checkout/gnome-maps/maptype-street.png': No such file or directory So I added data/media/ , now it works fine.
Created attachment 319788 [details] [review] layersPopover: Convert to composite template
Attachment 319788 [details] pushed as 68fe080 - layersPopover: Convert to composite template