clipboards tests
WM hint corrections (guesses) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -91,10 +91,8 @@ targets_selection_received( GtkWidget *WXUNUSED(widget),
|
|||||||
|
|
||||||
for (unsigned int i=0; i<selection_data->length/sizeof(GdkAtom); i++)
|
for (unsigned int i=0; i<selection_data->length/sizeof(GdkAtom); i++)
|
||||||
{
|
{
|
||||||
/*
|
/* char *name = gdk_atom_name (atoms[i]);
|
||||||
char *name = gdk_atom_name (atoms[i]);
|
if (name) printf( "Format available: %s.\n", name ); */
|
||||||
if (name) printf( "Format available: %s.\n", name );
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (atoms[i] == clipboard->m_targetRequested)
|
if (atoms[i] == clipboard->m_targetRequested)
|
||||||
{
|
{
|
||||||
@@ -534,12 +532,12 @@ bool wxClipboard::IsSupported( wxDataFormat format )
|
|||||||
sets it to FALSE */
|
sets it to FALSE */
|
||||||
|
|
||||||
m_waiting = TRUE;
|
m_waiting = TRUE;
|
||||||
|
|
||||||
gtk_selection_convert( m_targetsWidget,
|
gtk_selection_convert( m_targetsWidget,
|
||||||
g_clipboardAtom,
|
g_clipboardAtom,
|
||||||
g_targetsAtom,
|
g_targetsAtom,
|
||||||
GDK_CURRENT_TIME );
|
GDK_CURRENT_TIME );
|
||||||
|
|
||||||
while (m_waiting) gtk_main_iteration();
|
while (m_waiting) gtk_main_iteration();
|
||||||
|
|
||||||
if (!m_formatSupported) return FALSE;
|
if (!m_formatSupported) return FALSE;
|
||||||
|
@@ -145,16 +145,18 @@ bool wxDialog::Create( wxWindow *parent,
|
|||||||
|
|
||||||
gtk_widget_realize( m_widget );
|
gtk_widget_realize( m_widget );
|
||||||
|
|
||||||
/* comments see wxFrame */
|
/* all this is for Motif Window Manager "hints" and is supposed to be
|
||||||
|
recognized by other WM as well. not tested. */
|
||||||
long decor = (long) GDK_DECOR_ALL;
|
long decor = (long) GDK_DECOR_ALL;
|
||||||
long func = (long) GDK_FUNC_ALL;
|
long func = (long) GDK_FUNC_ALL;
|
||||||
if ((m_windowStyle & wxCAPTION) == 0)
|
if ((m_windowStyle & wxCAPTION) == 0)
|
||||||
decor |= GDK_DECOR_TITLE;
|
decor |= GDK_DECOR_TITLE;
|
||||||
|
/*
|
||||||
if ((m_windowStyle & wxMINIMIZE) == 0)
|
if ((m_windowStyle & wxMINIMIZE) == 0)
|
||||||
func |= GDK_FUNC_MINIMIZE;
|
func |= GDK_FUNC_MINIMIZE;
|
||||||
if ((m_windowStyle & wxMAXIMIZE) == 0)
|
if ((m_windowStyle & wxMAXIMIZE) == 0)
|
||||||
func |= GDK_FUNC_MAXIMIZE;
|
func |= GDK_FUNC_MAXIMIZE;
|
||||||
|
*/
|
||||||
if ((m_windowStyle & wxSYSTEM_MENU) == 0)
|
if ((m_windowStyle & wxSYSTEM_MENU) == 0)
|
||||||
decor |= GDK_DECOR_MENU;
|
decor |= GDK_DECOR_MENU;
|
||||||
if ((m_windowStyle & wxMINIMIZE_BOX) == 0)
|
if ((m_windowStyle & wxMINIMIZE_BOX) == 0)
|
||||||
|
@@ -233,10 +233,12 @@ bool wxFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title,
|
|||||||
long func = (long) GDK_FUNC_ALL;
|
long func = (long) GDK_FUNC_ALL;
|
||||||
if ((m_windowStyle & wxCAPTION) == 0)
|
if ((m_windowStyle & wxCAPTION) == 0)
|
||||||
decor |= GDK_DECOR_TITLE;
|
decor |= GDK_DECOR_TITLE;
|
||||||
|
/*
|
||||||
if ((m_windowStyle & wxMINIMIZE) == 0)
|
if ((m_windowStyle & wxMINIMIZE) == 0)
|
||||||
func |= GDK_FUNC_MINIMIZE;
|
func |= GDK_FUNC_MINIMIZE;
|
||||||
if ((m_windowStyle & wxMAXIMIZE) == 0)
|
if ((m_windowStyle & wxMAXIMIZE) == 0)
|
||||||
func |= GDK_FUNC_MAXIMIZE;
|
func |= GDK_FUNC_MAXIMIZE;
|
||||||
|
*/
|
||||||
if ((m_windowStyle & wxSYSTEM_MENU) == 0)
|
if ((m_windowStyle & wxSYSTEM_MENU) == 0)
|
||||||
decor |= GDK_DECOR_MENU;
|
decor |= GDK_DECOR_MENU;
|
||||||
if ((m_windowStyle & wxMINIMIZE_BOX) == 0)
|
if ((m_windowStyle & wxMINIMIZE_BOX) == 0)
|
||||||
|
@@ -91,10 +91,8 @@ targets_selection_received( GtkWidget *WXUNUSED(widget),
|
|||||||
|
|
||||||
for (unsigned int i=0; i<selection_data->length/sizeof(GdkAtom); i++)
|
for (unsigned int i=0; i<selection_data->length/sizeof(GdkAtom); i++)
|
||||||
{
|
{
|
||||||
/*
|
/* char *name = gdk_atom_name (atoms[i]);
|
||||||
char *name = gdk_atom_name (atoms[i]);
|
if (name) printf( "Format available: %s.\n", name ); */
|
||||||
if (name) printf( "Format available: %s.\n", name );
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (atoms[i] == clipboard->m_targetRequested)
|
if (atoms[i] == clipboard->m_targetRequested)
|
||||||
{
|
{
|
||||||
@@ -534,12 +532,12 @@ bool wxClipboard::IsSupported( wxDataFormat format )
|
|||||||
sets it to FALSE */
|
sets it to FALSE */
|
||||||
|
|
||||||
m_waiting = TRUE;
|
m_waiting = TRUE;
|
||||||
|
|
||||||
gtk_selection_convert( m_targetsWidget,
|
gtk_selection_convert( m_targetsWidget,
|
||||||
g_clipboardAtom,
|
g_clipboardAtom,
|
||||||
g_targetsAtom,
|
g_targetsAtom,
|
||||||
GDK_CURRENT_TIME );
|
GDK_CURRENT_TIME );
|
||||||
|
|
||||||
while (m_waiting) gtk_main_iteration();
|
while (m_waiting) gtk_main_iteration();
|
||||||
|
|
||||||
if (!m_formatSupported) return FALSE;
|
if (!m_formatSupported) return FALSE;
|
||||||
|
@@ -145,16 +145,18 @@ bool wxDialog::Create( wxWindow *parent,
|
|||||||
|
|
||||||
gtk_widget_realize( m_widget );
|
gtk_widget_realize( m_widget );
|
||||||
|
|
||||||
/* comments see wxFrame */
|
/* all this is for Motif Window Manager "hints" and is supposed to be
|
||||||
|
recognized by other WM as well. not tested. */
|
||||||
long decor = (long) GDK_DECOR_ALL;
|
long decor = (long) GDK_DECOR_ALL;
|
||||||
long func = (long) GDK_FUNC_ALL;
|
long func = (long) GDK_FUNC_ALL;
|
||||||
if ((m_windowStyle & wxCAPTION) == 0)
|
if ((m_windowStyle & wxCAPTION) == 0)
|
||||||
decor |= GDK_DECOR_TITLE;
|
decor |= GDK_DECOR_TITLE;
|
||||||
|
/*
|
||||||
if ((m_windowStyle & wxMINIMIZE) == 0)
|
if ((m_windowStyle & wxMINIMIZE) == 0)
|
||||||
func |= GDK_FUNC_MINIMIZE;
|
func |= GDK_FUNC_MINIMIZE;
|
||||||
if ((m_windowStyle & wxMAXIMIZE) == 0)
|
if ((m_windowStyle & wxMAXIMIZE) == 0)
|
||||||
func |= GDK_FUNC_MAXIMIZE;
|
func |= GDK_FUNC_MAXIMIZE;
|
||||||
|
*/
|
||||||
if ((m_windowStyle & wxSYSTEM_MENU) == 0)
|
if ((m_windowStyle & wxSYSTEM_MENU) == 0)
|
||||||
decor |= GDK_DECOR_MENU;
|
decor |= GDK_DECOR_MENU;
|
||||||
if ((m_windowStyle & wxMINIMIZE_BOX) == 0)
|
if ((m_windowStyle & wxMINIMIZE_BOX) == 0)
|
||||||
|
@@ -233,10 +233,12 @@ bool wxFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title,
|
|||||||
long func = (long) GDK_FUNC_ALL;
|
long func = (long) GDK_FUNC_ALL;
|
||||||
if ((m_windowStyle & wxCAPTION) == 0)
|
if ((m_windowStyle & wxCAPTION) == 0)
|
||||||
decor |= GDK_DECOR_TITLE;
|
decor |= GDK_DECOR_TITLE;
|
||||||
|
/*
|
||||||
if ((m_windowStyle & wxMINIMIZE) == 0)
|
if ((m_windowStyle & wxMINIMIZE) == 0)
|
||||||
func |= GDK_FUNC_MINIMIZE;
|
func |= GDK_FUNC_MINIMIZE;
|
||||||
if ((m_windowStyle & wxMAXIMIZE) == 0)
|
if ((m_windowStyle & wxMAXIMIZE) == 0)
|
||||||
func |= GDK_FUNC_MAXIMIZE;
|
func |= GDK_FUNC_MAXIMIZE;
|
||||||
|
*/
|
||||||
if ((m_windowStyle & wxSYSTEM_MENU) == 0)
|
if ((m_windowStyle & wxSYSTEM_MENU) == 0)
|
||||||
decor |= GDK_DECOR_MENU;
|
decor |= GDK_DECOR_MENU;
|
||||||
if ((m_windowStyle & wxMINIMIZE_BOX) == 0)
|
if ((m_windowStyle & wxMINIMIZE_BOX) == 0)
|
||||||
|
@@ -440,7 +440,7 @@ wxLayoutWindow::Paste(void)
|
|||||||
if (wxTheClipboard->Open())
|
if (wxTheClipboard->Open())
|
||||||
{
|
{
|
||||||
wxTextDataObject data;
|
wxTextDataObject data;
|
||||||
if (wxTheClipboard->IsSupported(wxDF_TEXT))
|
if (wxTheClipboard->IsSupported( data.GetFormat() ))
|
||||||
{
|
{
|
||||||
wxTheClipboard->GetData(&data);
|
wxTheClipboard->GetData(&data);
|
||||||
text += data.GetText();
|
text += data.GetText();
|
||||||
|
Reference in New Issue
Block a user