diff -r 9a5f47fbc5c3 -r 458831c574f4 ui/gtk/button.c --- a/ui/gtk/button.c Sat Apr 12 13:44:53 2014 +0200 +++ b/ui/gtk/button.c Sat May 10 15:43:22 2014 +0200 @@ -33,6 +33,7 @@ #include "container.h" #include "../../ucx/mempool.h" #include "../common/context.h" +#include "../common/object.h" UIWIDGET ui_button(UiObject *obj, char *label, ui_callback f, void *data) { GtkWidget *button = gtk_button_new_with_label(label); @@ -74,3 +75,13 @@ e.intval = event->value; event->callback(&e, event->user_data); } + +void ui_button_toggled(GtkToggleToolButton *widget, UiEventData *event) { + UiEvent e; + e.obj = event->obj; + e.window = event->obj->window; + e.document = event->obj->document; + e.eventdata = NULL; + e.intval = gtk_toggle_tool_button_get_active(widget); + event->callback(&e, event->user_data); +}