re-enabled and fixed wxTextCtrl::Cut,Copy,Paste with GTK+ 2

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28239 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík 2004-07-14 20:25:56 +00:00
parent 231475bfb4
commit bbde2e2999
2 changed files with 30 additions and 12 deletions

View File

@ -1157,27 +1157,36 @@ void wxTextCtrl::Cut()
{
wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") );
#ifndef __WXGTK20__
gtk_editable_cut_clipboard( GTK_EDITABLE(m_text) DUMMY_CLIPBOARD_ARG );
#ifdef __WXGTK20__
if (m_windowStyle & wxTE_MULTILINE)
g_signal_emit_by_name(m_text, "cut-clipboard");
else
#endif
gtk_editable_cut_clipboard(GTK_EDITABLE(m_text) DUMMY_CLIPBOARD_ARG);
}
void wxTextCtrl::Copy()
{
wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") );
#ifndef __WXGTK20__
gtk_editable_copy_clipboard( GTK_EDITABLE(m_text) DUMMY_CLIPBOARD_ARG );
#ifdef __WXGTK20__
if (m_windowStyle & wxTE_MULTILINE)
g_signal_emit_by_name(m_text, "copy-clipboard");
else
#endif
gtk_editable_copy_clipboard(GTK_EDITABLE(m_text) DUMMY_CLIPBOARD_ARG);
}
void wxTextCtrl::Paste()
{
wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") );
#ifndef __WXGTK20__
gtk_editable_paste_clipboard( GTK_EDITABLE(m_text) DUMMY_CLIPBOARD_ARG );
#ifdef __WXGTK20__
if (m_windowStyle & wxTE_MULTILINE)
g_signal_emit_by_name(m_text, "paste-clipboard");
else
#endif
gtk_editable_paste_clipboard(GTK_EDITABLE(m_text) DUMMY_CLIPBOARD_ARG);
}
// Undo/redo

View File

@ -1157,27 +1157,36 @@ void wxTextCtrl::Cut()
{
wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") );
#ifndef __WXGTK20__
gtk_editable_cut_clipboard( GTK_EDITABLE(m_text) DUMMY_CLIPBOARD_ARG );
#ifdef __WXGTK20__
if (m_windowStyle & wxTE_MULTILINE)
g_signal_emit_by_name(m_text, "cut-clipboard");
else
#endif
gtk_editable_cut_clipboard(GTK_EDITABLE(m_text) DUMMY_CLIPBOARD_ARG);
}
void wxTextCtrl::Copy()
{
wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") );
#ifndef __WXGTK20__
gtk_editable_copy_clipboard( GTK_EDITABLE(m_text) DUMMY_CLIPBOARD_ARG );
#ifdef __WXGTK20__
if (m_windowStyle & wxTE_MULTILINE)
g_signal_emit_by_name(m_text, "copy-clipboard");
else
#endif
gtk_editable_copy_clipboard(GTK_EDITABLE(m_text) DUMMY_CLIPBOARD_ARG);
}
void wxTextCtrl::Paste()
{
wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") );
#ifndef __WXGTK20__
gtk_editable_paste_clipboard( GTK_EDITABLE(m_text) DUMMY_CLIPBOARD_ARG );
#ifdef __WXGTK20__
if (m_windowStyle & wxTE_MULTILINE)
g_signal_emit_by_name(m_text, "paste-clipboard");
else
#endif
gtk_editable_paste_clipboard(GTK_EDITABLE(m_text) DUMMY_CLIPBOARD_ARG);
}
// Undo/redo