projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixing screen coordinate transformation
[wxWidgets.git]
/
src
/
generic
/
fontpickerg.cpp
diff --git
a/src/generic/fontpickerg.cpp
b/src/generic/fontpickerg.cpp
index 06a5c5c539fd8a0a3d9c290edd63756ffe770924..56963130797c12d8ab1da306e74a726cb3d5bc9f 100644
(file)
--- a/
src/generic/fontpickerg.cpp
+++ b/
src/generic/fontpickerg.cpp
@@
-35,7
+35,6
@@
// implementation
// ============================================================================
// implementation
// ============================================================================
-wxFontData wxGenericFontButton::ms_data;
IMPLEMENT_DYNAMIC_CLASS(wxGenericFontButton, wxButton)
// ----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxGenericFontButton, wxButton)
// ----------------------------------------------------------------------------
@@
-60,11
+59,11
@@
bool wxGenericFontButton::Create( wxWindow *parent, wxWindowID id,
}
// and handle user clicks on it
}
// and handle user clicks on it
- Connect(wxEVT_COMMAND_BUTTON_CLICKED,
+ Connect(
GetId(),
wxEVT_COMMAND_BUTTON_CLICKED,
wxCommandEventHandler(wxGenericFontButton::OnButtonClick),
NULL, this);
wxCommandEventHandler(wxGenericFontButton::OnButtonClick),
NULL, this);
- m_selectedFont = initial;
+ m_selectedFont = initial
.IsOk() ? initial : *wxNORMAL_FONT
;
UpdateFont();
InitFontData();
UpdateFont();
InitFontData();
@@
-73,22
+72,22
@@
bool wxGenericFontButton::Create( wxWindow *parent, wxWindowID id,
void wxGenericFontButton::InitFontData()
{
void wxGenericFontButton::InitFontData()
{
- m
s
_data.SetAllowSymbols(true);
- m
s
_data.SetColour(*wxBLACK);
- m
s
_data.EnableEffects(true);
+ m_data.SetAllowSymbols(true);
+ m_data.SetColour(*wxBLACK);
+ m_data.EnableEffects(true);
}
void wxGenericFontButton::OnButtonClick(wxCommandEvent& WXUNUSED(ev))
{
// update the wxFontData to be shown in the the dialog
}
void wxGenericFontButton::OnButtonClick(wxCommandEvent& WXUNUSED(ev))
{
// update the wxFontData to be shown in the the dialog
- m
s
_data.SetInitialFont(m_selectedFont);
+ m_data.SetInitialFont(m_selectedFont);
// create the font dialog and display it
// create the font dialog and display it
- wxFontDialog dlg(this, m
s
_data);
+ wxFontDialog dlg(this, m_data);
if (dlg.ShowModal() == wxID_OK)
{
if (dlg.ShowModal() == wxID_OK)
{
- m
s
_data = dlg.GetFontData();
- SetSelectedFont(m
s
_data.GetChosenFont());
+ m_data = dlg.GetFontData();
+ SetSelectedFont(m_data.GetChosenFont());
// fire an event
wxFontPickerEvent event(this, GetId(), m_selectedFont);
// fire an event
wxFontPickerEvent event(this, GetId(), m_selectedFont);
@@
-101,7
+100,7
@@
void wxGenericFontButton::UpdateFont()
if ( !m_selectedFont.Ok() )
return;
if ( !m_selectedFont.Ok() )
return;
- SetForegroundColour(m
s
_data.GetColour());
+ SetForegroundColour(m_data.GetColour());
if (HasFlag(wxFNTP_USEFONT_FOR_LABEL))
{
if (HasFlag(wxFNTP_USEFONT_FOR_LABEL))
{