Don't use stock items in wxInfoBar
Stock items are deprecated since GTK+ 3.10 so corresponding labels should be used instead of them.
This commit is contained in:
@@ -34,6 +34,7 @@
|
|||||||
|
|
||||||
#include "wx/gtk/private.h"
|
#include "wx/gtk/private.h"
|
||||||
#include "wx/gtk/private/messagetype.h"
|
#include "wx/gtk/private/messagetype.h"
|
||||||
|
#include "wx/gtk/private/mnemonics.h"
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// local classes
|
// local classes
|
||||||
@@ -138,6 +139,7 @@ bool wxInfoBar::Create(wxWindow *parent, wxWindowID winid)
|
|||||||
// finish creation and connect to all the signals we're interested in
|
// finish creation and connect to all the signals we're interested in
|
||||||
m_parent->DoAddChild(this);
|
m_parent->DoAddChild(this);
|
||||||
|
|
||||||
|
|
||||||
PostCreation(wxDefaultSize);
|
PostCreation(wxDefaultSize);
|
||||||
|
|
||||||
GTKConnectWidget("response", G_CALLBACK(wxgtk_infobar_response));
|
GTKConnectWidget("response", G_CALLBACK(wxgtk_infobar_response));
|
||||||
@@ -208,9 +210,13 @@ GtkWidget *wxInfoBar::GTKAddButton(wxWindowID btnid, const wxString& label)
|
|||||||
GtkWidget *button = gtk_info_bar_add_button
|
GtkWidget *button = gtk_info_bar_add_button
|
||||||
(
|
(
|
||||||
GTK_INFO_BAR(m_widget),
|
GTK_INFO_BAR(m_widget),
|
||||||
(label.empty()
|
label.empty() ?
|
||||||
? GTKConvertMnemonics(wxGetStockGtkID(btnid))
|
#if defined(__WXGTK3__) && GTK_CHECK_VERSION(3,10,0)
|
||||||
: label).utf8_str(),
|
wxGTK_CONV(wxConvertMnemonicsToGTK(wxGetStockLabel(btnid)))
|
||||||
|
#else
|
||||||
|
wxGTK_CONV(wxGetStockGtkID(btnid)
|
||||||
|
#endif // GTK >= 3.10 / < 3.10
|
||||||
|
: wxGTK_CONV(label),
|
||||||
btnid
|
btnid
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user