X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=blobdiff_plain;f=apps%2Fsilcer%2Fsrc%2Fsilcer_gladehelper.hh;fp=apps%2Fsilcer%2Fsrc%2Fsilcer_gladehelper.hh;h=4e3e3212925b80c69434ae87c842205b3daed23b;hp=0000000000000000000000000000000000000000;hb=0f3eb694d54c9319d738f8c14a1da9abb0cc2248;hpb=cc9d2eb79d4e4b7b46204b161bce25ccc685f600 diff --git a/apps/silcer/src/silcer_gladehelper.hh b/apps/silcer/src/silcer_gladehelper.hh new file mode 100644 index 00000000..4e3e3212 --- /dev/null +++ b/apps/silcer/src/silcer_gladehelper.hh @@ -0,0 +1,37 @@ +/* + + silcer_gladehelper.hh + + Author: Pekka Riikonen + + Copyright (C) 2001 Pekka Riikonen + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + +*/ + +#ifndef SILCER_GLADEHELPER_HH +#define SILCER_GLADEHELPER_HH + +#include +#include +#include + +template T *SilcerGetWidget(GladeXML* obj, const char *name) +{ + T *widget = + static_cast(Gtk::wrap_auto((GtkObject *) + glade_xml_get_widget(obj, name))); + if (!widget) + g_error("Could not find widget `%s'", name); + return widget; +} + +#endif /* SILCER_GLADEHELPER_HH */