summaryrefslogtreecommitdiff
path: root/src/gui/menus
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/menus')
-rw-r--r--src/gui/menus/debug.c7
-rw-r--r--src/gui/menus/file.c18
-rw-r--r--src/gui/menus/file.h2
-rw-r--r--src/gui/menus/view.c2
4 files changed, 21 insertions, 8 deletions
diff --git a/src/gui/menus/debug.c b/src/gui/menus/debug.c
index 0d9b41d..963c095 100644
--- a/src/gui/menus/debug.c
+++ b/src/gui/menus/debug.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* debug.c - gestion du menu 'Débogage'
*
- * Copyright (C) 2011 Cyrille Bagard
+ * Copyright (C) 2011-2012 Cyrille Bagard
*
* This file is part of OpenIDA.
*
@@ -30,8 +30,7 @@
#include <i18n.h>
-
-#include "../../project.h"
+#include "../../debug/debugger.h" /* REMME ! */
#include "../../gtkext/easygtk.h"
#include "../../gui/panels/log.h"
@@ -98,7 +97,7 @@ static void mcb_debug_start_stop(GtkMenuItem *menuitem, GObject *ref)
GBinaryDebugger *debugger; /* Module prêt à emploi */
binary = (GOpenidaBinary *)g_object_get_data(ref, "current_binary");
- debugger = get_main_debugger_for_binary(get_current_openida_project(), binary);
+ debugger = NULL;//get_main_debugger_for_binary(get_current_openida_project(), binary);
if (debugger == NULL)
{
diff --git a/src/gui/menus/file.c b/src/gui/menus/file.c
index 880fb8a..fade47d 100644
--- a/src/gui/menus/file.c
+++ b/src/gui/menus/file.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* file.c - gestion du menu 'Fichier'
*
- * Copyright (C) 2011 Cyrille Bagard
+ * Copyright (C) 2011-2012 Cyrille Bagard
*
* This file is part of OpenIDA.
*
@@ -28,6 +28,7 @@
#include <i18n.h>
+#include "../../project.h"
#include "../../gtkext/easygtk.h"
@@ -54,7 +55,8 @@ GtkWidget *build_menu_file(GObject *ref, GtkAccelGroup *accgroup)
{
GtkWidget *result; /* Support à retourner */
GtkWidget *menubar; /* Support pour éléments */
- GtkWidget *submenuitem; /* Sous-élément de menu */
+ GtkWidget *submenuitem; /* Sous-élément de menu #2 */
+ GtkWidget *deepmenuitem; /* Sous-élément de menu #1 */
result = gtk_menu_item_new_with_mnemonic(_("_File"));
gtk_widget_show(result);
@@ -62,6 +64,18 @@ GtkWidget *build_menu_file(GObject *ref, GtkAccelGroup *accgroup)
menubar = gtk_menu_new();
gtk_menu_item_set_submenu(GTK_MENU_ITEM(result), menubar);
+ submenuitem = qck_create_menu_item(NULL, NULL, _("Recent projects..."), NULL, NULL);
+ gtk_container_add(GTK_CONTAINER(menubar), submenuitem);
+
+ deepmenuitem = gtk_recent_chooser_menu_new_for_manager(get_projects_manager());
+ gtk_recent_chooser_set_sort_type(GTK_RECENT_CHOOSER(deepmenuitem), GTK_RECENT_SORT_MRU);
+ gtk_recent_chooser_set_show_tips(GTK_RECENT_CHOOSER(deepmenuitem), TRUE);
+ gtk_recent_chooser_set_show_icons(GTK_RECENT_CHOOSER(deepmenuitem), FALSE);
+ gtk_menu_item_set_submenu(GTK_MENU_ITEM(submenuitem), deepmenuitem);
+
+ submenuitem = qck_create_menu_separator();
+ gtk_container_add(GTK_CONTAINER(menubar), submenuitem);
+
submenuitem = qck_create_menu_item(NULL, NULL, _("Quit"), G_CALLBACK(mcb_file_quit), ref);
add_accelerator_to_menu_item(submenuitem, "<Ctrl>Q", accgroup);
gtk_container_add(GTK_CONTAINER(menubar), submenuitem);
diff --git a/src/gui/menus/file.h b/src/gui/menus/file.h
index 13da6aa..c0802a7 100644
--- a/src/gui/menus/file.h
+++ b/src/gui/menus/file.h
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* file.h - prototypes pour la gestion du menu 'Fichier'
*
- * Copyright (C) 2011 Cyrille Bagard
+ * Copyright (C) 2011-2012 Cyrille Bagard
*
* This file is part of OpenIDA.
*
diff --git a/src/gui/menus/view.c b/src/gui/menus/view.c
index 273b41b..19f7e9b 100644
--- a/src/gui/menus/view.c
+++ b/src/gui/menus/view.c
@@ -198,7 +198,7 @@ static void mcb_view_change_support(GtkRadioMenuItem *menuitem, GMenuBar *bar)
station = gtk_widget_get_parent(station); /* DockStation */
binary = g_editor_item_get_current_binary(G_EDITOR_ITEM(bar));
- scroll = get_view_for_openida_project_binary(get_current_openida_project(),
+ scroll = g_study_project_get_view_for_binary(get_current_project(),
binary, view, &vpanel);
gtk_dock_panel_change_active_widget(GTK_DOCK_STATION(station), scroll);