diff options
Diffstat (limited to 'src/gui/menus')
-rw-r--r-- | src/gui/menus/binary.c | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/gui/menus/binary.c b/src/gui/menus/binary.c index 8699c02..114e90d 100644 --- a/src/gui/menus/binary.c +++ b/src/gui/menus/binary.c @@ -30,10 +30,14 @@ #include "../editem-int.h" #include "../../dialogs/export.h" +#include "../../dialogs/storage.h" #include "../../gtkext/easygtk.h" +/* Réagit au menu "Binaire -> Enregistrements...". */ +static void mcb_binary_storage(GtkMenuItem *, GMenuBar *); + /* Réagit au menu "Binaire -> Exporter...". */ static void mcb_binary_export(GtkMenuItem *, GMenuBar *); @@ -65,6 +69,10 @@ GtkWidget *build_menu_binary(GObject *ref, GtkAccelGroup *accgroup, GMenuBar *ba menubar = gtk_menu_new(); gtk_menu_item_set_submenu(GTK_MENU_ITEM(result), menubar); + submenuitem = qck_create_menu_item(ref, "mnu_binary_storage", _("Storage..."), + G_CALLBACK(mcb_binary_storage), bar); + gtk_container_add(GTK_CONTAINER(menubar), submenuitem); + submenuitem = qck_create_menu_item(ref, "mnu_binary_export", _("Export..."), G_CALLBACK(mcb_binary_export), bar); gtk_container_add(GTK_CONTAINER(menubar), submenuitem); @@ -79,6 +87,49 @@ GtkWidget *build_menu_binary(GObject *ref, GtkAccelGroup *accgroup, GMenuBar *ba * Paramètres : menuitem = élément de menu sélectionné. * * bar = barre de menu parente. * * * +* Description : Réagit au menu "Binaire -> Enregistrements...". * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +static void mcb_binary_storage(GtkMenuItem *menuitem, GMenuBar *bar) +{ + GLoadedBinary *binary; /* Edition courante */ + GObject *ref; /* Espace de référencements */ + GtkWidget *dialog; /* Boîte de dialogue à montrer */ + + binary = g_editor_item_get_current_binary(G_EDITOR_ITEM(bar)); + ref = g_editor_item_get_global_ref(G_EDITOR_ITEM(bar)); + + dialog = create_storage_dialog(binary, GTK_WINDOW(ref)); + + if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK) + { + /* TODO */ + + + /* + addr = get_address_from_goto_dialog(dialog); + + vpanel = g_editor_item_get_current_view(G_EDITOR_ITEM(bar)); + gtk_view_panel_scroll_to_address(vpanel, addr); + */ + + } + + gtk_widget_destroy(dialog); + +} + + +/****************************************************************************** +* * +* Paramètres : menuitem = élément de menu sélectionné. * +* bar = barre de menu parente. * +* * * Description : Réagit au menu "Binaire -> Exporter...". * * * * Retour : - * |