projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed bug: wxPGProperty::SetName() crashed if it was called before property was added...
[wxWidgets.git]
/
src
/
gtk1
/
statbox.cpp
diff --git
a/src/gtk1/statbox.cpp
b/src/gtk1/statbox.cpp
index 879e2bc579d1ceaad9741358e4411e8e86f277ff..a2542e88e2b20362c15da953c20586179b9f42f4 100644
(file)
--- a/
src/gtk1/statbox.cpp
+++ b/
src/gtk1/statbox.cpp
@@
-7,17
+7,13
@@
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "statbox.h"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#if wxUSE_STATBOX
#include "wx/statbox.h"
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#if wxUSE_STATBOX
#include "wx/statbox.h"
-#include "wx/gtk/private.h"
+#include "wx/gtk
1
/private.h"
#include "gdk/gdk.h"
#include "gtk/gtk.h"
#include "gdk/gdk.h"
#include "gtk/gtk.h"
@@
-60,9
+56,8
@@
bool wxStaticBox::Create( wxWindow *parent,
return FALSE;
}
return FALSE;
}
- wxControl::SetLabel(label);
-
- m_widget = gtk_frame_new(m_label.empty() ? (char *)NULL : (const char*) wxGTK_CONV( m_label ) );
+ m_widget = gtk_frame_new(NULL);
+ SetLabel(label);
m_parent->DoAddChild( this );
m_parent->DoAddChild( this );
@@
-77,24
+72,22
@@
bool wxStaticBox::Create( wxWindow *parent,
else // wxALIGN_LEFT
xalign = 0.0;
else // wxALIGN_LEFT
xalign = 0.0;
- if (
xalign )
- gtk_frame_set_label_align(GTK_FRAME( m_widget ), xalign, 0.
0
);
+ if (
style & (wxALIGN_RIGHT | wxALIGN_CENTER) ) // left alignment is default
+ gtk_frame_set_label_align(GTK_FRAME( m_widget ), xalign, 0.
5
);
return TRUE;
}
return TRUE;
}
-void wxStaticBox::SetLabel( const wxString
&
label )
+void wxStaticBox::SetLabel( const wxString
&
label )
{
{
- wxC
ontrol::SetLabel( label
);
+ wxC
HECK_RET( m_widget != NULL, wxT("invalid staticbox")
);
- gtk_frame_set_label( GTK_FRAME( m_widget ),
- m_label.empty() ? (char *)NULL : (const char*) wxGTK_CONV( m_label ) );
+ GTKSetLabelForFrame(GTK_FRAME(m_widget), label);
}
}
-void wxStaticBox::
ApplyWidgetStyle(
)
+void wxStaticBox::
DoApplyWidgetStyle(GtkRcStyle *style
)
{
{
- SetWidgetStyle();
- gtk_widget_set_style( m_widget, m_widgetStyle );
+ gtk_widget_modify_style(m_widget, style);
}
// static
}
// static