From b04683b19e5cca2747f9ad565b42c5f1545838bc Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 1 Sep 2004 23:22:47 +0000 Subject: [PATCH] If wxGetStockGtkID returns NULL (such as with wx.ID_INDENT on GTK 2.2) then fall back to normal label setting git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29001 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/button.cpp | 4 +--- src/gtk1/button.cpp | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/gtk/button.cpp b/src/gtk/button.cpp index d411a22eda..435358d25f 100644 --- a/src/gtk/button.cpp +++ b/src/gtk/button.cpp @@ -209,10 +209,8 @@ void wxButton::SetLabel( const wxString &lbl ) wxString label(lbl); -#ifndef __WXGTK20__ if (label.empty() && wxIsStockID(m_windowId)) label = wxGetStockLabel(m_windowId); -#endif wxControl::SetLabel(label); @@ -224,8 +222,8 @@ void wxButton::SetLabel( const wxString &lbl ) { gtk_button_set_label(GTK_BUTTON(m_widget), stock); gtk_button_set_use_stock(GTK_BUTTON(m_widget), TRUE); + return; } - return; } wxString label2 = PrepareLabelMnemonics(label); diff --git a/src/gtk1/button.cpp b/src/gtk1/button.cpp index d411a22eda..435358d25f 100644 --- a/src/gtk1/button.cpp +++ b/src/gtk1/button.cpp @@ -209,10 +209,8 @@ void wxButton::SetLabel( const wxString &lbl ) wxString label(lbl); -#ifndef __WXGTK20__ if (label.empty() && wxIsStockID(m_windowId)) label = wxGetStockLabel(m_windowId); -#endif wxControl::SetLabel(label); @@ -224,8 +222,8 @@ void wxButton::SetLabel( const wxString &lbl ) { gtk_button_set_label(GTK_BUTTON(m_widget), stock); gtk_button_set_use_stock(GTK_BUTTON(m_widget), TRUE); + return; } - return; } wxString label2 = PrepareLabelMnemonics(label); -- 2.45.2