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/binary.c | |
parent | 3e9d5cedf701fd8957024f7ddf65238aea9a1eba (diff) |
Centralized the macro used to provide callbacks to GtkBuilder easily.
Diffstat (limited to 'src/gui/menus/binary.c')
-rw-r--r-- | src/gui/menus/binary.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/gui/menus/binary.c b/src/gui/menus/binary.c index 4ec866b..87558a0 100644 --- a/src/gui/menus/binary.c +++ b/src/gui/menus/binary.c @@ -36,6 +36,7 @@ #include "../dialogs/gotox.h" #include "../dialogs/snapshots.h" #include "../dialogs/storage.h" +#include "../../gtkext/easygtk.h" #include "../../gtkext/gtkdisplaypanel.h" #include "../../gtkext/gtkgraphdisplay.h" @@ -75,16 +76,13 @@ static void mcb_binary_export_graph(GtkMenuItem *, gpointer); void setup_menu_binary_callbacks(GtkBuilder *builder) { - -#define DEFINE_CALLBACK(cb) #cb, G_CALLBACK(cb) - gtk_builder_add_callback_symbols(builder, - DEFINE_CALLBACK(mcb_binary_entry_points), - DEFINE_CALLBACK(mcb_binary_attach_debugger), - DEFINE_CALLBACK(mcb_binary_storage), - DEFINE_CALLBACK(mcb_binary_snapshots), - DEFINE_CALLBACK(mcb_binary_export_disass), - DEFINE_CALLBACK(mcb_binary_export_graph), + BUILDER_CALLBACK(mcb_binary_entry_points), + BUILDER_CALLBACK(mcb_binary_attach_debugger), + BUILDER_CALLBACK(mcb_binary_storage), + BUILDER_CALLBACK(mcb_binary_snapshots), + BUILDER_CALLBACK(mcb_binary_export_disass), + BUILDER_CALLBACK(mcb_binary_export_graph), NULL); } |