diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2014-03-20 22:52:48 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2014-03-20 22:52:48 (GMT) |
commit | 18d6b808db6e31e867525d68f92d6f928a7ab5a7 (patch) | |
tree | d534c8e374004866696322a4c3f58ae2a7a545d9 /src/gui/menus | |
parent | 84790a5b420d0a9ce658013573b180ce059db325 (diff) |
Created the first steps for a distributed storage.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@368 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
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 : - * |