From e18c2016e7c0784b8ed27432c6dabbdb89f7c3ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Fri, 10 Jan 2014 22:30:33 +0000 Subject: [PATCH] [GB.GTK] * BUG: Menu.Children.Clear() works again. [GB.GTK.OPENGL] * BUG: GlArea can take the focus now. git-svn-id: svn://localhost/gambas/trunk@6077 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- gb.gtk/src/gglarea.cpp | 1 + gb.gtk/src/gmenu.cpp | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gb.gtk/src/gglarea.cpp b/gb.gtk/src/gglarea.cpp index 07e5f587d..3fd799e8a 100644 --- a/gb.gtk/src/gglarea.cpp +++ b/gb.gtk/src/gglarea.cpp @@ -31,6 +31,7 @@ gGLArea::gGLArea(gContainer *parent, void (*init)(GtkWidget *)) : gControl(paren g_typ = Type_gGLArea; border = widget = gtk_event_box_new(); + gtk_widget_set_can_focus(widget, TRUE); (*init)(widget); realize(false); } diff --git a/gb.gtk/src/gmenu.cpp b/gb.gtk/src/gmenu.cpp index 17caf6eae..ccdc64d80 100644 --- a/gb.gtk/src/gmenu.cpp +++ b/gb.gtk/src/gmenu.cpp @@ -615,7 +615,8 @@ int gMenu::childCount() while (item) { mn=(gMenu*)item->data; - if (mn->pr == (void*)this) ct++; + if (mn->pr == (void*)this && !mn->_delete_later) + ct++; item=g_list_next(item); } @@ -634,7 +635,7 @@ gMenu* gMenu::childMenu(int pos) while (item) { mn=(gMenu*)item->data; - if (mn->pr == (void*)this) + if (mn->pr == (void*)this && !mn->_delete_later) { if (ct==pos) return mn; ct++;