git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62328
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// Purpose: wxInfoBar implementation for GTK
// Author: Vadim Zeitlin
// Created: 2009-09-27
// Purpose: wxInfoBar implementation for GTK
// Author: Vadim Zeitlin
// Created: 2009-09-27
-// RCS-ID: $Id: wxhead.cpp,v 1.10 2009-06-29 10:23:04 zeitlin Exp $
// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#endif // WX_PRECOMP
#include "wx/vector.h"
#endif // WX_PRECOMP
#include "wx/vector.h"
+#include "wx/stockitem.h"
#include "wx/gtk/private.h"
#include "wx/gtk/private/messagetype.h"
#include "wx/gtk/private.h"
#include "wx/gtk/private/messagetype.h"
GTKConnectWidget("response", G_CALLBACK(wxgtk_infobar_response));
GTKConnectWidget("close", G_CALLBACK(wxgtk_infobar_close));
GTKConnectWidget("response", G_CALLBACK(wxgtk_infobar_response));
GTKConnectWidget("close", G_CALLBACK(wxgtk_infobar_close));
}
wxInfoBar::~wxInfoBar()
}
wxInfoBar::~wxInfoBar()
i != buttons.rend();
++i )
{
i != buttons.rend();
++i )
{
- gtk_widget_destroy(i->button);
- buttons.erase(i.base());
+ if (i->id == btnid)
+ {
+ gtk_widget_destroy(i->button);
+ buttons.erase(i.base());
- // see comment in GTKAddButton()
- InvalidateBestSize();
+ // see comment in GTKAddButton()
+ InvalidateBestSize();
}
wxFAIL_MSG( wxString::Format("button with id %d not found", btnid) );
}
wxFAIL_MSG( wxString::Format("button with id %d not found", btnid) );