diff options
| author | Cyrille Bagard <nocbos@gmail.com> | 2015-05-11 00:58:05 (GMT) | 
|---|---|---|
| committer | Cyrille Bagard <nocbos@gmail.com> | 2015-05-11 00:58:05 (GMT) | 
| commit | 46bcc7f122245f22772fd3e38d16e6afa7bd5881 (patch) | |
| tree | d3c2ba1a9999e373428954f24d0e60c1ea63b756 /src/gui/menus | |
| parent | 1bda6c517d30d873ff0d92a96380946ef944c9ae (diff) | |
Provided a way to look for ROP gadgets in binary code.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@533 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/gui/menus')
| -rw-r--r-- | src/gui/menus/Makefile.am | 1 | ||||
| -rw-r--r-- | src/gui/menus/menubar.c | 7 | ||||
| -rw-r--r-- | src/gui/menus/plugins.c | 65 | ||||
| -rw-r--r-- | src/gui/menus/plugins.h | 38 | 
4 files changed, 111 insertions, 0 deletions
| diff --git a/src/gui/menus/Makefile.am b/src/gui/menus/Makefile.am index fcebcf2..d932141 100644 --- a/src/gui/menus/Makefile.am +++ b/src/gui/menus/Makefile.am @@ -8,6 +8,7 @@ libguimenus_la_SOURCES =				\  	file.h file.c						\  	help.h help.c						\  	menubar.h menubar.c					\ +	plugins.h plugins.c					\  	project.h project.c					\  	view.h view.c diff --git a/src/gui/menus/menubar.c b/src/gui/menus/menubar.c index cc69e0d..1fc1b6f 100644 --- a/src/gui/menus/menubar.c +++ b/src/gui/menus/menubar.c @@ -30,6 +30,7 @@  #include "edition.h"  #include "file.h"  #include "help.h" +#include "plugins.h"  #include "project.h"  #include "view.h"  #include "../editem-int.h" @@ -47,6 +48,7 @@ struct _GMenuBar      GtkWidget *project;                     /* Menu "Projet"               */      GtkWidget *binary;                      /* Menu "Binaire"              */      GtkWidget *debug;                       /* Menu "Débogage"             */ +    GtkWidget *plugins;                     /* Menu "Greffons"             */      GtkWidget *help;                        /* Menu "Aide"                 */  }; @@ -239,6 +241,11 @@ GEditorItem *g_menu_bar_new(GObject *ref, GtkAccelGroup *accgroup)      result->debug = build_menu_debug(ref, accgroup);      gtk_container_add(GTK_CONTAINER(item->widget), result->debug); +    /* Greffons */ + +    result->plugins = build_menu_plugins(ref, accgroup); +    gtk_container_add(GTK_CONTAINER(item->widget), result->plugins); +      /* Aide */      result->help = build_menu_help(ref, accgroup); diff --git a/src/gui/menus/plugins.c b/src/gui/menus/plugins.c new file mode 100644 index 0000000..6967665 --- /dev/null +++ b/src/gui/menus/plugins.c @@ -0,0 +1,65 @@ + +/* Chrysalide - Outil d'analyse de fichiers binaires + * plugins.c - gestion du menu 'Greffons' + * + * Copyright (C) 2015 Cyrille Bagard + * + *  This file is part of Chrysalide. + * + *  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 this program; if not, write to the Free Software + *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA + */ + + +#include "plugins.h" + + +#include <string.h> + + +#include <i18n.h> + + +#include "../../gtkext/easygtk.h" + + + +/****************************************************************************** +*                                                                             * +*  Paramètres  : ref      = espace de référencement global.                   * +*                accgroup = groupe d'accélérateurs pour les menus.            * +*                                                                             * +*  Description : Construit le menu "Aide".                                    * +*                                                                             * +*  Retour      : Panneau de menus mis en place.                               * +*                                                                             * +*  Remarques   : -                                                            * +*                                                                             * +******************************************************************************/ + +GtkWidget *build_menu_plugins(GObject *ref, GtkAccelGroup *accgroup) +{ +    GtkWidget *result;                      /* Support à retourner         */ +    GtkWidget *menubar;                     /* Support pour éléments       */ + +    result = gtk_menu_item_new_with_mnemonic(_("_Plugins")); +    gtk_widget_show(result); + +    menubar = gtk_menu_new(); +    g_object_set_data(ref, "menubar_plugins", G_OBJECT(menubar)); +    gtk_menu_item_set_submenu(GTK_MENU_ITEM(result), menubar); + +    return result; + +} diff --git a/src/gui/menus/plugins.h b/src/gui/menus/plugins.h new file mode 100644 index 0000000..9d83f4d --- /dev/null +++ b/src/gui/menus/plugins.h @@ -0,0 +1,38 @@ + +/* Chrysalide - Outil d'analyse de fichiers binaires + * plugins.h - prototypes pour la gestion du menu 'Greffons' + * + * Copyright (C) 2015 Cyrille Bagard + * + *  This file is part of Chrysalide. + * + *  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 this program; if not, write to the Free Software + *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA + */ + + +#ifndef _GUI_MENUS_PLUGINS_H +#define _GUI_MENUS_PLUGINS_H + + +#include <gtk/gtk.h> + + + +/* Construit le menu "Aide". */ +GtkWidget *build_menu_plugins(GObject *, GtkAccelGroup *); + + + +#endif  /* _GUI_MENUS_PLUGINS_H */ | 
