diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2020-08-18 22:39:43 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2020-08-18 22:39:43 (GMT) |
commit | 81c1646a1eb96a6291b18a5a37f87bf6805b6794 (patch) | |
tree | c5093a7f5d535b3169bcce8d3f07c071541366cc /src/gui/menus/help.c | |
parent | 3e9d5cedf701fd8957024f7ddf65238aea9a1eba (diff) |
Centralized the macro used to provide callbacks to GtkBuilder easily.
Diffstat (limited to 'src/gui/menus/help.c')
-rw-r--r-- | src/gui/menus/help.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/gui/menus/help.c b/src/gui/menus/help.c index db19758..78c1072 100644 --- a/src/gui/menus/help.c +++ b/src/gui/menus/help.c @@ -30,6 +30,7 @@ #include "../core/global.h" #include "../dialogs/about.h" +#include "../../gtkext/easygtk.h" @@ -61,14 +62,11 @@ static void mcb_help_about(GtkMenuItem *, gpointer); void setup_menu_help_callbacks(GtkBuilder *builder) { - -#define DEFINE_CALLBACK(cb) #cb, G_CALLBACK(cb) - gtk_builder_add_callback_symbols(builder, - DEFINE_CALLBACK(mcb_help_website), - DEFINE_CALLBACK(mcb_help_python_api_documentation), - DEFINE_CALLBACK(mcb_help_bug_report), - DEFINE_CALLBACK(mcb_help_about), + BUILDER_CALLBACK(mcb_help_website), + BUILDER_CALLBACK(mcb_help_python_api_documentation), + BUILDER_CALLBACK(mcb_help_bug_report), + BUILDER_CALLBACK(mcb_help_about), NULL); } |