ui/gtk/headerbar.c

changeset 90
f501f0efc9a8
parent 60
ee4e4742391e
equal deleted inserted replaced
89:2fbb3cac05a5 90:f501f0efc9a8
113 UiToolbarItem *item, 113 UiToolbarItem *item,
114 UiObject *obj, 114 UiObject *obj,
115 enum UiToolbarPos pos) 115 enum UiToolbarPos pos)
116 { 116 {
117 GtkWidget *button = ui_create_button(obj, item->args.label, item->args.icon, item->args.onclick, item->args.onclickdata, 0, FALSE); 117 GtkWidget *button = ui_create_button(obj, item->args.label, item->args.icon, item->args.onclick, item->args.onclickdata, 0, FALSE);
118 ui_set_widget_groups(obj->ctx, button, item->args.groups);
118 WIDGET_ADD_CSS_CLASS(button, "flat"); 119 WIDGET_ADD_CSS_CLASS(button, "flat");
119 headerbar_add(headerbar, box, button, pos); 120 headerbar_add(headerbar, box, button, pos);
120 } 121 }
121 122
122 void ui_add_headerbar_toggleitem( 123 void ui_add_headerbar_toggleitem(
125 UiToolbarToggleItem *item, 126 UiToolbarToggleItem *item,
126 UiObject *obj, 127 UiObject *obj,
127 enum UiToolbarPos pos) 128 enum UiToolbarPos pos)
128 { 129 {
129 GtkWidget *button = gtk_toggle_button_new(); 130 GtkWidget *button = gtk_toggle_button_new();
131 ui_set_widget_groups(obj->ctx, button, item->args.groups);
130 WIDGET_ADD_CSS_CLASS(button, "flat"); 132 WIDGET_ADD_CSS_CLASS(button, "flat");
131 ui_setup_togglebutton(obj, button, item->args.label, item->args.icon, item->args.varname, NULL, item->args.onchange, item->args.onchangedata, 0); 133 ui_setup_togglebutton(obj, button, item->args.label, item->args.icon, item->args.varname, NULL, item->args.onchange, item->args.onchangedata, 0);
132 headerbar_add(headerbar, box, button, pos); 134 headerbar_add(headerbar, box, button, pos);
133 } 135 }
134 136
167 #endif 169 #endif
168 170
169 headerbar_add(headerbar, box, menubutton, pos); 171 headerbar_add(headerbar, box, menubutton, pos);
170 } 172 }
171 173
172 #endif 174 #endif // GTK_CHECK_VERSION(3, 10, 0)

mercurial