summaryrefslogtreecommitdiff
path: root/src/gui/menus/options.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/menus/options.c')
-rw-r--r--src/gui/menus/options.c31
1 files changed, 10 insertions, 21 deletions
diff --git a/src/gui/menus/options.c b/src/gui/menus/options.c
index 62f58f5..03f5259 100644
--- a/src/gui/menus/options.c
+++ b/src/gui/menus/options.c
@@ -29,6 +29,7 @@
#include "../item-int.h"
+#include "../menubar.h"
#include "../core/global.h"
#include "../dialogs/identity.h"
#include "../dialogs/preferences.h"
@@ -46,37 +47,25 @@ static void mcb_options_identity(GtkMenuItem *, gpointer);
/******************************************************************************
* *
-* Paramètres : ref = espace de référencement global. *
-* bar = barre de menu parente. *
+* Paramètres : builder = constructeur avec l'ensemble des références. *
* *
-* Description : Construit le menu "Options". *
+* Description : Complète la définition du menu "Options". *
* *
-* Retour : Panneau de menus mis en place. *
+* Retour : - *
* *
* Remarques : - *
* *
******************************************************************************/
-GtkWidget *build_menu_options(GObject *ref, GMenuBar *bar)
+void setup_menu_options_callbacks(GtkBuilder *builder)
{
- GtkWidget *result; /* Support à retourner */
- GtkWidget *menubar; /* Support pour éléments */
- GtkWidget *submenuitem; /* Sous-élément de menu */
-
- result = gtk_menu_item_new_with_mnemonic(_("_Options"));
- gtk_widget_show(result);
-
- menubar = qck_create_menu(GTK_MENU_ITEM(result));
-
- submenuitem = qck_create_menu_item(ref, "mnu_options_preferences", _("Preferences"),
- G_CALLBACK(mcb_options_preferences), NULL);
- gtk_container_add(GTK_CONTAINER(menubar), submenuitem);
- submenuitem = qck_create_menu_item(ref, "mnu_options_identity", _("Identity"),
- G_CALLBACK(mcb_options_identity), NULL);
- gtk_container_add(GTK_CONTAINER(menubar), submenuitem);
+#define DEFINE_CALLBACK(cb) #cb, G_CALLBACK(cb)
- return result;
+ gtk_builder_add_callback_symbols(builder,
+ DEFINE_CALLBACK(mcb_options_preferences),
+ DEFINE_CALLBACK(mcb_options_identity),
+ NULL);
}