+/** @brief Create buttons and pack them into a box, which is returned */
+GtkWidget *create_buttons_box(struct button *buttons,
+ size_t nbuttons,
+ GtkWidget *box) {
+ size_t n;
+
+ for(n = 0; n < nbuttons; ++n) {
+ buttons[n].widget = gtk_button_new_from_stock(buttons[n].stock);
+ gtk_widget_set_style(buttons[n].widget, tool_style);
+ g_signal_connect(G_OBJECT(buttons[n].widget), "clicked",
+ G_CALLBACK(buttons[n].clicked), 0);
+ gtk_box_pack_start(GTK_BOX(box), buttons[n].widget, FALSE, FALSE, 1);
+ gtk_tooltips_set_tip(tips, buttons[n].widget, buttons[n].tip, "");
+ }
+ return box;
+}
+
+/** @brief Create buttons and pack them into an hbox */
+GtkWidget *create_buttons(struct button *buttons,
+ size_t nbuttons) {
+ return create_buttons_box(buttons, nbuttons,
+ gtk_hbox_new(FALSE, 1));
+}
+
+
+