From 55184eaa3682f704ddb9e2da63cd14bc0a62b7a3 Mon Sep 17 00:00:00 2001
From: Cyrille Bagard <nocbos@gmail.com>
Date: Mon, 18 Feb 2019 18:45:39 +0100
Subject: Prepared room for an incoming preferences dialog box.

---
 src/gui/dialogs/Makefile.am    |   2 +
 src/gui/dialogs/gresource.xml  |   1 +
 src/gui/dialogs/identity.c     |   2 +-
 src/gui/dialogs/identity.h     |   2 +-
 src/gui/dialogs/preferences.c  |  93 ++++++++++++++
 src/gui/dialogs/preferences.h  |  37 ++++++
 src/gui/dialogs/preferences.ui | 283 +++++++++++++++++++++++++++++++++++++++++
 src/gui/menus/Makefile.am      |   2 +-
 src/gui/menus/menubar.c        |  10 +-
 src/gui/menus/options.c        | 144 +++++++++++++++++++++
 src/gui/menus/options.h        |  41 ++++++
 src/gui/menus/tools.c          | 104 ---------------
 src/gui/menus/tools.h          |  41 ------
 13 files changed, 609 insertions(+), 153 deletions(-)
 create mode 100644 src/gui/dialogs/preferences.c
 create mode 100644 src/gui/dialogs/preferences.h
 create mode 100644 src/gui/dialogs/preferences.ui
 create mode 100644 src/gui/menus/options.c
 create mode 100644 src/gui/menus/options.h
 delete mode 100644 src/gui/menus/tools.c
 delete mode 100644 src/gui/menus/tools.h

diff --git a/src/gui/dialogs/Makefile.am b/src/gui/dialogs/Makefile.am
index 35dfb0a..755ddbd 100644
--- a/src/gui/dialogs/Makefile.am
+++ b/src/gui/dialogs/Makefile.am
@@ -6,6 +6,7 @@ noinst_LTLIBRARIES  = libguidialogs.la
 UI_FILES =								\
 	bookmark.ui							\
 	identity.ui							\
+	preferences.ui						\
 	storage.ui
 
 libguidialogs_la_SOURCES =				\
@@ -16,6 +17,7 @@ libguidialogs_la_SOURCES =				\
 	gotox.h gotox.c						\
 	identity.h identity.c				\
 	plugins.h plugins.c					\
+	preferences.h preferences.c			\
 	resources.h resources.c				\
 	storage.h storage.c
 
diff --git a/src/gui/dialogs/gresource.xml b/src/gui/dialogs/gresource.xml
index e44045c..b6e3c32 100644
--- a/src/gui/dialogs/gresource.xml
+++ b/src/gui/dialogs/gresource.xml
@@ -3,6 +3,7 @@
     <gresource prefix="/org/chrysalide/gui/dialogs">
         <file compressed="true">bookmark.ui</file>
         <file compressed="true">identity.ui</file>
+        <file compressed="true">preferences.ui</file>
         <file compressed="true">storage.ui</file>
     </gresource>
 </gresources>
diff --git a/src/gui/dialogs/identity.c b/src/gui/dialogs/identity.c
index 9e3cfd7..5f51bc0 100644
--- a/src/gui/dialogs/identity.c
+++ b/src/gui/dialogs/identity.c
@@ -45,7 +45,7 @@ static void update_identity(GtkButton *button, GtkBuilder *);
 *  Paramètres  : parent = fenêtre principale de l'éditeur.                    *
 *                outb   = constructeur à détruire après usage. [OUT]          *
 *                                                                             *
-*  Description : Propose une édition des informations conernant l'utilisateur.*
+*  Description : Propose une édition d'informations concernant l'utilisateur. *
 *                                                                             *
 *  Retour      : Adresse de la fenêtre mise en place.                         *
 *                                                                             *
diff --git a/src/gui/dialogs/identity.h b/src/gui/dialogs/identity.h
index 99c0ca6..8d51c4d 100644
--- a/src/gui/dialogs/identity.h
+++ b/src/gui/dialogs/identity.h
@@ -29,7 +29,7 @@
 
 
 
-/* Propose une édition des informations conernant l'utilisateur. */
+/* Propose une édition d'informations concernant l'utilisateur. */
 GtkWidget *create_identity_dialog(GtkWindow *, GtkBuilder **);
 
 
diff --git a/src/gui/dialogs/preferences.c b/src/gui/dialogs/preferences.c
new file mode 100644
index 0000000..dcb4cc7
--- /dev/null
+++ b/src/gui/dialogs/preferences.c
@@ -0,0 +1,93 @@
+
+/* Chrysalide - Outil d'analyse de fichiers binaires
+ * preferences.c - (re)définition de l'identité de l'utilisateur
+ *
+ * Copyright (C) 2017 Cyrille Bagard
+ *
+ *  This file is part of Chrysalide.
+ *
+ *  Chrysalide is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  Chrysalide is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with Chrysalide.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#include "preferences.h"
+
+
+#include <i18n.h>
+
+
+
+/* Eléments de la liste de sections */
+typedef enum _PrefListItem
+{
+    PLI_TITLE,                              /* Etiquette de la section     */
+    PLI_PANEL,                              /* Panneau graphique associé   */
+
+} PrefListItem;
+
+
+
+/******************************************************************************
+*                                                                             *
+*  Paramètres  : parent = fenêtre principale de l'éditeur.                    *
+*                outb   = constructeur à détruire après usage. [OUT]          *
+*                                                                             *
+*  Description : Propose une boîte de dialogue pour la configuration générale.*
+*                                                                             *
+*  Retour      : Adresse de la fenêtre mise en place.                         *
+*                                                                             *
+*  Remarques   : -                                                            *
+*                                                                             *
+******************************************************************************/
+
+GtkWidget *create_preferences_dialog(GtkWindow *parent, GtkBuilder **outb)
+{
+    GtkWidget *result;                      /* Fenêtre à renvoyer          */
+    GtkBuilder *builder;                    /* Constructeur utilisé        */
+    GtkTreeStore *store;                    /* Arborescence des sections   */
+    GtkTreeIter iter;                       /* Point d'insertion           */
+
+    builder = gtk_builder_new_from_resource("/org/chrysalide/gui/dialogs/preferences.ui");
+    *outb = builder;
+
+    result = GTK_WIDGET(gtk_builder_get_object(builder, "window"));
+
+    gtk_window_set_transient_for(GTK_WINDOW(result), parent);
+
+    /* Intégration des différentes sections */
+
+    store = GTK_TREE_STORE(gtk_builder_get_object(builder, "pref_list"));
+
+    gtk_tree_store_append(store, &iter, NULL);
+
+    gtk_tree_store_set(store, &iter,
+                       PLI_TITLE, _("Colored labels"),
+                       PLI_PANEL, gtk_builder_get_object(builder, "colored_labels_panel"),
+                       -1);
+
+    /* Mise à jour de l'interface */
+
+    /* Connexion des signaux */
+
+    /*
+    gtk_builder_add_callback_symbols(builder,
+                                     "update_preferences", G_CALLBACK(update_preferences),
+                                     NULL);
+    */
+
+    gtk_builder_connect_signals(builder, builder);
+
+    return result;
+
+}
diff --git a/src/gui/dialogs/preferences.h b/src/gui/dialogs/preferences.h
new file mode 100644
index 0000000..a608dc3
--- /dev/null
+++ b/src/gui/dialogs/preferences.h
@@ -0,0 +1,37 @@
+
+/* Chrysalide - Outil d'analyse de fichiers binaires
+ * preferences.h - prototypes pour la (re)définition de l'identité de l'utilisateur
+ *
+ * Copyright (C) 2017 Cyrille Bagard
+ *
+ *  This file is part of Chrysalide.
+ *
+ *  Chrysalide is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  Chrysalide is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with Chrysalide.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#ifndef _GUI_DIALOGS_PREFERENCES_H
+#define _GUI_DIALOGS_PREFERENCES_H
+
+
+#include <gtk/gtk.h>
+
+
+
+/* Propose une boîte de dialogue pour la configuration générale. */
+GtkWidget *create_preferences_dialog(GtkWindow *, GtkBuilder **);
+
+
+
+#endif  /* _GUI_DIALOGS_PREFERENCES_H */
diff --git a/src/gui/dialogs/preferences.ui b/src/gui/dialogs/preferences.ui
new file mode 100644
index 0000000..2760399
--- /dev/null
+++ b/src/gui/dialogs/preferences.ui
@@ -0,0 +1,283 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.21.0 -->
+<interface>
+  <requires lib="gtk+" version="3.20"/>
+  <object class="GtkListStore" id="colored_label_types">
+    <columns>
+      <!-- column-name name -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">global colored labels</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">colored labels for symbols</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">colored labels for basic blocks</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkTreeStore" id="pref_list">
+    <columns>
+      <!-- column-name title -->
+      <column type="gchararray"/>
+      <!-- column-name panel -->
+      <column type="GObject"/>
+    </columns>
+  </object>
+  <object class="GtkDialog" id="window">
+    <property name="can_focus">False</property>
+    <property name="title" translatable="yes">General preferences</property>
+    <property name="modal">True</property>
+    <property name="default_width">800</property>
+    <property name="default_height">500</property>
+    <property name="type_hint">dialog</property>
+    <child internal-child="vbox">
+      <object class="GtkBox">
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox">
+            <property name="can_focus">False</property>
+            <property name="margin_left">8</property>
+            <property name="margin_right">8</property>
+            <property name="margin_top">8</property>
+            <property name="margin_bottom">8</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="button1">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="button2">
+                <property name="label">gtk-apply</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkPaned">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="position">200</property>
+            <property name="wide_handle">True</property>
+            <child>
+              <object class="GtkScrolledWindow">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="margin_left">8</property>
+                <property name="margin_right">8</property>
+                <property name="margin_top">8</property>
+                <property name="shadow_type">in</property>
+                <child>
+                  <object class="GtkTreeView">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="model">pref_list</property>
+                    <property name="headers_visible">False</property>
+                    <child internal-child="selection">
+                      <object class="GtkTreeSelection"/>
+                    </child>
+                    <child>
+                      <object class="GtkTreeViewColumn">
+                        <property name="title" translatable="yes">column</property>
+                        <child>
+                          <object class="GtkCellRendererText"/>
+                          <attributes>
+                            <attribute name="text">0</attribute>
+                          </attributes>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="resize">False</property>
+                <property name="shrink">True</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkStack">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">8</property>
+                <property name="margin_right">8</property>
+                <property name="margin_top">8</property>
+                <child>
+                  <object class="GtkBox" id="colored_labels_panel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="orientation">vertical</property>
+                    <property name="spacing">8</property>
+                    <child>
+                      <object class="GtkBox">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="spacing">8</property>
+                        <child>
+                          <object class="GtkLabel">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Specify:</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkComboBox" id="colored_labels_combo">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="model">colored_label_types</property>
+                            <child>
+                              <object class="GtkCellRendererText"/>
+                              <attributes>
+                                <attribute name="text">0</attribute>
+                              </attributes>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkBox">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="spacing">8</property>
+                        <child>
+                          <object class="GtkScrolledWindow">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="shadow_type">in</property>
+                            <child>
+                              <object class="GtkTreeView">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <child internal-child="selection">
+                                  <object class="GtkTreeSelection"/>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkToolbar">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="orientation">vertical</property>
+                            <property name="toolbar_style">icons</property>
+                            <property name="show_arrow">False</property>
+                            <property name="icon_size">4</property>
+                            <child>
+                              <object class="GtkToolButton" id="colored_label_add">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="use_underline">True</property>
+                                <property name="icon_name">list-add</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="homogeneous">True</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkToolButton" id="colored_label_remove">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="use_underline">True</property>
+                                <property name="icon_name">list-remove</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="homogeneous">True</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="name">page0</property>
+                    <property name="title" translatable="yes">page0</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="resize">True</property>
+                <property name="shrink">True</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="-6">button1</action-widget>
+      <action-widget response="-10">button2</action-widget>
+    </action-widgets>
+    <child>
+      <placeholder/>
+    </child>
+  </object>
+</interface>
diff --git a/src/gui/menus/Makefile.am b/src/gui/menus/Makefile.am
index d1e1564..49214e1 100644
--- a/src/gui/menus/Makefile.am
+++ b/src/gui/menus/Makefile.am
@@ -8,9 +8,9 @@ libguimenus_la_SOURCES =				\
 	file.h file.c						\
 	help.h help.c						\
 	menubar.h menubar.c					\
+	options.h options.c					\
 	plugins.h plugins.c					\
 	project.h project.c					\
-	tools.h tools.c						\
 	view.h view.c
 
 libguimenus_la_LDFLAGS = 
diff --git a/src/gui/menus/menubar.c b/src/gui/menus/menubar.c
index 863ac54..886387c 100644
--- a/src/gui/menus/menubar.c
+++ b/src/gui/menus/menubar.c
@@ -30,9 +30,9 @@
 #include "edition.h"
 #include "file.h"
 #include "help.h"
+#include "options.h"
 #include "plugins.h"
 #include "project.h"
-#include "tools.h"
 #include "view.h"
 #include "../editem-int.h"
 
@@ -49,7 +49,7 @@ struct _GMenuBar
     GtkWidget *project;                     /* Menu "Projet"               */
     GtkWidget *binary;                      /* Menu "Binaire"              */
     GtkWidget *debug;                       /* Menu "Débogage"             */
-    GtkWidget *tools;                       /* Menu "Outils"               */
+    GtkWidget *options;                     /* Menu "Options"              */
     GtkWidget *plugins;                     /* Menu "Greffons"             */
     GtkWidget *help;                        /* Menu "Aide"                 */
 
@@ -246,10 +246,10 @@ GEditorItem *g_menu_bar_new(GObject *ref)
     result->debug = build_menu_debug(ref);
     gtk_container_add(GTK_CONTAINER(item->widget), result->debug);
 
-    /* Outils */
+    /* Options */
 
-    result->tools = build_menu_tools(ref, result);
-    gtk_container_add(GTK_CONTAINER(item->widget), result->tools);
+    result->options = build_menu_options(ref, result);
+    gtk_container_add(GTK_CONTAINER(item->widget), result->options);
 
     /* Greffons */
 
diff --git a/src/gui/menus/options.c b/src/gui/menus/options.c
new file mode 100644
index 0000000..3702d42
--- /dev/null
+++ b/src/gui/menus/options.c
@@ -0,0 +1,144 @@
+
+/* Chrysalide - Outil d'analyse de fichiers binaires
+ * options.c - gestion du menu 'Options'
+ *
+ * Copyright (C) 2019 Cyrille Bagard
+ *
+ *  This binary is part of Chrysalide.
+ *
+ *  Chrysalide is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  Chrysalide is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+
+#include "options.h"
+
+
+#include <i18n.h>
+
+
+#include "../editem-int.h"
+#include "../dialogs/identity.h"
+#include "../dialogs/preferences.h"
+#include "../../gtkext/easygtk.h"
+
+
+
+/* Réagit au menu "Options -> Préférences". */
+static void mcb_options_preferences(GtkMenuItem *, GMenuBar *);
+
+/* Réagit au menu "Options -> Identité". */
+static void mcb_options_identity(GtkMenuItem *, GMenuBar *);
+
+
+
+/******************************************************************************
+*                                                                             *
+*  Paramètres  : ref = espace de référencement global.                        *
+*                bar = barre de menu parente.                                 *
+*                                                                             *
+*  Description : Construit le menu "Options".                                 *
+*                                                                             *
+*  Retour      : Panneau de menus mis en place.                               *
+*                                                                             *
+*  Remarques   : -                                                            *
+*                                                                             *
+******************************************************************************/
+
+GtkWidget *build_menu_options(GObject *ref, GMenuBar *bar)
+{
+    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), bar);
+    gtk_container_add(GTK_CONTAINER(menubar), submenuitem);
+
+    submenuitem = qck_create_menu_item(ref, "mnu_options_identity", _("Identity"),
+                                       G_CALLBACK(mcb_options_identity), bar);
+    gtk_container_add(GTK_CONTAINER(menubar), submenuitem);
+
+    return result;
+
+}
+
+
+/******************************************************************************
+*                                                                             *
+*  Paramètres  : menuitem = élément de menu sélectionné.                      *
+*                bar      = barre de menu parente.                            *
+*                                                                             *
+*  Description : Réagit au menu "Options -> Préférences".                     *
+*                                                                             *
+*  Retour      : -                                                            *
+*                                                                             *
+*  Remarques   : -                                                            *
+*                                                                             *
+******************************************************************************/
+
+static void mcb_options_preferences(GtkMenuItem *menuitem, GMenuBar *bar)
+{
+    GObject *ref;                           /* Espace de référencements    */
+    GtkBuilder *builder;                    /* Constructeur utilisé        */
+    GtkWidget *dialog;                      /* Boîte de dialogue à montrer */
+
+    ref = g_editor_item_get_global_ref(G_EDITOR_ITEM(bar));
+
+    dialog = create_preferences_dialog(GTK_WINDOW(ref), &builder);
+
+    gtk_dialog_run(GTK_DIALOG(dialog));
+
+    gtk_widget_destroy(dialog);
+
+    g_object_unref(G_OBJECT(builder));
+
+}
+
+
+/******************************************************************************
+*                                                                             *
+*  Paramètres  : menuitem = élément de menu sélectionné.                      *
+*                bar      = barre de menu parente.                            *
+*                                                                             *
+*  Description : Réagit au menu "Options -> Identité".                        *
+*                                                                             *
+*  Retour      : -                                                            *
+*                                                                             *
+*  Remarques   : -                                                            *
+*                                                                             *
+******************************************************************************/
+
+static void mcb_options_identity(GtkMenuItem *menuitem, GMenuBar *bar)
+{
+    GObject *ref;                           /* Espace de référencements    */
+    GtkBuilder *builder;                    /* Constructeur utilisé        */
+    GtkWidget *dialog;                      /* Boîte de dialogue à montrer */
+
+    ref = g_editor_item_get_global_ref(G_EDITOR_ITEM(bar));
+
+    dialog = create_identity_dialog(GTK_WINDOW(ref), &builder);
+
+    gtk_dialog_run(GTK_DIALOG(dialog));
+
+    gtk_widget_destroy(dialog);
+
+    g_object_unref(G_OBJECT(builder));
+
+}
diff --git a/src/gui/menus/options.h b/src/gui/menus/options.h
new file mode 100644
index 0000000..f73d659
--- /dev/null
+++ b/src/gui/menus/options.h
@@ -0,0 +1,41 @@
+
+/* Chrysalide - Outil d'analyse de fichiers binaires
+ * options.h - prototypes pour la gestion du menu 'Options'
+ *
+ * Copyright (C) 2019 Cyrille Bagard
+ *
+ *  This binary is part of Chrysalide.
+ *
+ *  Chrysalide is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  Chrysalide is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+
+#ifndef _GUI_MENUS_OPTIONS_H
+#define _GUI_MENUS_OPTIONS_H
+
+
+#include <gtk/gtk.h>
+
+
+#include "menubar.h"
+
+
+
+/* Construit le menu "Options". */
+GtkWidget *build_menu_options(GObject *, GMenuBar *);
+
+
+
+#endif  /* _GUI_MENUS_OPTIONS_H */
diff --git a/src/gui/menus/tools.c b/src/gui/menus/tools.c
deleted file mode 100644
index d606c02..0000000
--- a/src/gui/menus/tools.c
+++ /dev/null
@@ -1,104 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * tools.c - gestion du menu 'Outils'
- *
- * Copyright (C) 2017 Cyrille Bagard
- *
- *  This binary is part of Chrysalide.
- *
- *  Chrysalide is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  Chrysalide is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-
-#include "tools.h"
-
-
-#include <i18n.h>
-
-
-#include "../editem-int.h"
-#include "../dialogs/identity.h"
-#include "../../gtkext/easygtk.h"
-
-
-
-/* Réagit au menu "Outils -> Identité". */
-static void mcb_tools_identity(GtkMenuItem *, GMenuBar *);
-
-
-
-/******************************************************************************
-*                                                                             *
-*  Paramètres  : ref = espace de référencement global.                        *
-*                bar = barre de menu parente.                                 *
-*                                                                             *
-*  Description : Construit le menu "Outils".                                  *
-*                                                                             *
-*  Retour      : Panneau de menus mis en place.                               *
-*                                                                             *
-*  Remarques   : -                                                            *
-*                                                                             *
-******************************************************************************/
-
-GtkWidget *build_menu_tools(GObject *ref, GMenuBar *bar)
-{
-    GtkWidget *result;                      /* Support à retourner         */
-    GtkWidget *menubar;                     /* Support pour éléments       */
-    GtkWidget *submenuitem;                 /* Sous-élément de menu        */
-
-    result = gtk_menu_item_new_with_mnemonic(_("_Tools"));
-    gtk_widget_show(result);
-
-    menubar = qck_create_menu(GTK_MENU_ITEM(result));
-
-    submenuitem = qck_create_menu_item(ref, "mnu_tools_identity", _("Identity"),
-                                       G_CALLBACK(mcb_tools_identity), bar);
-    gtk_container_add(GTK_CONTAINER(menubar), submenuitem);
-
-    return result;
-
-}
-
-
-/******************************************************************************
-*                                                                             *
-*  Paramètres  : menuitem = élément de menu sélectionné.                      *
-*                bar      = barre de menu parente.                            *
-*                                                                             *
-*  Description : Réagit au menu "Outils -> Identité".                         *
-*                                                                             *
-*  Retour      : -                                                            *
-*                                                                             *
-*  Remarques   : -                                                            *
-*                                                                             *
-******************************************************************************/
-
-static void mcb_tools_identity(GtkMenuItem *menuitem, GMenuBar *bar)
-{
-    GObject *ref;                           /* Espace de référencements    */
-    GtkBuilder *builder;                    /* Constructeur utilisé        */
-    GtkWidget *dialog;                      /* Boîte de dialogue à montrer */
-
-    ref = g_editor_item_get_global_ref(G_EDITOR_ITEM(bar));
-
-    dialog = create_identity_dialog(GTK_WINDOW(ref), &builder);
-
-    gtk_dialog_run(GTK_DIALOG(dialog));
-
-    gtk_widget_destroy(dialog);
-
-    g_object_unref(G_OBJECT(builder));
-
-}
diff --git a/src/gui/menus/tools.h b/src/gui/menus/tools.h
deleted file mode 100644
index 441e46d..0000000
--- a/src/gui/menus/tools.h
+++ /dev/null
@@ -1,41 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * tools.h - prototypes pour la gestion du menu 'Outils'
- *
- * Copyright (C) 2017 Cyrille Bagard
- *
- *  This binary is part of Chrysalide.
- *
- *  Chrysalide is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  Chrysalide is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-
-#ifndef _GUI_MENUS_TOOLS_H
-#define _GUI_MENUS_TOOLS_H
-
-
-#include <gtk/gtk.h>
-
-
-#include "menubar.h"
-
-
-
-/* Construit le menu "Outils". */
-GtkWidget *build_menu_tools(GObject *, GMenuBar *);
-
-
-
-#endif  /* _GUI_MENUS_TOOLS_H */
-- 
cgit v0.11.2-87-g4458