summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2012-10-17 22:38:38 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2012-10-17 22:38:38 (GMT)
commitaf29afcc9a37113e4187b1c0a20e3bf5e2dcd4d9 (patch)
tree46da4b3886b43d4bb549aa01012bda13ce36c375
parented846003946a44588c7c131b9c9001f97bf10711 (diff)
Removed a lot of gcc warnings.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@272 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
-rw-r--r--ChangeLog38
-rw-r--r--plugins/pychrysa/Makefile.am2
-rw-r--r--src/Makefile.am8
-rw-r--r--src/editor.c70
-rw-r--r--src/gtkext/Makefile.am7
-rw-r--r--src/gtkext/easygtk.c2
-rw-r--r--src/gtkext/gtkbinview-int.h82
-rw-r--r--src/gtkext/gtkbinview.c433
-rw-r--r--src/gtkext/gtkbinview.h88
-rw-r--r--src/gtkext/gtkdockitem.c315
-rw-r--r--src/gtkext/gtkdockitem.h106
-rw-r--r--src/gtkext/gtkdockpanel.c778
-rw-r--r--src/gtkext/gtkdockpanel.h97
-rw-r--r--src/gtkext/gtkgraphview.c6
-rw-r--r--src/gtkext/gtksourceview.c2
-rw-r--r--src/gtkext/gtkviewpanel.c2
-rw-r--r--src/gtkext/gtkviewpanel.h2
-rw-r--r--src/main.c8
-rw-r--r--src/panels/panel.c26
-rw-r--r--src/panels/panel.h3
-rw-r--r--src/params.c12
-rw-r--r--src/params.h10
-rw-r--r--src/project.c1
23 files changed, 75 insertions, 2023 deletions
diff --git a/ChangeLog b/ChangeLog
index 2a0131e..ba5f083 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,41 @@
+12-10-18 Cyrille Bagard <nocbos@gmail.com>
+
+ * plugins/pychrysa/Makefile.am:
+ * src/editor.c:
+ Update code.
+
+ * src/gtkext/easygtk.c:
+ Remove a lot of gcc warnings.
+
+ * src/gtkext/gtkbinview.c:
+ * src/gtkext/gtkbinview.h:
+ * src/gtkext/gtkbinview-int.h:
+ * src/gtkext/gtkdockitem.c:
+ * src/gtkext/gtkdockitem.h:
+ * src/gtkext/gtkdockpanel.c:
+ * src/gtkext/gtkdockpanel.h:
+ Deleted entries.
+
+ * src/gtkext/gtkgraphview.c:
+ * src/gtkext/gtksourceview.c:
+ * src/gtkext/gtkviewpanel.c:
+ * src/gtkext/gtkviewpanel.h:
+ * src/gtkext/Makefile.am:
+ Remove a lot of gcc warnings.
+
+ * src/main.c:
+ * src/Makefile.am:
+ * src/panels/panel.c:
+ * src/panels/panel.h:
+ Update code.
+
+ * src/params.c:
+ * src/params.h:
+ Remove a lot of gcc warnings.
+
+ * src/project.c:
+ Update code.
+
12-10-17 Cyrille Bagard <nocbos@gmail.com>
* src/common/extstr.c:
diff --git a/plugins/pychrysa/Makefile.am b/plugins/pychrysa/Makefile.am
index d57c9f5..e027c91 100644
--- a/plugins/pychrysa/Makefile.am
+++ b/plugins/pychrysa/Makefile.am
@@ -17,7 +17,7 @@ pychrysa_la_LIBADD = \
pychrysa_la_LDFLAGS = -module -avoid-version $(LIBGTK_LIBS) $(LIBXML_LIBS) $(LIBPYTHON_LIBS) \
$(LIBPYGOBJECT_LIBS) \
- -L../../src/panels/ -lpanels -L../../src/.libs -L../../src/gui/.libs -lchrysagui -lchrysadisass -lchrysagtkext \
+ -L../../src/.libs -L../../src/gui/.libs -lchrysagui -lchrysadisass -lchrysagtkext \
-L../../src/plugins/.libs -lplugins
diff --git a/src/Makefile.am b/src/Makefile.am
index 35cd031..2d6fd46 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -55,8 +55,7 @@ libchrysagui_la_LDFLAGS = $(LIBGTK_LIBS) \
-L.libs -lchrysagtkext
libchrysagui_la_LIBADD = \
- gui/libgui.la \
- panels/libpanels.la
+ gui/libgui.la
#--- libchrysaplugin
@@ -94,7 +93,6 @@ AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS)
chrysalide_LDFLAGS = $(LIBGTK_LIBS) -L/usr/X11R6/lib -ldl -lm $(LIBXML_LIBS) `pkg-config --libs gthread-2.0` $(LIBPYTHON_LIBS) \
-L.libs -lchrysaglibext -lchrysadisass -lchrysagtkext -lchrysagui \
-Lcommon/.libs -lcommon \
- -Lpanels/.libs -lpanels \
-Lplugins/.libs -lplugins
@@ -109,4 +107,6 @@ chrysalide_LDADD = $(LIBINTL) \
# gtkext doit être traité en premier, à cause des marshals GLib
-SUBDIRS = glibext gtkext analysis arch format common debug decomp dialogs graph gui panels plugins
+SUBDIRS = glibext gtkext analysis arch format common debug decomp dialogs graph gui plugins
+
+# TODO: rm -rf panels
diff --git a/src/editor.c b/src/editor.c
index 81feb14..85763bb 100644
--- a/src/editor.c
+++ b/src/editor.c
@@ -49,9 +49,8 @@
#include "analysis/binary.h"
#include "gtkext/easygtk.h"
#include "gtkext/gtkextstatusbar.h"
-#include "gtkext/gtkbinview.h"
#include "gtkext/gtkblockview.h"
-#include "gtkext/gtkdockpanel.h"
+#include "gtkext/gtkdockstation.h"
#include "gtkext/gtkviewpanel.h"
#include "debug/debugger.h"
@@ -116,10 +115,7 @@ void update_debug_menu_items(GObject *, gboolean);
/* Réagit au changement d'onglet d'un panneau quelconque. */
-static void on_dock_item_switch(GtkDockPanel *, GtkWidget *, GObject *);
-
-/* Met en concordance les menus avec l'édition courante. */
-static void refresh_editor_menus(GObject *, GLoadedBinary *, GtkBinView *);
+static void on_dock_item_switch(GtkDockStation *, GtkWidget *, GObject *);
@@ -229,9 +225,6 @@ GtkWidget *create_editor(void)
- GtkWidget *dpanel; /* Support de panneaux */
- GDockItem *ditem; /* Panneau avec ses infos. */
-
#if 0
GtkWidget *vbox; /* Support à divisions vert. */
@@ -954,9 +947,9 @@ void update_debug_menu_items(GObject *ref, gboolean stopped)
/******************************************************************************
* *
-* Paramètres : panel = panneau de support des éléments concerné. *
-* item = nouvel élément présenté à l'affichage. *
-* ref = adresse de l'espace de référencement global. *
+* Paramètres : station = panneau de support des éléments concerné. *
+* item = nouvel élément présenté à l'affichage. *
+* ref = adresse de l'espace de référencement global. *
* *
* Description : Réagit au changement d'onglet d'un panneau quelconque. *
* *
@@ -966,7 +959,7 @@ void update_debug_menu_items(GObject *ref, gboolean stopped)
* *
******************************************************************************/
-static void on_dock_item_switch(GtkDockPanel *panel, GtkWidget *widget, GObject *ref)
+static void on_dock_item_switch(GtkDockStation *station, GtkWidget *widget, GObject *ref)
{
GLoadedBinary *old_binary; /* Ancien binaire édité */
GLoadedBinary *binary; /* Binaire en cours d'édition */
@@ -992,8 +985,6 @@ static void on_dock_item_switch(GtkDockPanel *panel, GtkWidget *widget, GObject
change_editor_items_current_view(ref, GTK_VIEW_PANEL(widget));
- //refresh_editor_menus(ref, binary, GTK_BIN_VIEW(widget));
-
//notify_panels_of_view_change(GTK_VIEW_PANEL(widget), false);
}
@@ -1001,55 +992,6 @@ static void on_dock_item_switch(GtkDockPanel *panel, GtkWidget *widget, GObject
}
-/******************************************************************************
-* *
-* Paramètres : ref = adresse de l'espace de référencement global. *
-* binary = représentation de contenu binaire active. *
-* view = type de visualisation courante. *
-* *
-* Description : Met en concordance les menus avec l'édition courante. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void refresh_editor_menus(GObject *ref, GLoadedBinary *binary, GtkBinView *view)
-{
-#if 0
- GtkCheckMenuItem *menuitem; /* Menu à coche à traiter */
-
- /* Affichage : type de vue */
-
- menuitem = GTK_CHECK_MENU_ITEM(g_object_get_data(ref, "textview"));
- g_signal_handlers_disconnect_by_func(menuitem, G_CALLBACK(mcb_view_change_support), ref);
-
- menuitem = GTK_CHECK_MENU_ITEM(g_object_get_data(ref, "graphview"));
- g_signal_handlers_disconnect_by_func(menuitem, G_CALLBACK(mcb_view_change_support), ref);
-
- if (GTK_IS_BLOCK_VIEW(view))
- {
- menuitem = GTK_CHECK_MENU_ITEM(g_object_get_data(ref, "textview"));
- gtk_check_menu_item_set_active(menuitem, TRUE);
- }
- else
- {
- menuitem = GTK_CHECK_MENU_ITEM(g_object_get_data(ref, "graphview"));
- gtk_check_menu_item_set_active(menuitem, TRUE);
- }
-
- menuitem = GTK_CHECK_MENU_ITEM(g_object_get_data(ref, "textview"));
- g_signal_connect(menuitem, "toggled", G_CALLBACK(mcb_view_change_support), ref);
-
- menuitem = GTK_CHECK_MENU_ITEM(g_object_get_data(ref, "graphview"));
- g_signal_connect(menuitem, "toggled", G_CALLBACK(mcb_view_change_support), ref);
-#endif
-}
-
-
-
-
diff --git a/src/gtkext/Makefile.am b/src/gtkext/Makefile.am
index 67d1a49..f590693 100644
--- a/src/gtkext/Makefile.am
+++ b/src/gtkext/Makefile.am
@@ -6,13 +6,9 @@ noinst_LTLIBRARIES = libgtkext.la
libgtkext_la_SOURCES = \
easygtk.h easygtk.c \
gtkextstatusbar.h gtkextstatusbar.c \
- gtkbinview-int.h \
- gtkbinview.h gtkbinview.c \
gtkblockview.h gtkblockview.c \
gtkbufferview-int.h \
gtkbufferview.h gtkbufferview.c \
- gtkdockitem.h gtkdockitem.c \
- gtkdockpanel.h gtkdockpanel.c \
gtkdockstation.h gtkdockstation.c \
gtkgraphview.h gtkgraphview.c \
gtklinkrenderer.h gtklinkrenderer.c \
@@ -36,4 +32,5 @@ iodamarshal.h: iodamarshal.list
glib-genmarshal --header $< > $@
iodamarshal.c: iodamarshal.list
- glib-genmarshal --body $< > $@
+ echo "#include <$(subst .c,.h,$@)>" > $@
+ glib-genmarshal --body $< >> $@
diff --git a/src/gtkext/easygtk.c b/src/gtkext/easygtk.c
index 510c74f..cdf3689 100644
--- a/src/gtkext/easygtk.c
+++ b/src/gtkext/easygtk.c
@@ -492,7 +492,7 @@ GtkWidget *qck_create_combobox(GObject *object, const char *name, GCallback hand
{
GtkWidget *result; /* Résultat à renvoyer */
- result = gtk_combo_box_new_text();
+ result = gtk_combo_box_text_new();
if (G_IS_OBJECT(object) && name != NULL)
{
diff --git a/src/gtkext/gtkbinview-int.h b/src/gtkext/gtkbinview-int.h
deleted file mode 100644
index 7091e15..0000000
--- a/src/gtkext/gtkbinview-int.h
+++ /dev/null
@@ -1,82 +0,0 @@
-
-/* OpenIDA - Outil d'analyse de fichiers binaires
- * gtkbinview-int.h - définitions internes propre à l'affichage d'un ou plusieurs morceaux de code
- *
- * Copyright (C) 2009-2012 Cyrille Bagard
- *
- * This file is part of OpenIDA.
- *
- * OpenIDA 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.
- *
- * OpenIDA 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 Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#ifndef _GTKEXT_GTKBINVIEW_INT_H
-#define _GTKEXT_GTKBINVIEW_INT_H
-
-
-#include "gtkbinview.h"
-#include "gtkviewpanel-int.h"
-
-
-#include <stdbool.h>
-#include <gtk/gtkfixed.h>
-
-
-
-/* Définit les lignes à associer à la représentation. */
-typedef void (* set_rendering_lines_fc) (GtkBinView *, GRenderingLine *, GRenderingLine *);
-
-/* Réagit à la sélection externe d'une adresse. */
-typedef void (* define_main_address_fc) (GtkBinView *, vmpa_t);
-
-/* Indique la position d'affichage d'une adresse donnée. */
-//typedef bool (* get_addr_coordinates_fc) (const GtkBinView *, vmpa_t, gint *, gint *);
-
-
-struct _GtkBinView
-{
- GtkViewPanel parent; /* A laisser en premier */
-
- GLoadedBinary *binary; /* Contenu binaire affiché */
-
- GRenderingLine *lines; /* Contenu à représenter */
- GRenderingLine *last; /* Dernière ligne associée */
-
- set_rendering_lines_fc set_lines; /* Association des lignes */
- define_main_address_fc define_address; /* Sélection externe d'adresse */
- get_addr_coordinates_fc get_coordinates;/* Conversion adresse <-> pos. */
-
-};
-
-struct _GtkBinViewClass
-{
- GtkViewPanelClass parent; /* A laisser en premier */
-
- /* Signaux */
-
- void (* lines_set) (GtkBinView *);
-
-};
-
-
-
-/* Calcule la surface pleine utilisable pour la vue. */
-void gtk_bin_view_compute_allocation(GtkBinView *, GtkAllocation *);
-
-/* S'assure que la valeur de défilement actuelle est valable. */
-void gtk_bin_view_reclamp_adjustment(GtkAdjustment *, gboolean *);
-
-
-
-#endif /* _GTKEXT_GTKBINVIEW_INT_H */
diff --git a/src/gtkext/gtkbinview.c b/src/gtkext/gtkbinview.c
deleted file mode 100644
index 2fe88ad..0000000
--- a/src/gtkext/gtkbinview.c
+++ /dev/null
@@ -1,433 +0,0 @@
-
-/* OpenIDA - Outil d'analyse de fichiers binaires
- * gtkbinview.c - affichage d'un ou de plusieurs morceaux de code
- *
- * Copyright (C) 2008-2010 Cyrille Bagard
- *
- * This file is part of OpenIDA.
- *
- * OpenIDA 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.
- *
- * OpenIDA 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 Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "gtkbinview.h"
-
-
-#include "gtkbinview-int.h"
-
-
-
-/* Acquitement d'une fin d'attachement */
-typedef struct _bv_loading_ack
-{
- bool lines_set; /* Construction complète */
- GMutex *mutex; /* Accès à la variable */
- GCond *cond; /* Attente de changement */
-
-} bv_loading_ack;
-
-
-/* Prend acte de l'association d'un binaire chargé. */
-static void gtk_bin_view_attach_binary(GtkBinView *, GLoadedBinary *);
-
-/* Prend note de la fin d'une construction d'une visualisation. */
-static void ack_loaded_lines_for_bin_view(GtkBinView *, bv_loading_ack *);
-
-
-
-
-
-
-/* Détermine le type du composant d'affichage des morceaux. */
-G_DEFINE_TYPE(GtkBinView, gtk_binview, GTK_TYPE_VIEW_PANEL)
-
-
-
-
-
-
-/******************************************************************************
-* *
-* Paramètres : class = classe GTK à initialiser. *
-* *
-* Description : Procède à l'initialisation de l'afficheur de morceaux. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void gtk_binview_class_init(GtkBinViewClass *class)
-{
- g_signal_new("lines-set",
- GTK_TYPE_BIN_VIEW,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET(GtkBinViewClass, lines_set),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : view = composant GTK à initialiser. *
-* *
-* Description : Procède à l'initialisation de l'afficheur de morceaux. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void gtk_binview_init(GtkBinView *view)
-{
- GtkViewPanel *panel; /* Instance parente */
-
- panel = GTK_VIEW_PANEL(view);
-
- panel->attach = (attach_binary_fc)gtk_bin_view_attach_binary;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : - *
-* *
-* Description : Crée un nouveau composant pour l'affichage de morceaux. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GtkWidget* gtk_binview_new(void)
-{
- return g_object_new(GTK_TYPE_BIN_VIEW, NULL);
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : view = composant GTK à mettre à jour. *
-* binary = binaire associé à intégrer. *
-* *
-* Description : Prend acte de l'association d'un binaire chargé. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void gtk_bin_view_attach_binary(GtkBinView *view, GLoadedBinary *binary)
-{
- bv_loading_ack ack; /* Informations d'acquitement */
-
- ack.lines_set = false;
- ack.mutex = g_mutex_new();
- ack.cond = g_cond_new();
-
- g_signal_connect(view, "lines-set", G_CALLBACK(ack_loaded_lines_for_bin_view), &ack);
-
- /*
- gtk_bin_view_set_rendering_lines(view, binary,
- g_loaded_binary_get_lines(binary), NULL);
- */
-
- /* Attente de la fin de construction */
- g_mutex_lock(ack.mutex);
- while (!ack.lines_set)
- g_cond_wait(ack.cond, ack.mutex);
- g_mutex_unlock(ack.mutex);
-
- g_signal_handlers_disconnect_by_func(view, G_CALLBACK(ack_loaded_lines_for_bin_view), &ack);
-
- g_mutex_free(ack.mutex);
- g_cond_free(ack.cond);
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : view = composant d'affichage prêt à utilisation. *
-* ack = paramètres nécessaires à l'acquitement. *
-* *
-* Description : Prend note de la fin d'une construction d'une visualisation. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void ack_loaded_lines_for_bin_view(GtkBinView *view, bv_loading_ack *ack)
-{
- g_mutex_lock(ack->mutex);
-
- ack->lines_set = true;
-
- g_cond_signal(ack->cond);
- g_mutex_unlock(ack->mutex);
-
-}
-
-
-
-
-
-
-
-
-/******************************************************************************
-* *
-* Paramètres : view = composant GTK à mettre à jour. *
-* show = état de l'affichage auquel parvenir. *
-* *
-* Description : Définit si une bordure est à afficher. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-void gtk_bin_view_show_border(GtkBinView *view, bool show)
-{
- /* FIXME : à déplacer vers GtkViewPanel */
- GTK_VIEW_PANEL(view)->show_border = show;
-
-}
-
-
-
-
-/******************************************************************************
-* *
-* Paramètres : view = composant GTK à mettre à jour. *
-* binary = contenu binaire dont les lignes sont issues. *
-* lines = informations à intégrer. *
-* last = dernière ligne à intégrer ou NULL pour toutes. *
-* *
-* Description : Définit les lignes à associer à la représentation. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-void gtk_bin_view_set_rendering_lines(GtkBinView *view, GLoadedBinary *binary, GRenderingLine *lines, GRenderingLine *last)
-{
- view->binary = binary;
-
- view->lines = lines;
- view->last = last;
-
- view->set_lines(view, lines, last);
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : view = composant GTK à consulter. *
-* *
-* Description : Fournit la liste des lignes associées à la représentation. *
-* *
-* Retour : Ligne de représentation. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GRenderingLine *gtk_bin_view_get_lines(const GtkBinView *view)
-{
- return view->lines;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : view = composant GTK à consulter. *
-* *
-* Description : Fournit la dernière ligne associée à la représentation. *
-* *
-* Retour : Ligne de représentation. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GRenderingLine *gtk_bin_view_get_last_line(const GtkBinView *view)
-{
- return view->last; /* FIXME last == NULL */
-
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-/******************************************************************************
-* *
-* Paramètres : binview = composant GTK à manipuler. *
-* show = état de l'affichage auquel parvenir. *
-* *
-* Description : Choisit d'afficher les adresses virtuelles ou non. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-void gtk_binview_show_vaddress(GtkBinView *binview, gboolean show)
-{
- GList *list; /* Ensemble des enfants */
- GList *iter; /* Boucle de parcours */
-
- list = gtk_container_get_children(GTK_CONTAINER(binview));
-
- for (iter = g_list_first(list); iter != NULL; iter = g_list_next(iter))
- /*gtk_snippet_show_vaddress(GTK_SNIPPET(iter->data), show)*/;
-
- g_list_free(list);
-
-}
-
-
-
-
-
-
-
-
-
-
-/******************************************************************************
-* *
-* Paramètres : binview = composant GTK à manipuler. *
-* show = état de l'affichage auquel parvenir. *
-* *
-* Description : Choisit d'afficher le code brut ou non. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-void gtk_binview_show_code(GtkBinView *binview, gboolean show)
-{
- GList *list; /* Ensemble des enfants */
- GList *iter; /* Boucle de parcours */
-
- list = gtk_container_get_children(GTK_CONTAINER(binview));
-
- for (iter = g_list_first(list); iter != NULL; iter = g_list_next(iter))
- /*gtk_snippet_show_code(GTK_SNIPPET(iter->data), show)*/;
-
- g_list_free(list);
-
-}
-
-
-
-
-
-
-
-/******************************************************************************
-* *
-* Paramètres : view = composant GTK à manipuler. *
-* addr = adresse à rechercher. *
-* *
-* Description : Indique si la vue contient une addrese donnée. *
-* *
-* Retour : true si l'adresse est présente, false sinon. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-bool gtk_bin_view_contain_address(const GtkBinView *view, vmpa_t addr)
-{
- gint dummy_x; /* Abscisse pour l'appel */
- gint dummy_y; /* Ordonnée pour l'appel */
-
- return view->get_coordinates(view, addr, &dummy_x, &dummy_y);
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : view = composant GTK à manipuler. *
-* addr = adresse à présenter à l'écran. *
-* *
-* Description : S'assure qu'une adresse donnée est visible à l'écran. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-void gtk_bin_view_scroll_to_address(GtkBinView *view, vmpa_t addr)
-{
- /* FIXME */
-#if 0
- gint x; /* Abscisse à garantir */
- gint y; /* Ordonnée à garantir */
- GtkAdjustment *adj; /* Défilement à mettre à jour */
-
- if (view->define_address != NULL)
- view->define_address(view, addr);
-
- if (view->get_coordinates(view, addr, &x, &y))
- {
- adj = view->hadjustment;
-
- if (x > (adj->upper - adj->page_size))
- x = adj->upper - adj->page_size;
-
- gtk_adjustment_set_value(adj, x);
-
- adj = view->vadjustment;
-
- if (y > (adj->upper - adj->page_size))
- y = adj->upper - adj->page_size;
-
- gtk_adjustment_set_value(adj, y);
-
- }
-#endif
-}
diff --git a/src/gtkext/gtkbinview.h b/src/gtkext/gtkbinview.h
deleted file mode 100644
index 165f423..0000000
--- a/src/gtkext/gtkbinview.h
+++ /dev/null
@@ -1,88 +0,0 @@
-
-/* OpenIDA - Outil d'analyse de fichiers binaires
- * gtkbinview.h - prototypes pour l'affichage d'un ou de plusieurs morceaux de code
- *
- * Copyright (C) 2008-2010 Cyrille Bagard
- *
- * This file is part of OpenIDA.
- *
- * OpenIDA 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.
- *
- * OpenIDA 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 Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#ifndef _GTK_BINVIEW_H
-#define _GTK_BINVIEW_H
-
-
-#include <gtk/gtkwidget.h>
-
-
-#include "../analysis/binary.h"
-
-
-
-#define GTK_TYPE_BIN_VIEW (gtk_binview_get_type())
-#define GTK_BIN_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_BIN_VIEW, GtkBinView))
-#define GTK_BIN_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GTK_TYPE_BIN_VIEW, GtkBinViewClass))
-#define GTK_IS_BIN_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_BIN_VIEW))
-#define GTK_IS_BIN_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GTK_TYPE_BIN_VIEW))
-#define GTK_BIN_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_TYPE_BIN_VIEW, GtkBinViewClass))
-
-
-typedef struct _GtkBinView GtkBinView;
-typedef struct _GtkBinViewClass GtkBinViewClass;
-
-
-
-/* Détermine le type du composant d'affichage des morceaux. */
-GType gtk_binview_get_type(void);
-
-/* Crée un nouveau composant pour l'affichage de morceaux. */
-GtkWidget* gtk_binview_new(void);
-
-/* Définit si une bordure est à afficher. */
-void gtk_bin_view_show_border(GtkBinView *, bool);
-
-
-
-/* Définit les lignes à associer à la représentation. */
-void gtk_bin_view_set_rendering_lines(GtkBinView *, GLoadedBinary *, GRenderingLine *, GRenderingLine *);
-
-/* Fournit la liste des lignes associées à la représentation. */
-GRenderingLine *gtk_bin_view_get_lines(const GtkBinView *);
-
-/* Fournit la dernière ligne associée à la représentation. */
-GRenderingLine *gtk_bin_view_get_last_line(const GtkBinView *);
-
-
-
-
-
-/* Choisit d'afficher les adresses virtuelles ou non. */
-void gtk_binview_show_vaddress(GtkBinView *, gboolean);
-
-/* Choisit d'afficher le code brut ou non. */
-void gtk_binview_show_code(GtkBinView *, gboolean);
-
-
-
-/* Indique si la vue contient une addrese donnée. */
-bool gtk_bin_view_contain_address(const GtkBinView *, vmpa_t);
-
-/* S'assure qu'une adresse donnée est visible à l'écran. */
-void gtk_bin_view_scroll_to_address(GtkBinView *, vmpa_t);
-
-
-
-#endif /* _GTK_BINVIEW_H */
diff --git a/src/gtkext/gtkdockitem.c b/src/gtkext/gtkdockitem.c
deleted file mode 100644
index 692ed17..0000000
--- a/src/gtkext/gtkdockitem.c
+++ /dev/null
@@ -1,315 +0,0 @@
-
-/* OpenIDA - Outil d'analyse de fichiers binaires
- * gtkdockitem.c - mémorisation des propriétés d'un panneau dockable
- *
- * Copyright (C) 2009 Cyrille Bagard
- *
- * This file is part of OpenIDA.
- *
- * OpenIDA 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.
- *
- * OpenIDA 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 Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "gtkdockitem.h"
-
-
-#include "iodamarshal.h"
-
-
-
-/* Procède à l'initialisation d'un panneau dockable. */
-static void g_dock_item_class_init(GDockItemClass *);
-
-/* Supprime toutes les références externes. */
-static void g_dock_item_class_dispose(GDockItem *);
-
-/* Procède à la libération totale de la mémoire. */
-static void g_dock_item_class_finalize(GDockItem *);
-
-
-
-/* Détermine le type d'un panneau dockable. */
-G_DEFINE_TYPE(GDockItem, g_dock_item, G_TYPE_OBJECT)
-
-
-/******************************************************************************
-* *
-* Paramètres : klass = classe GTK à initialiser. *
-* *
-* Description : Procède à l'initialisation d'un panneau dockable. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void g_dock_item_class_init(GDockItemClass *klass)
-{
- GObjectClass *object; /* Autre version de la classe */
-
- object = G_OBJECT_CLASS(klass);
-
- object->dispose = g_dock_item_class_dispose;
- object->finalize = g_dock_item_class_finalize;
-
- g_signal_new("content-changed",
- G_TYPE_DOCK_ITEM,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET(GDockItemClass, content_changed),
- NULL, NULL,
- g_cclosure_user_marshal_VOID__OBJECT_OBJECT,
- G_TYPE_NONE, 2, GTK_TYPE_WIDGET, GTK_TYPE_WIDGET);
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : ditem = instance d'objet GLib à traiter. *
-* *
-* Description : Supprime toutes les références externes. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void g_dock_item_class_dispose(GDockItem *ditem)
-{
- gpointer obj_class; /* Classe parente */
-
- gtk_widget_unref(ditem->panel);
-
- obj_class = g_type_class_peek_parent(G_DOCK_ITEM_GET_CLASS(ditem));
-
- G_OBJECT_CLASS(obj_class)->dispose(G_OBJECT(ditem));
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : ditem = instance d'objet GLib à traiter. *
-* *
-* Description : Procède à la libération totale de la mémoire. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void g_dock_item_class_finalize(GDockItem *ditem)
-{
- gpointer obj_class; /* Classe parente */
-
- g_free(ditem->name);
- g_free(ditem->desc);
-
- obj_class = g_type_class_peek_parent(G_DOCK_ITEM_GET_CLASS(ditem));
-
- G_OBJECT_CLASS(obj_class)->finalize(G_OBJECT(ditem));
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : ditem = composant GTK à initialiser. *
-* *
-* Description : Procède à l'initialisation d'un panneau dockable. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void g_dock_item_init(GDockItem *ditem)
-{
-
- ditem->name = NULL;
-
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : name = nouveau nom à prendre en compte. *
-* panel = nouveau panneau à prendre en compte. *
-* *
-* Description : Crée une nouvelle mémorisation de panneau dockable. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GDockItem *g_dock_item_new(const gchar *name, GtkWidget *panel)
-{
- GDockItem *result; /* Composant à retourner */
-
- result = g_object_new(G_TYPE_DOCK_ITEM, NULL);
-
- g_dock_item_set_name(result, name);
- g_dock_item_set_panel(result, panel);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : ditem = composant GTK à modifier. *
-* name = nouveau nom à prendre en compte. *
-* *
-* Description : Change le nom du panneau dockable pour son onglet. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-void g_dock_item_set_name(GDockItem *ditem, const gchar *name)
-{
- if (ditem->name != NULL)
- g_free(ditem->name);
-
- ditem->name = g_strdup(name);
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : ditem = composant GTK à modifier. *
-* *
-* Description : Fournit le nom du panneau dockable pour son onglet. *
-* *
-* Retour : Etiquette à faire apparaître sur un onglet. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-const gchar *g_dock_item_get_name(GDockItem *ditem)
-{
- return ditem->name;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : ditem = composant GTK à modifier. *
-* desc = nouvelle description à prendre en compte. *
-* *
-* Description : Change la description du panneau dockable pour son titre. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-void g_dock_item_set_desc(GDockItem *ditem, const gchar *desc)
-{
- if (ditem->desc != NULL)
- g_free(ditem->desc);
-
- ditem->desc = g_strdup(desc);
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : ditem = composant GTK à modifier. *
-* *
-* Description : Fournit la description du panneau dockable pour son titre. *
-* *
-* Retour : Etiquette à faire apparaître sur un onglet. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-const gchar *g_dock_item_get_desc(GDockItem *ditem)
-{
- const char *result; /* CHaîne à renvoyer */
-
- result = ditem->desc;
-
- if (result == NULL)
- result = g_dock_item_get_name(ditem);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : ditem = composant GTK à modifier. *
-* panel = nouveau panneau à prendre en compte. *
-* *
-* Description : Change le panneau dockable associé à l'élément. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-void g_dock_item_set_panel(GDockItem *ditem, GtkWidget *panel)
-{
- GtkWidget *old; /* Ancien panneau remplacé */
-
- old = ditem->panel;
-
- ditem->panel = panel;
- gtk_widget_ref(panel);
-
- if (old != NULL)
- {
- g_signal_emit_by_name(ditem, "content-changed", old, panel);
- gtk_widget_unref(old);
- }
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : ditem = composant GTK à modifier. *
-* *
-* Description : Fournit le panneau dockable associé à l'élément. *
-* *
-* Retour : Panneau actuellement associé. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GtkWidget *g_dock_item_get_panel(GDockItem *ditem)
-{
- return ditem->panel;
-
-}
diff --git a/src/gtkext/gtkdockitem.h b/src/gtkext/gtkdockitem.h
deleted file mode 100644
index 7525b9a..0000000
--- a/src/gtkext/gtkdockitem.h
+++ /dev/null
@@ -1,106 +0,0 @@
-
-/* OpenIDA - Outil d'analyse de fichiers binaires
- * gtkdockitem.h - prototypes pour la mémorisation des propriétés d'un panneau dockable
- *
- * Copyright (C) 2009-2012 Cyrille Bagard
- *
- * This file is part of OpenIDA.
- *
- * OpenIDA 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.
- *
- * OpenIDA 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 Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#ifndef _GTKEXT_GTKDOCKITEM_H
-#define _GTKEXT_GTKDOCKITEM_H
-
-
-#include <gtk/gtk.h>
-
-
-G_BEGIN_DECLS
-
-
-#define G_TYPE_DOCK_ITEM g_dock_item_get_type()
-#define G_DOCK_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), g_dock_item_get_type(), GDockItem))
-#define G_IS_DOCK_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), g_dock_item_get_type()))
-#define G_DOCK_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), G_TYPE_DOCK_ITEM, GDockItemClass))
-#define G_IS_DOCK_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), G_TYPE_DOCK_ITEM))
-#define G_DOCK_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_DOCK_ITEM, GDockItemClass))
-
-
-
-
-
-
-
-
-typedef struct _GDockItem GDockItem;
-typedef struct _GDockItemClass GDockItemClass;
-
-
-
-
-struct _GDockItem
-{
- GObject parent; /* A laisser en premier */
-
- gchar *name; /* Nom court pour titre */
- gchar *desc; /* Nom long pour onglet */
-
- GtkWidget *panel; /* Pnneau construit associé */
-
-};
-
-struct _GDockItemClass
-{
- GObjectClass parent; /* A laisser en premier */
-
- /* Signaux */
-
- void (* content_changed) (GDockItem *, GtkWidget *, GtkWidget *);
-
-};
-
-
-/* Détermine le type d'un panneau dockable. */
-GType g_dock_item_get_type(void);
-
-/* Crée une nouvelle mémorisation de panneau dockable. */
-GDockItem *g_dock_item_new(const gchar *, GtkWidget *);
-
-/* Change le nom du panneau dockable pour son onglet. */
-void g_dock_item_set_name(GDockItem *, const gchar *);
-
-/* Fournit le nom du panneau dockable pour son onglet. */
-const gchar *g_dock_item_get_name(GDockItem *);
-
-/* Change la description du panneau dockable pour son titre. */
-void g_dock_item_set_desc(GDockItem *, const gchar *);
-
-/* Fournit la description du panneau dockable pour son titre. */
-const gchar *g_dock_item_get_desc(GDockItem *);
-
-/* Change le panneau dockable associé à l'élément. */
-void g_dock_item_set_panel(GDockItem *, GtkWidget *);
-
-/* Fournit le panneau dockable associé à l'élément. */
-GtkWidget *g_dock_item_get_panel(GDockItem *);
-
-
-
-G_END_DECLS
-
-
-
-#endif /* _GTKEXT_GTKDOCKITEM_H */
diff --git a/src/gtkext/gtkdockpanel.c b/src/gtkext/gtkdockpanel.c
deleted file mode 100644
index 4b9668b..0000000
--- a/src/gtkext/gtkdockpanel.c
+++ /dev/null
@@ -1,778 +0,0 @@
-
-/* OpenIDA - Outil d'analyse de fichiers binaires
- * gtkdockpanel.c - manipulation et affichage de panneaux dockables
- *
- * Copyright (C) 2009-2012 Cyrille Bagard
- *
- * This file is part of OpenIDA.
- *
- * OpenIDA 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.
- *
- * OpenIDA 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 Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "gtkdockpanel.h"
-
-
-#include <malloc.h>
-#include <string.h>
-
-
-#include "iodamarshal.h"
-
-
-
-/* Valide ou non le terme d'un "Drag and drop". */
-static gboolean gtk_dock_panel_drag_drop_cb(GtkDockPanel *, GdkDragContext *, gint, gint, guint, gpointer);
-
-/* Procède au "Drag and drop" effectif. */
-static void gtk_dock_panel_drag_data_received_cb(GtkDockPanel *, GdkDragContext *, gint, gint, GtkSelectionData *, guint, guint, gpointer);
-
-/* Accompagne le déplacement sur une cible de "Drag and drop". */
-static gboolean gtk_dock_panel_drag_motion_cb(GtkDockPanel *, GdkDragContext *, gint, gint, guint, gpointer);
-
-/* Note la fin des visites sur une cible de "Drag and drop". */
-static void gtk_dock_panel_drag_leave_cb(GtkDockPanel *, GdkDragContext *, guint, gpointer);
-
-/* Procède au démarrage d'un "Drag and drop". */
-static void gtk_dock_panel_drag_begin_cb(GtkDockPanel *, GdkDragContext *, gpointer);
-
-/* Procède à l'envoi depuis la source à la destination. */
-static void gtk_dock_panel_drag_data_get_cb(GtkDockPanel *, GdkDragContext *, GtkSelectionData *, guint, guint, gpointer );
-
-/* Marque l'arrêt d'un "Drag and drop". */
-static void gtk_dock_panel_drag_end_cb(GtkDockPanel *, GdkDragContext *, gpointer);
-
-/* Nettoie les traces d'un "Drag and drop". */
-//static void gtk_dock_panel_drag_data_delete_cb(GtkDockPanel *, GdkDragContext *, gpointer);
-
-/* Ajoute un paquet d'informations à la station dockable. */
-static void _gtk_dock_panel_add_item(GtkDockPanel *, GDockItem *, gint);
-
-/* Remplace le panneau d'un membre actuellement affiché. */
-static void on_dock_item_content_changed(GDockItem *, GtkWidget *, GtkWidget *, GtkDockPanel *);
-
-/* Supprime un paquet d'informations à la station dockable. */
-static void _gtk_dock_panel_remove_item(GtkDockPanel *, GDockItem *, GtkWidget *);
-
-/* Met à jour le titre du support de panneaux dockables. */
-static gboolean gtk_dock_panel_update_title(GtkNotebook *, gpointer *, guint, gpointer);
-
-
-
-/******************************************************************************/
-#define _BYTE 8
-#define _WORD 16
-#define _DWORD 32
-
-
-/******************************************************************************/
-/* Define a list of data types called "targets" that a destination widget will
- * accept. The string type is arbitrary, and negotiated between DnD widgets by
- * the developer. An enum or GQuark can serve as the integer target id. */
-enum {
- TARGET_INT32,
- TARGET_STRING,
- TARGET_DOCKITEM,
- TARGET_ROOTWIN
-};
-
-/* datatype (string), restrictions on DnD (GtkTargetFlags), datatype (int) */
-static GtkTargetEntry target_list[] = {
- { "INTEGER", 0, TARGET_INT32 },
- { "STRING", 0, TARGET_STRING },
- { "OpenIDA/dock-item", 0, TARGET_DOCKITEM },
- { "application/x-rootwindow-drop", 0, TARGET_ROOTWIN }
-};
-
-static guint n_targets = G_N_ELEMENTS (target_list);
-
-
-
-
-
-
-
-/* Détermine le type du composant d'affichage des morceaux. */
-G_DEFINE_TYPE(GtkDockPanel, gtk_dock_panel, GTK_TYPE_VBOX)
-
-
-
-
-/******************************************************************************
-* *
-* Paramètres : class = classe GTK à initialiser. *
-* *
-* Description : Procède à l'initialisation de l'afficheur de morceaux. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void gtk_dock_panel_class_init(GtkDockPanelClass *class)
-{
- g_signal_new("switch-item",
- GTK_TYPE_DOCK_PANEL,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET(GtkDockPanelClass, switch_item),
- NULL, NULL,
- g_cclosure_user_marshal_VOID__OBJECT,
- G_TYPE_NONE, 1, G_TYPE_DOCK_ITEM);
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : dpanel = composant GTK à initialiser. *
-* *
-* Description : Procède à l'initialisation de la station dockable. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void gtk_dock_panel_init(GtkDockPanel *dpanel)
-{
-
- GtkWidget *eventbox1;
- GtkWidget *hbox1;
- GtkWidget *button1;
- GtkWidget *image1;
- GtkWidget *button2;
- GtkWidget *image2;
-
-
-
- eventbox1 = gtk_event_box_new ();
- gtk_widget_show (eventbox1);
- gtk_box_pack_start (GTK_BOX (dpanel), eventbox1, FALSE, TRUE, 0);
-
- hbox1 = gtk_hbox_new (FALSE, 0);
- gtk_widget_show (hbox1);
- gtk_container_add (GTK_CONTAINER (eventbox1), hbox1);
-
- dpanel->title = GTK_LABEL(gtk_label_new(("<b>titre</b>")));
- gtk_widget_show(GTK_WIDGET(dpanel->title));
- gtk_box_pack_start(GTK_BOX (hbox1), GTK_WIDGET(dpanel->title), TRUE, TRUE, 0);
- gtk_label_set_use_markup(GTK_LABEL(dpanel->title), TRUE);
- gtk_misc_set_alignment(GTK_MISC(dpanel->title), 0, 0.5);
-
- button1 = gtk_button_new ();
- gtk_widget_show (button1);
- gtk_box_pack_start (GTK_BOX (hbox1), button1, FALSE, FALSE, 0);
- gtk_button_set_relief (GTK_BUTTON (button1), GTK_RELIEF_NONE);
-
- image1 = gtk_image_new_from_stock ("gtk-media-play", GTK_ICON_SIZE_MENU);
- gtk_widget_show (image1);
- gtk_container_add (GTK_CONTAINER (button1), image1);
- gtk_widget_set_size_request (image1, 10, 10);
-
- button2 = gtk_button_new ();
- gtk_widget_show (button2);
- gtk_box_pack_start (GTK_BOX (hbox1), button2, FALSE, FALSE, 0);
- gtk_button_set_relief (GTK_BUTTON (button2), GTK_RELIEF_NONE);
-
- image2 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU);
- gtk_widget_show (image2);
- gtk_container_add (GTK_CONTAINER (button2), image2);
- gtk_widget_set_size_request (image2, 10, 10);
-
- dpanel->notebook = gtk_notebook_new ();
- gtk_widget_show (dpanel->notebook);
- gtk_box_pack_start (GTK_BOX (dpanel), dpanel->notebook, TRUE, TRUE, 0);
- gtk_notebook_set_show_border (GTK_NOTEBOOK (dpanel->notebook), FALSE);
- gtk_notebook_set_tab_pos (GTK_NOTEBOOK (dpanel->notebook), GTK_POS_BOTTOM);
- gtk_notebook_set_scrollable (GTK_NOTEBOOK (dpanel->notebook), TRUE);
-
-
-
-
- /* Make the "well label" a DnD destination. */
- gtk_drag_dest_set
- (
- GTK_WIDGET(dpanel), /* widget that will accept a drop */
- GTK_DEST_DEFAULT_MOTION /* default actions for dest on DnD */
- | GTK_DEST_DEFAULT_HIGHLIGHT,
- target_list, /* lists of target to support */
- n_targets, /* size of list */
- GDK_ACTION_COPY /* what to do with data after dropped */
- );
-
- /* Make the "coin button" a DnD source. */
- /* Why doesn't GtkLabel work here? */
- gtk_drag_source_set
- (
- GTK_WIDGET(dpanel), /* widget will be drag-able */
- GDK_BUTTON1_MASK, /* modifier that will start a drag */
- target_list, /* lists of target to support */
- n_targets, /* size of list */
- GDK_ACTION_COPY /* what to do with data after dropped */
- );
-
-
- /* Côté destination */
- g_signal_connect(dpanel, "drag-drop", G_CALLBACK(gtk_dock_panel_drag_drop_cb), NULL);
- g_signal_connect(dpanel, "drag-data-received", G_CALLBACK(gtk_dock_panel_drag_data_received_cb), NULL);
- g_signal_connect(dpanel, "drag-motion", G_CALLBACK(gtk_dock_panel_drag_motion_cb), NULL);
- g_signal_connect(dpanel, "drag-leave", G_CALLBACK(gtk_dock_panel_drag_leave_cb), NULL);
-
- /* Côté source */
- g_signal_connect(dpanel, "drag-begin", G_CALLBACK(gtk_dock_panel_drag_begin_cb), NULL);
- g_signal_connect(dpanel, "drag-data-get", G_CALLBACK(gtk_dock_panel_drag_data_get_cb), NULL);
- g_signal_connect(dpanel, "drag-end", G_CALLBACK(gtk_dock_panel_drag_end_cb), NULL);
- //g_signal_connect(dpanel, "drag-data-delete", G_CALLBACK(gtk_dock_panel_drag_data_delete_cb), NULL);
-
-
- g_signal_connect(dpanel->notebook, "switch-page", G_CALLBACK(gtk_dock_panel_update_title), dpanel);
-
-
-
-
-
-#if 0
- /* Make the "well label" a DnD destination. */
- gtk_drag_dest_set
- (
- dpanel->dropwin, /* widget that will accept a drop */
- GTK_DEST_DEFAULT_MOTION /* default actions for dest on DnD */
- | GTK_DEST_DEFAULT_HIGHLIGHT,
- target_list, /* lists of target to support */
- n_targets, /* size of list */
- GDK_ACTION_COPY /* what to do with data after dropped */
- );
-#endif
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : - *
-* *
-* Description : Crée un nouveau composant pour station dockable. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GtkWidget *gtk_dock_panel_new(void)
-{
- return g_object_new(GTK_TYPE_DOCK_PANEL, NULL);
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : dpanel = composant à l'origine de la manoeuvre. *
-* context = contexte de l'opération de "Drag and drop". *
-* x = abscisse du pointeur relaché. *
-* y = ordonnée du pointeur relaché. *
-* time = date de l'opération. *
-* data = adresse non utilisée ici. *
-* *
-* Description : Valide ou non le terme d'un "Drag and drop". *
-* *
-* Retour : TRUE si l'opération peut continuer, FALSE sinon. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static gboolean gtk_dock_panel_drag_drop_cb(GtkDockPanel *dpanel, GdkDragContext *context, gint x, gint y, guint time, gpointer data)
-{
- gboolean result; /* Ordre à retourner */
- GdkAtom target; /* Type d'élément à déplacer */
-
- result = (context->targets != NULL);
-
- printf(" ## DRAG DROP ## %p\n", dpanel);
-
- if (context->targets != NULL)
- {
- target = GDK_POINTER_TO_ATOM(g_list_nth_data(context->targets, TARGET_DOCKITEM));
- gtk_drag_get_data(GTK_WIDGET(dpanel), context, target, time);
- }
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : dpanel = composant à l'origine de la manoeuvre. *
-* context = contexte de l'opération de "Drag and drop". *
-* x = abscisse du pointeur relaché. *
-* y = ordonnée du pointeur relaché. *
-* selection = réceptacle pour la transmission. *
-* target = type de données demandé. *
-* time = date de l'opération. *
-* data = adresse non utilisée ici. *
-* *
-* Description : Procède au "Drag and drop" effectif. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void gtk_dock_panel_drag_data_received_cb(GtkDockPanel *dpanel, GdkDragContext *context, gint x, gint y, GtkSelectionData *selection, guint target, guint time, gpointer data)
-{
- GDockItem *ditem; /* Elément transféré */
- gboolean success; /* Bilan de l'opération */
-
- success = FALSE;
-
- if (selection != NULL && selection->length >= 0)
- switch (target)
- {
- case TARGET_DOCKITEM:
- success = (selection->length == sizeof(GDockItem *));
-
- printf(" ## DRAG DATA RCV ## %p\n", dpanel);
-
- printf(" -- source :: %p\n", gtk_drag_get_source_widget(context));
- printf(" -- dest :: %p\n", dpanel);
-
- if (success)
- {
- ditem = G_DOCK_ITEM(*((GDockItem **)selection->data));
-
- printf(" :: get ? %p - %d\n", ditem, G_IS_DOCK_ITEM(ditem));
-
- gtk_dock_panel_remove_item(gtk_drag_get_source_widget(context), ditem);
- gtk_dock_panel_add_item(dpanel, ditem);
-
- }
-
- break;
-
- }
-
- gtk_drag_finish(context, success, context->action == GDK_ACTION_MOVE, time);
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : dpanel = composant à l'origine de la manoeuvre. *
-* context = contexte de l'opération de "Drag and drop". *
-* x = abscisse du pointeur relaché. *
-* y = ordonnée du pointeur relaché. *
-* time = date de l'opération. *
-* data = adresse non utilisée ici. *
-* *
-* Description : Accompagne le déplacement sur une cible de "Drag and drop". *
-* *
-* Retour : TRUE pour continuer la propagation, FALSE sinon. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static gboolean gtk_dock_panel_drag_motion_cb(GtkDockPanel *dpanel, GdkDragContext *context, gint x, gint y, guint time, gpointer data)
-{
- gint new_x; /* Abscisse de la fenêtre */
- gint new_y; /* Ordonnée de la fenêtre */
- GtkRequisition req; /* Taille actuelle du panneau */
-
-#if 0
- if (!gtk_widget_get_visible(dpanel->dropwin))
- {
- gdk_window_get_origin(GTK_WIDGET(dpanel)->window, &new_x, &new_y);
-
- new_x += GTK_WIDGET(dpanel)->allocation.x + (GTK_WIDGET(dpanel)->allocation.width - 89) / 2;
- new_y += GTK_WIDGET(dpanel)->allocation.y + (GTK_WIDGET(dpanel)->allocation.height - 89) / 2;
-
- gtk_widget_set_uposition(dpanel->dropwin, new_x, new_y);
-
- gtk_widget_show(dpanel->dropwin);
-
- }
-#endif
- return FALSE;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : dpanel = composant à l'origine de la manoeuvre. *
-* context = contexte de l'opération de "Drag and drop". *
-* x = abscisse du pointeur relaché. *
-* y = ordonnée du pointeur relaché. *
-* time = date de l'opération. *
-* data = adresse non utilisée ici. *
-* *
-* Description : Note la fin des visites sur une cible de "Drag and drop". *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void gtk_dock_panel_drag_leave_cb(GtkDockPanel *dpanel, GdkDragContext *context, guint time, gpointer data)
-{
- //gtk_widget_hide(dpanel->dropwin);
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : dpanel = composant à l'origine de la manoeuvre. *
-* context = contexte de l'opération de "Drag and drop". *
-* data = adresse non utilisée ici. *
-* *
-* Description : Procède au démarrage d'un "Drag and drop". *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void gtk_dock_panel_drag_begin_cb(GtkDockPanel *dpanel, GdkDragContext *context, gpointer data)
-{
- printf(" ## DRAG BEGIN ## %p\n", dpanel);
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : dpanel = composant à l'origine de la manoeuvre. *
-* context = contexte de l'opération de "Drag and drop". *
-* selection = réceptacle pour la transmission. *
-* target = type de données demandé. *
-* time = date de l'opération. *
-* data = adresse non utilisée ici. *
-* *
-* Description : Procède à l'envoi depuis la source à la destination. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void gtk_dock_panel_drag_data_get_cb(GtkDockPanel *dpanel, GdkDragContext *context, GtkSelectionData *selection, guint target, guint time, gpointer data)
-{
- gint current; /* Indice de l'onglet courant */
- GDockItem *ditem; /* Elément à transférer */
-
- switch (target)
- {
- case TARGET_DOCKITEM:
-
- printf(" ## DRAG GET DATA ## %p\n", dpanel);
-
- current = gtk_notebook_get_current_page(dpanel->notebook);
-
- ditem = G_DOCK_ITEM(g_list_nth_data(dpanel->ditems, current));
-
- printf(" %d nth item is %p\n", current, ditem);
-
- printf(" :: set ? %p - %d\n", ditem, G_IS_DOCK_ITEM(ditem));
-
- gtk_selection_data_set(selection, selection->target,
- 32, (guchar *)&ditem, sizeof(GDockItem *));
-
- break;
-
- }
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : dpanel = composant à l'origine de la manoeuvre. *
-* context = contexte de l'opération de "Drag and drop". *
-* data = adresse non utilisée ici. *
-* *
-* Description : Marque l'arrêt d'un "Drag and drop". *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void gtk_dock_panel_drag_end_cb(GtkDockPanel *dpanel, GdkDragContext *context, gpointer data)
-{
- printf(" ## DRAG END ## %p\n", dpanel);
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : dpanel = composant dont le contenu est à parcourir. *
-* name = désignation humaine du membre à retrouver. *
-* *
-* Description : Retrouve un membre du panneau d'après son nom. *
-* *
-* Retour : Membre trouvé ou NULL si aucun. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GDockItem *gtk_dock_panel_item_from_name(GtkDockPanel *dpanel, const char *name)
-{
- GDockItem *result; /* Trouvaille à remonter */
- GList *iter; /* Boucle de parcours */
- const char *tmp; /* Autre nom à consulter */
-
- result = NULL;
-
- for (iter = dpanel->ditems; iter != NULL && result == NULL; iter = g_list_next(iter))
- {
- tmp = g_dock_item_get_name(G_DOCK_ITEM(iter->data));
-
- if (strcmp(name, tmp) == 0)
- result = G_DOCK_ITEM(iter->data);
-
- }
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : dpanel = composant GTK à compléter. *
-* ditem = nouvel élément à intégrer. *
-* *
-* Description : Ajoute un paquet d'informations à la station dockable. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-void gtk_dock_panel_add_item(GtkDockPanel *dpanel, GDockItem *ditem)
-{
- _gtk_dock_panel_add_item(dpanel, ditem, -1);
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : dpanel = composant GTK à compléter. *
-* ditem = nouvel élément à intégrer. *
-* position = point d'insertion (-1 pour la fin). *
-* *
-* Description : Ajoute un paquet d'informations à la station dockable. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void _gtk_dock_panel_add_item(GtkDockPanel *dpanel, GDockItem *ditem, gint position)
-{
- GtkWidget *label; /* Etiquette d'onglet */
-
- dpanel->ditems = g_list_insert(dpanel->ditems, ditem, position);
-
- printf("[add %p to %p] list len :: %u\n", ditem, dpanel, g_list_length(dpanel->ditems));
-
- label = gtk_label_new(g_dock_item_get_name(ditem));
- gtk_widget_show(label);
-
- gtk_notebook_insert_page(dpanel->notebook, g_dock_item_get_panel(ditem), label, position);
-
- gtk_notebook_set_show_tabs(dpanel->notebook, g_list_length(dpanel->ditems) > 1);
-
- g_signal_connect(ditem, "content-changed", G_CALLBACK(on_dock_item_content_changed), dpanel);
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : ditem = composant GTK déjà mis à jour. *
-* old = ancien panneau retiré. *
-* new = nouveau panneau présenté. *
-* dpanel = composant GTK à mettre à jour. *
-* *
-* Description : Remplace le panneau d'un membre actuellement affiché. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void on_dock_item_content_changed(GDockItem *ditem, GtkWidget *old, GtkWidget *new, GtkDockPanel *dpanel)
-{
- gint position; /* Position de l'onglet à maj */
-
- position = gtk_notebook_page_num(dpanel->notebook, old);
-
- g_signal_handlers_disconnect_by_func(dpanel->notebook, G_CALLBACK(gtk_dock_panel_update_title), dpanel);
-
- //g_object_ref(G_OBJECT(ditem));
-
- _gtk_dock_panel_remove_item(dpanel, ditem, old);
- _gtk_dock_panel_add_item(dpanel, ditem, position);
-
- //g_object_unref(G_OBJECT(ditem));
-
- gtk_notebook_set_current_page(dpanel->notebook, position);
-
- g_signal_connect(dpanel->notebook, "switch-page", G_CALLBACK(gtk_dock_panel_update_title), dpanel);
-
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : dpanel = composant GTK à mettre à jour. *
-* ditem = nouvel élément à sortir. *
-* *
-* Description : Supprime un paquet d'informations à la station dockable. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-void gtk_dock_panel_remove_item(GtkDockPanel *dpanel, GDockItem *ditem)
-{
- gint pos; /* Position de l'élément visé */
-
- g_signal_handlers_disconnect_by_func(ditem, G_CALLBACK(on_dock_item_content_changed), dpanel);
-
- pos = g_list_index(dpanel->ditems, ditem);
-
- dpanel->ditems = g_list_remove(dpanel->ditems, ditem);
-
- printf("[rem %p from %p] list len :: %u\n", ditem, dpanel, g_list_length(dpanel->ditems));
-
- gtk_widget_ref(g_dock_item_get_panel(ditem));
- gtk_container_remove(GTK_CONTAINER(dpanel->notebook), g_dock_item_get_panel(ditem));
-
- //gtk_notebook_remove_page(dpanel->notebook, pos);
-
- g_object_unref(G_OBJECT(ditem));
-
- gtk_notebook_set_show_tabs(dpanel->notebook, g_list_length(dpanel->ditems) > 1);
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : dpanel = composant GTK à mettre à jour. *
-* ditem = nouvel élément à sortir. *
-* panel = panneau GTK de l'élément à supprimer. *
-* *
-* Description : Supprime un paquet d'informations à la station dockable. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void _gtk_dock_panel_remove_item(GtkDockPanel *dpanel, GDockItem *ditem, GtkWidget *panel)
-{
- gint pos; /* Position de l'élément visé */
-
- g_signal_handlers_disconnect_by_func(ditem, G_CALLBACK(on_dock_item_content_changed), dpanel);
-
- pos = g_list_index(dpanel->ditems, ditem);
-
- dpanel->ditems = g_list_remove(dpanel->ditems, ditem);
-
- printf("[rem %p from %p] list len :: %u\n", ditem, dpanel, g_list_length(dpanel->ditems));
-
- gtk_widget_ref(panel);
- gtk_container_remove(GTK_CONTAINER(dpanel->notebook), panel);
-
- //gtk_notebook_remove_page(dpanel->notebook, pos);
-
- gtk_notebook_set_show_tabs(dpanel->notebook, g_list_length(dpanel->ditems) > 1);
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : notebook = support à l'origine de la mise à jour. *
-* page = onglet mis en avant. *
-* index = indice de l'onglet actuellement actif. *
-* data = adresse du conteneur supérieur. *
-* *
-* Description : Met à jour le titre du support de panneaux dockables. *
-* *
-* Retour : TRUE ? *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static gboolean gtk_dock_panel_update_title(GtkNotebook *notebook, gpointer *page, guint index, gpointer data)
-{
- GDockItem *ditem; /* Elément nouvellement actif */
- const gchar *desc; /* Description à afficher */
- char *str; /* Valeur finale reconstituée */
-
-
- //printf("[%p] list len :: %u / %u\n", data, index, g_list_length(GTK_DOCK_PANEL(data)->ditems));
-
- if (index >= g_list_length(GTK_DOCK_PANEL(data)->ditems)) return FALSE;
-
- //printf(" >> ditem = %p\n", g_list_nth_data(GTK_DOCK_PANEL(data)->ditems, index));
-
- //printf(" >> index :: %u vs %d\n", index, gtk_notebook_get_current_page(GTK_DOCK_PANEL(data)->notebook));
-
- ditem = G_DOCK_ITEM(g_list_nth_data(GTK_DOCK_PANEL(data)->ditems, index));
-
- desc = g_dock_item_get_desc(ditem);
-
- str = calloc(strlen("<b>") + strlen(desc) + strlen("</b>") + 1, sizeof(char));
-
- strcpy(str, "<b>");
- strcat(str, desc);
- strcat(str, "</b>");
-
- gtk_label_set_markup(GTK_DOCK_PANEL(data)->title, str);
-
- free(str);
-
- g_signal_emit_by_name(GTK_DOCK_PANEL(data), "switch-item", ditem);
-
- return TRUE;
-
-}
diff --git a/src/gtkext/gtkdockpanel.h b/src/gtkext/gtkdockpanel.h
deleted file mode 100644
index 9609710..0000000
--- a/src/gtkext/gtkdockpanel.h
+++ /dev/null
@@ -1,97 +0,0 @@
-
-/* OpenIDA - Outil d'analyse de fichiers binaires
- * gtkdockpanel.h - prototypes pour la manipulation et l'affichage de panneaux dockables
- *
- * Copyright (C) 2009-2012 Cyrille Bagard
- *
- * This file is part of OpenIDA.
- *
- * OpenIDA 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.
- *
- * OpenIDA 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 Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#ifndef _GTKEXT_GTKDOCKPANEL_H
-#define _GTKEXT_GTKDOCKPANEL_H
-
-
-#include <gtk/gtk.h>
-
-
-#include "gtkdockitem.h"
-
-
-
-G_BEGIN_DECLS
-
-
-
-#define GTK_TYPE_DOCK_PANEL (gtk_dock_panel_get_type())
-#define GTK_DOCK_PANEL(obj) G_TYPE_CHECK_INSTANCE_CAST(obj, gtk_dock_panel_get_type (), GtkDockPanel)
-#define GTK_DOCK_PANEL_CLASS(klass) G_TYPE_CHECK_CLASS_CAST(klass, gtk_dock_panel_get_type(), GtkDockPanelClass)
-#define GTK_IS_DOCK_PANEL(obj) G_TYPE_CHECK_INSTANCE_TYPE(obj, gtk_dock_panel_get_type())
-
-
-typedef struct _GtkDockPanel GtkDockPanel;
-typedef struct _GtkDockPanelClass GtkDockPanelClass;
-
-
-#include <stdbool.h>
-
-
-struct _GtkDockPanel
-{
- GtkVBox vbox; /* Présence obligatoire en 1er */
-
- GtkLabel *title; /* Title du support principal */
-
- GtkNotebook *notebook; /* Support à onglets */
- GList *ditems; /* Panneaux intégrés */
-
- GtkWidget *dropwin; /* Destination des Drag'n Drop */
-
-};
-
-struct _GtkDockPanelClass
-{
- GtkVBoxClass parent_class; /* Présence obligatoire en 1er */
-
- /* Signaux */
-
- void (* switch_item) (GtkDockPanel *, GDockItem *);
-
-};
-
-
-/* Détermine le type du composant d'affichage des morceaux. */
-GType gtk_dock_panel_get_type(void);
-
-/* Crée un nouveau composant pour station dockable. */
-GtkWidget *gtk_dock_panel_new(void);
-
-/* Retrouve un membre du panneau d'après son nom. */
-GDockItem *gtk_dock_panel_item_from_name(GtkDockPanel *, const char *);
-
-/* Ajoute un paquet d'informations à la station dockable. */
-void gtk_dock_panel_add_item(GtkDockPanel *, GDockItem *);
-
-/* Supprime un paquet d'informations à la station dockable. */
-void gtk_dock_panel_remove_item(GtkDockPanel *, GDockItem *);
-
-
-
-G_END_DECLS
-
-
-
-#endif /* _GTKEXT_GTKDOCKPANEL_H */
diff --git a/src/gtkext/gtkgraphview.c b/src/gtkext/gtkgraphview.c
index 6ce6060..9fa9135 100644
--- a/src/gtkext/gtkgraphview.c
+++ b/src/gtkext/gtkgraphview.c
@@ -569,7 +569,7 @@ static GtkViewPanel **gtk_graph_view_load_nodes(GtkGraphView *view, GLoadedBinar
result = (GtkViewPanel **)realloc(result, ++(*count) * sizeof(GtkViewPanel *));
result[*count - 1] = GTK_VIEW_PANEL(gtk_block_view_new());
- gtk_widget_show(result[*count - 1]);
+ gtk_widget_show(GTK_WIDGET(result[*count - 1]));
gtk_view_panel_attach_binary(result[*count - 1], binary, addr, code);
gtk_view_panel_show_border(result[*count - 1], true);
@@ -591,7 +591,7 @@ static GtkViewPanel **gtk_graph_view_load_nodes(GtkGraphView *view, GLoadedBinar
result = (GtkViewPanel **)realloc(result, ++(*count) * sizeof(GtkViewPanel *));
result[*count - 1] = GTK_VIEW_PANEL(gtk_block_view_new());
- gtk_widget_show(result[*count - 1]);
+ gtk_widget_show(GTK_WIDGET(result[*count - 1]));
gtk_view_panel_attach_binary(result[*count - 1], binary, addr, code);
gtk_view_panel_show_border(result[*count - 1], true);
@@ -612,7 +612,7 @@ static GtkViewPanel **gtk_graph_view_load_nodes(GtkGraphView *view, GLoadedBinar
result = (GtkViewPanel **)realloc(result, ++(*count) * sizeof(GtkViewPanel *));
result[*count - 1] = GTK_VIEW_PANEL(gtk_block_view_new());
- gtk_widget_show(result[*count - 1]);
+ gtk_widget_show(GTK_WIDGET(result[*count - 1]));
gtk_view_panel_attach_binary(result[*count - 1], binary, addr, code);
gtk_view_panel_show_border(result[*count - 1], true);
diff --git a/src/gtkext/gtksourceview.c b/src/gtkext/gtksourceview.c
index 4d8af09..3559ece 100644
--- a/src/gtkext/gtksourceview.c
+++ b/src/gtkext/gtksourceview.c
@@ -123,7 +123,7 @@ GtkWidget *gtk_source_view_new(void)
{
GtkSourceView *result; /* Composant à retourner */
- result = gtk_type_new(GTK_TYPE_SOURCE_VIEW);
+ result = g_object_new(GTK_TYPE_SOURCE_VIEW, NULL);
return GTK_WIDGET(result);
diff --git a/src/gtkext/gtkviewpanel.c b/src/gtkext/gtkviewpanel.c
index 2935458..3ccc0ff 100644
--- a/src/gtkext/gtkviewpanel.c
+++ b/src/gtkext/gtkviewpanel.c
@@ -511,7 +511,7 @@ bool gtk_view_panel_contain_address(const GtkViewPanel *panel, vmpa_t addr)
* *
******************************************************************************/
-void gtk_view_panel_scroll_to_address(const GtkViewPanel *panel, vmpa_t addr)
+void gtk_view_panel_scroll_to_address(GtkViewPanel *panel, vmpa_t addr)
{
gint x; /* Abscisse à garantir */
gint y; /* Ordonnée à garantir */
diff --git a/src/gtkext/gtkviewpanel.h b/src/gtkext/gtkviewpanel.h
index f1dd2b7..7b883be 100644
--- a/src/gtkext/gtkviewpanel.h
+++ b/src/gtkext/gtkviewpanel.h
@@ -75,7 +75,7 @@ GLoadedBinary *gtk_view_panel_get_binary(const GtkViewPanel *);
bool gtk_view_panel_contain_address(const GtkViewPanel *, vmpa_t);
/* S'assure qu'une adresse donnée est visible à l'écran. */
-void gtk_view_panel_scroll_to_address(const GtkViewPanel *, vmpa_t);
+void gtk_view_panel_scroll_to_address(GtkViewPanel *, vmpa_t);
diff --git a/src/main.c b/src/main.c
index fe99c93..6e06e98 100644
--- a/src/main.c
+++ b/src/main.c
@@ -43,6 +43,10 @@
#include "format/mangling/demangler.h"
+/* params.c : configuration générale */
+extern config_param main_params[MPT_COUNT];
+
+
/******************************************************************************
* *
@@ -114,7 +118,7 @@ int main(int argc, char **argv)
gdk_threads_init();
/* Initialisation de GTK */
- gtk_set_locale();
+ setlocale (LC_ALL, "");
gtk_init(&argc, &argv);
/*
@@ -136,8 +140,6 @@ int main(int argc, char **argv)
//test_itanium_demangling();
//exit(-1);
- init_internal_panels();
-
editor = create_editor();
gtk_widget_show(editor);
diff --git a/src/panels/panel.c b/src/panels/panel.c
index 4d08b7f..139a44b 100644
--- a/src/panels/panel.c
+++ b/src/panels/panel.c
@@ -157,32 +157,6 @@ void init_internal_panels(void)
/******************************************************************************
* *
-* Paramètres : top = espace courant d'affichage principal. *
-* *
-* Description : Incruste tous les panneaux dans la fenêtre de l'éditeur. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-void place_all_panels_in_editor(GtkWidget *top)
-{
- GEditorPanel *iter; /* Boucle de parcours */
- GDockItem *ditem; /* Panneau avec ses infos. */
-
- panels_list_for_each(iter, panels_list)
- {
- ditem = g_dock_item_new(iter->name, iter->widget);
- gtk_dock_panel_add_item(GTK_DOCK_PANEL(top), ditem);
- }
-
-}
-
-
-/******************************************************************************
-* *
* Paramètres : binary = nouvelle instance de binaire analysé. *
* *
* Description : Lance une actualisation du fait d'un changement de binaire. *
diff --git a/src/panels/panel.h b/src/panels/panel.h
index 60ce657..65887c7 100644
--- a/src/panels/panel.h
+++ b/src/panels/panel.h
@@ -73,9 +73,6 @@ void change_current_binary_in_panels(GObject *, GLoadedBinary *);
/* Procède au chargement de tous les panneaux internes. */
void init_internal_panels(void);
-/* Incruste tous les panneaux dans la fenêtre de l'éditeur. */
-void place_all_panels_in_editor(GtkWidget *);
-
/* Lance une actualisation du fait d'un changement de binaire. */
void notify_panels_of_binary_change(GLoadedBinary *);
diff --git a/src/params.c b/src/params.c
index 3b21149..70365ae 100644
--- a/src/params.c
+++ b/src/params.c
@@ -25,6 +25,18 @@
+config_param main_params[MPT_COUNT] = {
+
+ [MPT_LAST_PROJECT] = { "/OpenIDA/Editor/LastProject", CVT_STRING, false, { .string = NULL } },
+ [MPT_ELLIPSIS_HEADER] = { "/OpenIDA/Editor/Panels/ellipsis_header", CVT_INTEGER, false, { .integer = 54 } },
+ [MPT_ELLIPSIS_TAB] = { "/OpenIDA/Editor/Panels/ellipsis_tab", CVT_INTEGER, false, { .integer = 35 } },
+
+ [MPT_AUTO_SAVE] = { "/OpenIDA/Project/Autosave", CVT_BOOLEAN, false, { .boolean = true } },
+
+};
+
+
+
/******************************************************************************
* *
* Paramètres : config = éventuelle configuration à définir comme principale.*
diff --git a/src/params.h b/src/params.h
index d187a97..cc5b19e 100644
--- a/src/params.h
+++ b/src/params.h
@@ -48,16 +48,6 @@ typedef enum _MainParamType
} MainParamType;
-static config_param main_params[MPT_COUNT] = {
-
- [MPT_LAST_PROJECT] = { "/OpenIDA/Editor/LastProject", CVT_STRING, false, NULL, NULL },
- [MPT_ELLIPSIS_HEADER] = { "/OpenIDA/Editor/Panels/ellipsis_header", CVT_INTEGER, false, { .integer = 54 }, NULL },
- [MPT_ELLIPSIS_TAB] = { "/OpenIDA/Editor/Panels/ellipsis_tab", CVT_INTEGER, false, { .integer = 35 }, NULL },
-
- [MPT_AUTO_SAVE] = { "/OpenIDA/Project/Autosave", CVT_BOOLEAN, false, { .boolean = true }, NULL },
-
-};
-
#define set_main_configuration(cfg) _get_main_configuration(cfg)
#define get_main_configuration() _get_main_configuration(NULL)
diff --git a/src/project.c b/src/project.c
index 37fc3e5..b6526c7 100644
--- a/src/project.c
+++ b/src/project.c
@@ -34,7 +34,6 @@
#include "analysis/binaries/file.h"
#include "gtkext/easygtk.h"
#include "gtkext/gtkblockview.h"
-#include "gtkext/gtkdockpanel.h"
#include "gtkext/gtkgraphview.h"
#include "gtkext/gtksourceview.h"
#include "gui/panels/panel.h"