Code review comment for lp:~gotwig/simple-scan/headerbars

Revision history for this message
Michael Catanzaro (mike-catanzaro) wrote :

I think that if you want to add the header bar only conditionally, then you should not attempt to do so in the UI file at all; this is doomed. Create the header bar entirely in Vala, pack your buttons into it, then grab your GtkApplicationWindow out of the UI file using GtkBuilder in order to set it as the titlebar. It's much, much nicer to define the header bar in a UI file than in Vala, but only if you want to use it unconditionally. Mahjongg is probably the best example of how to do this in Vala: https://git.gnome.org/browse/gnome-mahjongg/tree/src/gnome-mahjongg.vala

P.S. To convert tabs to spaces, open the file in gedit, press Ctrl+H to do a search and replace, type \t in the search box and the desired number of spaces in the replace box.

P.S.S. Also, saving the toolbar toolbuttons and header bar toolbar buttons separately is not a good idea; note that Gtk.ToolButton is derived from Gtk.Button so you should not need two different variables.

« Back to merge proposal