Mini-fix for wxStaticBitmap

switched on reports after changing text ctrl be hand again


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1999-07-21 16:35:18 +00:00
parent 6a570331df
commit f92722960b
4 changed files with 4 additions and 88 deletions

View File

@@ -70,9 +70,9 @@ bool wxStaticBitmap::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bi
else else
{ {
m_widget = gtk_label_new( "Bitmap" ); m_widget = gtk_label_new( "Bitmap" );
}
PostCreation(); PostCreation();
}
m_parent->DoAddChild( this ); m_parent->DoAddChild( this );

View File

@@ -298,9 +298,6 @@ void wxTextCtrl::SetValue( const wxString &value )
{ {
wxCHECK_RET( m_text != NULL, _T("invalid text ctrl") ); wxCHECK_RET( m_text != NULL, _T("invalid text ctrl") );
gtk_signal_disconnect_by_func( GTK_OBJECT(m_text),
GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this);
wxString tmp = _T(""); wxString tmp = _T("");
if (!value.IsNull()) tmp = value; if (!value.IsNull()) tmp = value;
if (m_windowStyle & wxTE_MULTILINE) if (m_windowStyle & wxTE_MULTILINE)
@@ -319,9 +316,6 @@ void wxTextCtrl::SetValue( const wxString &value )
{ {
gtk_entry_set_text( GTK_ENTRY(m_text), tmp.mbc_str() ); gtk_entry_set_text( GTK_ENTRY(m_text), tmp.mbc_str() );
} }
gtk_signal_connect( GTK_OBJECT(m_text), "changed",
GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this);
} }
void wxTextCtrl::WriteText( const wxString &text ) void wxTextCtrl::WriteText( const wxString &text )
@@ -330,9 +324,6 @@ void wxTextCtrl::WriteText( const wxString &text )
if (text.IsEmpty()) return; if (text.IsEmpty()) return;
gtk_signal_disconnect_by_func( GTK_OBJECT(m_text),
GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this);
if (m_windowStyle & wxTE_MULTILINE) if (m_windowStyle & wxTE_MULTILINE)
{ {
/* this moves the cursor pos to behind the inserted text */ /* this moves the cursor pos to behind the inserted text */
@@ -365,9 +356,6 @@ void wxTextCtrl::WriteText( const wxString &text )
/* bring entry's cursor uptodate. bug in GTK. */ /* bring entry's cursor uptodate. bug in GTK. */
gtk_entry_set_position( GTK_ENTRY(m_text), GTK_EDITABLE(m_text)->current_pos ); gtk_entry_set_position( GTK_ENTRY(m_text), GTK_EDITABLE(m_text)->current_pos );
} }
gtk_signal_connect( GTK_OBJECT(m_text), "changed",
GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this);
} }
void wxTextCtrl::AppendText( const wxString &text ) void wxTextCtrl::AppendText( const wxString &text )
@@ -376,9 +364,6 @@ void wxTextCtrl::AppendText( const wxString &text )
if (text.IsEmpty()) return; if (text.IsEmpty()) return;
gtk_signal_disconnect_by_func( GTK_OBJECT(m_text),
GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this);
if (m_windowStyle & wxTE_MULTILINE) if (m_windowStyle & wxTE_MULTILINE)
{ {
bool hasSpecialAttributes = m_font.Ok() || bool hasSpecialAttributes = m_font.Ok() ||
@@ -412,9 +397,6 @@ void wxTextCtrl::AppendText( const wxString &text )
{ {
gtk_entry_append_text( GTK_ENTRY(m_text), text.mbc_str() ); gtk_entry_append_text( GTK_ENTRY(m_text), text.mbc_str() );
} }
gtk_signal_connect( GTK_OBJECT(m_text), "changed",
GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this);
} }
wxString wxTextCtrl::GetLineText( long lineNo ) const wxString wxTextCtrl::GetLineText( long lineNo ) const
@@ -645,22 +627,13 @@ void wxTextCtrl::Remove( long from, long to )
{ {
wxCHECK_RET( m_text != NULL, _T("invalid text ctrl") ); wxCHECK_RET( m_text != NULL, _T("invalid text ctrl") );
gtk_signal_disconnect_by_func( GTK_OBJECT(m_text),
GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this);
gtk_editable_delete_text( GTK_EDITABLE(m_text), (gint)from, (gint)to ); gtk_editable_delete_text( GTK_EDITABLE(m_text), (gint)from, (gint)to );
gtk_signal_connect( GTK_OBJECT(m_text), "changed",
GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this);
} }
void wxTextCtrl::Replace( long from, long to, const wxString &value ) void wxTextCtrl::Replace( long from, long to, const wxString &value )
{ {
wxCHECK_RET( m_text != NULL, _T("invalid text ctrl") ); wxCHECK_RET( m_text != NULL, _T("invalid text ctrl") );
gtk_signal_disconnect_by_func( GTK_OBJECT(m_text),
GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this);
gtk_editable_delete_text( GTK_EDITABLE(m_text), (gint)from, (gint)to ); gtk_editable_delete_text( GTK_EDITABLE(m_text), (gint)from, (gint)to );
if (!value.IsEmpty()) if (!value.IsEmpty())
@@ -673,26 +646,17 @@ void wxTextCtrl::Replace( long from, long to, const wxString &value )
gtk_editable_insert_text( GTK_EDITABLE(m_text), value, value.Length(), &pos ); gtk_editable_insert_text( GTK_EDITABLE(m_text), value, value.Length(), &pos );
#endif #endif
} }
gtk_signal_connect( GTK_OBJECT(m_text), "changed",
GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this);
} }
void wxTextCtrl::Cut() void wxTextCtrl::Cut()
{ {
wxCHECK_RET( m_text != NULL, _T("invalid text ctrl") ); wxCHECK_RET( m_text != NULL, _T("invalid text ctrl") );
gtk_signal_disconnect_by_func( GTK_OBJECT(m_text),
GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this);
#if (GTK_MINOR_VERSION > 0) #if (GTK_MINOR_VERSION > 0)
gtk_editable_cut_clipboard( GTK_EDITABLE(m_text) ); gtk_editable_cut_clipboard( GTK_EDITABLE(m_text) );
#else #else
gtk_editable_cut_clipboard( GTK_EDITABLE(m_text), 0 ); gtk_editable_cut_clipboard( GTK_EDITABLE(m_text), 0 );
#endif #endif
gtk_signal_connect( GTK_OBJECT(m_text), "changed",
GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this);
} }
void wxTextCtrl::Copy() void wxTextCtrl::Copy()
@@ -710,17 +674,11 @@ void wxTextCtrl::Paste()
{ {
wxCHECK_RET( m_text != NULL, _T("invalid text ctrl") ); wxCHECK_RET( m_text != NULL, _T("invalid text ctrl") );
gtk_signal_disconnect_by_func( GTK_OBJECT(m_text),
GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this);
#if (GTK_MINOR_VERSION > 0) #if (GTK_MINOR_VERSION > 0)
gtk_editable_paste_clipboard( GTK_EDITABLE(m_text) ); gtk_editable_paste_clipboard( GTK_EDITABLE(m_text) );
#else #else
gtk_editable_paste_clipboard( GTK_EDITABLE(m_text), 0 ); gtk_editable_paste_clipboard( GTK_EDITABLE(m_text), 0 );
#endif #endif
gtk_signal_connect( GTK_OBJECT(m_text), "changed",
GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this);
} }
bool wxTextCtrl::CanCopy() const bool wxTextCtrl::CanCopy() const

View File

@@ -70,9 +70,9 @@ bool wxStaticBitmap::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bi
else else
{ {
m_widget = gtk_label_new( "Bitmap" ); m_widget = gtk_label_new( "Bitmap" );
}
PostCreation(); PostCreation();
}
m_parent->DoAddChild( this ); m_parent->DoAddChild( this );

View File

@@ -298,9 +298,6 @@ void wxTextCtrl::SetValue( const wxString &value )
{ {
wxCHECK_RET( m_text != NULL, _T("invalid text ctrl") ); wxCHECK_RET( m_text != NULL, _T("invalid text ctrl") );
gtk_signal_disconnect_by_func( GTK_OBJECT(m_text),
GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this);
wxString tmp = _T(""); wxString tmp = _T("");
if (!value.IsNull()) tmp = value; if (!value.IsNull()) tmp = value;
if (m_windowStyle & wxTE_MULTILINE) if (m_windowStyle & wxTE_MULTILINE)
@@ -319,9 +316,6 @@ void wxTextCtrl::SetValue( const wxString &value )
{ {
gtk_entry_set_text( GTK_ENTRY(m_text), tmp.mbc_str() ); gtk_entry_set_text( GTK_ENTRY(m_text), tmp.mbc_str() );
} }
gtk_signal_connect( GTK_OBJECT(m_text), "changed",
GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this);
} }
void wxTextCtrl::WriteText( const wxString &text ) void wxTextCtrl::WriteText( const wxString &text )
@@ -330,9 +324,6 @@ void wxTextCtrl::WriteText( const wxString &text )
if (text.IsEmpty()) return; if (text.IsEmpty()) return;
gtk_signal_disconnect_by_func( GTK_OBJECT(m_text),
GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this);
if (m_windowStyle & wxTE_MULTILINE) if (m_windowStyle & wxTE_MULTILINE)
{ {
/* this moves the cursor pos to behind the inserted text */ /* this moves the cursor pos to behind the inserted text */
@@ -365,9 +356,6 @@ void wxTextCtrl::WriteText( const wxString &text )
/* bring entry's cursor uptodate. bug in GTK. */ /* bring entry's cursor uptodate. bug in GTK. */
gtk_entry_set_position( GTK_ENTRY(m_text), GTK_EDITABLE(m_text)->current_pos ); gtk_entry_set_position( GTK_ENTRY(m_text), GTK_EDITABLE(m_text)->current_pos );
} }
gtk_signal_connect( GTK_OBJECT(m_text), "changed",
GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this);
} }
void wxTextCtrl::AppendText( const wxString &text ) void wxTextCtrl::AppendText( const wxString &text )
@@ -376,9 +364,6 @@ void wxTextCtrl::AppendText( const wxString &text )
if (text.IsEmpty()) return; if (text.IsEmpty()) return;
gtk_signal_disconnect_by_func( GTK_OBJECT(m_text),
GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this);
if (m_windowStyle & wxTE_MULTILINE) if (m_windowStyle & wxTE_MULTILINE)
{ {
bool hasSpecialAttributes = m_font.Ok() || bool hasSpecialAttributes = m_font.Ok() ||
@@ -412,9 +397,6 @@ void wxTextCtrl::AppendText( const wxString &text )
{ {
gtk_entry_append_text( GTK_ENTRY(m_text), text.mbc_str() ); gtk_entry_append_text( GTK_ENTRY(m_text), text.mbc_str() );
} }
gtk_signal_connect( GTK_OBJECT(m_text), "changed",
GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this);
} }
wxString wxTextCtrl::GetLineText( long lineNo ) const wxString wxTextCtrl::GetLineText( long lineNo ) const
@@ -645,22 +627,13 @@ void wxTextCtrl::Remove( long from, long to )
{ {
wxCHECK_RET( m_text != NULL, _T("invalid text ctrl") ); wxCHECK_RET( m_text != NULL, _T("invalid text ctrl") );
gtk_signal_disconnect_by_func( GTK_OBJECT(m_text),
GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this);
gtk_editable_delete_text( GTK_EDITABLE(m_text), (gint)from, (gint)to ); gtk_editable_delete_text( GTK_EDITABLE(m_text), (gint)from, (gint)to );
gtk_signal_connect( GTK_OBJECT(m_text), "changed",
GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this);
} }
void wxTextCtrl::Replace( long from, long to, const wxString &value ) void wxTextCtrl::Replace( long from, long to, const wxString &value )
{ {
wxCHECK_RET( m_text != NULL, _T("invalid text ctrl") ); wxCHECK_RET( m_text != NULL, _T("invalid text ctrl") );
gtk_signal_disconnect_by_func( GTK_OBJECT(m_text),
GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this);
gtk_editable_delete_text( GTK_EDITABLE(m_text), (gint)from, (gint)to ); gtk_editable_delete_text( GTK_EDITABLE(m_text), (gint)from, (gint)to );
if (!value.IsEmpty()) if (!value.IsEmpty())
@@ -673,26 +646,17 @@ void wxTextCtrl::Replace( long from, long to, const wxString &value )
gtk_editable_insert_text( GTK_EDITABLE(m_text), value, value.Length(), &pos ); gtk_editable_insert_text( GTK_EDITABLE(m_text), value, value.Length(), &pos );
#endif #endif
} }
gtk_signal_connect( GTK_OBJECT(m_text), "changed",
GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this);
} }
void wxTextCtrl::Cut() void wxTextCtrl::Cut()
{ {
wxCHECK_RET( m_text != NULL, _T("invalid text ctrl") ); wxCHECK_RET( m_text != NULL, _T("invalid text ctrl") );
gtk_signal_disconnect_by_func( GTK_OBJECT(m_text),
GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this);
#if (GTK_MINOR_VERSION > 0) #if (GTK_MINOR_VERSION > 0)
gtk_editable_cut_clipboard( GTK_EDITABLE(m_text) ); gtk_editable_cut_clipboard( GTK_EDITABLE(m_text) );
#else #else
gtk_editable_cut_clipboard( GTK_EDITABLE(m_text), 0 ); gtk_editable_cut_clipboard( GTK_EDITABLE(m_text), 0 );
#endif #endif
gtk_signal_connect( GTK_OBJECT(m_text), "changed",
GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this);
} }
void wxTextCtrl::Copy() void wxTextCtrl::Copy()
@@ -710,17 +674,11 @@ void wxTextCtrl::Paste()
{ {
wxCHECK_RET( m_text != NULL, _T("invalid text ctrl") ); wxCHECK_RET( m_text != NULL, _T("invalid text ctrl") );
gtk_signal_disconnect_by_func( GTK_OBJECT(m_text),
GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this);
#if (GTK_MINOR_VERSION > 0) #if (GTK_MINOR_VERSION > 0)
gtk_editable_paste_clipboard( GTK_EDITABLE(m_text) ); gtk_editable_paste_clipboard( GTK_EDITABLE(m_text) );
#else #else
gtk_editable_paste_clipboard( GTK_EDITABLE(m_text), 0 ); gtk_editable_paste_clipboard( GTK_EDITABLE(m_text), 0 );
#endif #endif
gtk_signal_connect( GTK_OBJECT(m_text), "changed",
GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this);
} }
bool wxTextCtrl::CanCopy() const bool wxTextCtrl::CanCopy() const