@@ -119,10 +119,10 @@ public class Code.FormatBar : Gtk.Box {
119119
120120 popover_content.show_all ();
121121
122- var lang_popover = new Gtk .Popover (lang_menubutton);
123- lang_popover . position = Gtk . PositionType . BOTTOM;
124- lang_popover.add ( popover_content );
125-
122+ var lang_popover = new Gtk .Popover (lang_menubutton) {
123+ position = Gtk . PositionType . BOTTOM,
124+ child = popover_content
125+ };
126126 lang_menubutton. popover = lang_popover;
127127
128128 lang_selection_listbox.row_activated.connect ((row ) => {
@@ -180,10 +180,9 @@ public class Code.FormatBar : Gtk.Box {
180180 box. show_all ();
181181
182182 var tab_popover = new Gtk .Popover (tab_menubutton) {
183- position = Gtk . PositionType . BOTTOM
183+ position = Gtk . PositionType . BOTTOM ,
184+ child = box
184185 };
185- tab_popover. add (box);
186-
187186 tab_menubutton. popover = tab_popover;
188187
189188 Scratch . settings. changed[" indent-width" ]. connect (format_tab_header_from_global_settings);
@@ -251,10 +250,10 @@ public class Code.FormatBar : Gtk.Box {
251250 line_grid. attach (goto_entry, 1 , 0 , 1 , 1 );
252251 line_grid. show_all ();
253252
254- var line_popover = new Gtk .Popover (line_menubutton);
255- line_popover . position = Gtk . PositionType . BOTTOM;
256- line_popover . add ( line_grid);
257-
253+ var line_popover = new Gtk .Popover (line_menubutton) {
254+ position = Gtk . PositionType . BOTTOM,
255+ child = line_grid
256+ };
258257 line_menubutton. popover = line_popover;
259258
260259 // We need to connect_after because otherwise, the text isn't parsed into the "value" property and we only get the previous value
0 commit comments