]> git.saurik.com Git - wxWidgets.git/commitdiff
If wxGetStockGtkID returns NULL (such as with wx.ID_INDENT on GTK 2.2)
authorRobin Dunn <robin@alldunn.com>
Wed, 1 Sep 2004 23:22:47 +0000 (23:22 +0000)
committerRobin Dunn <robin@alldunn.com>
Wed, 1 Sep 2004 23:22:47 +0000 (23:22 +0000)
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
src/gtk1/button.cpp

index d411a22edacf69a4e88708b2c7ccd5738cabe6f2..435358d25ffb4da2b54cc1402e327246d47c3726 100644 (file)
@@ -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);
index d411a22edacf69a4e88708b2c7ccd5738cabe6f2..435358d25ffb4da2b54cc1402e327246d47c3726 100644 (file)
@@ -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);