diff options
author | Søren Sandmann <sandmann@redhat.com> | 2008-03-09 15:38:36 -0400 |
---|---|---|
committer | Søren Sandmann <sandmann@redhat.com> | 2008-03-09 15:38:36 -0400 |
commit | 026076ce3fd74404472af51f31403f7f7ff93164 (patch) | |
tree | 444692d4f3733038c3ff0ab89d93f7dc5ac50208 | |
parent | 0edb4abff46d5a8eb72607434c24627911935be6 (diff) |
Make GET_WIDGET a function
-rw-r--r-- | window.c | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -5,9 +5,6 @@ #define MIN_ZOOM -80 #define MAX_ZOOM 65 -#define GET_WIDGET(window,name) \ - ((void *)glade_xml_get_widget(window->xml, name)) - struct Window { GladeXML * xml; @@ -22,6 +19,17 @@ struct Window App * app; }; +static void * +GET_WIDGET (Window *window, const char *name) +{ + void *result = glade_xml_get_widget (window->xml, name); + + if (!result) + g_error ("Could not find widget %s\n", name); + + return result; +} + static double get_scale (Window *window) { |