From: Robert Roebling Date: Mon, 12 Apr 1999 13:18:04 +0000 (+0000) Subject: clipboards tests X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/ca35e608cd94ee2ae6603b2200074a8f191f4b16 clipboards tests WM hint corrections (guesses) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/gtk/clipbrd.cpp b/src/gtk/clipbrd.cpp index f6ad2415f2..91048b86cb 100644 --- a/src/gtk/clipbrd.cpp +++ b/src/gtk/clipbrd.cpp @@ -91,10 +91,8 @@ targets_selection_received( GtkWidget *WXUNUSED(widget), for (unsigned int i=0; ilength/sizeof(GdkAtom); i++) { -/* - char *name = gdk_atom_name (atoms[i]); - if (name) printf( "Format available: %s.\n", name ); -*/ +/* char *name = gdk_atom_name (atoms[i]); + if (name) printf( "Format available: %s.\n", name ); */ if (atoms[i] == clipboard->m_targetRequested) { @@ -534,12 +532,12 @@ bool wxClipboard::IsSupported( wxDataFormat format ) sets it to FALSE */ m_waiting = TRUE; - + gtk_selection_convert( m_targetsWidget, g_clipboardAtom, g_targetsAtom, GDK_CURRENT_TIME ); - + while (m_waiting) gtk_main_iteration(); if (!m_formatSupported) return FALSE; diff --git a/src/gtk/dialog.cpp b/src/gtk/dialog.cpp index 5aa6f2fb4d..2bb5127425 100644 --- a/src/gtk/dialog.cpp +++ b/src/gtk/dialog.cpp @@ -145,16 +145,18 @@ bool wxDialog::Create( wxWindow *parent, 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 func = (long) GDK_FUNC_ALL; if ((m_windowStyle & wxCAPTION) == 0) decor |= GDK_DECOR_TITLE; +/* if ((m_windowStyle & wxMINIMIZE) == 0) func |= GDK_FUNC_MINIMIZE; if ((m_windowStyle & wxMAXIMIZE) == 0) func |= GDK_FUNC_MAXIMIZE; +*/ if ((m_windowStyle & wxSYSTEM_MENU) == 0) decor |= GDK_DECOR_MENU; if ((m_windowStyle & wxMINIMIZE_BOX) == 0) diff --git a/src/gtk/frame.cpp b/src/gtk/frame.cpp index e7b368139f..6c94bcb55f 100644 --- a/src/gtk/frame.cpp +++ b/src/gtk/frame.cpp @@ -233,10 +233,12 @@ bool wxFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title, long func = (long) GDK_FUNC_ALL; if ((m_windowStyle & wxCAPTION) == 0) decor |= GDK_DECOR_TITLE; +/* if ((m_windowStyle & wxMINIMIZE) == 0) func |= GDK_FUNC_MINIMIZE; if ((m_windowStyle & wxMAXIMIZE) == 0) func |= GDK_FUNC_MAXIMIZE; +*/ if ((m_windowStyle & wxSYSTEM_MENU) == 0) decor |= GDK_DECOR_MENU; if ((m_windowStyle & wxMINIMIZE_BOX) == 0) diff --git a/src/gtk1/clipbrd.cpp b/src/gtk1/clipbrd.cpp index f6ad2415f2..91048b86cb 100644 --- a/src/gtk1/clipbrd.cpp +++ b/src/gtk1/clipbrd.cpp @@ -91,10 +91,8 @@ targets_selection_received( GtkWidget *WXUNUSED(widget), for (unsigned int i=0; ilength/sizeof(GdkAtom); i++) { -/* - char *name = gdk_atom_name (atoms[i]); - if (name) printf( "Format available: %s.\n", name ); -*/ +/* char *name = gdk_atom_name (atoms[i]); + if (name) printf( "Format available: %s.\n", name ); */ if (atoms[i] == clipboard->m_targetRequested) { @@ -534,12 +532,12 @@ bool wxClipboard::IsSupported( wxDataFormat format ) sets it to FALSE */ m_waiting = TRUE; - + gtk_selection_convert( m_targetsWidget, g_clipboardAtom, g_targetsAtom, GDK_CURRENT_TIME ); - + while (m_waiting) gtk_main_iteration(); if (!m_formatSupported) return FALSE; diff --git a/src/gtk1/dialog.cpp b/src/gtk1/dialog.cpp index 5aa6f2fb4d..2bb5127425 100644 --- a/src/gtk1/dialog.cpp +++ b/src/gtk1/dialog.cpp @@ -145,16 +145,18 @@ bool wxDialog::Create( wxWindow *parent, 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 func = (long) GDK_FUNC_ALL; if ((m_windowStyle & wxCAPTION) == 0) decor |= GDK_DECOR_TITLE; +/* if ((m_windowStyle & wxMINIMIZE) == 0) func |= GDK_FUNC_MINIMIZE; if ((m_windowStyle & wxMAXIMIZE) == 0) func |= GDK_FUNC_MAXIMIZE; +*/ if ((m_windowStyle & wxSYSTEM_MENU) == 0) decor |= GDK_DECOR_MENU; if ((m_windowStyle & wxMINIMIZE_BOX) == 0) diff --git a/src/gtk1/frame.cpp b/src/gtk1/frame.cpp index e7b368139f..6c94bcb55f 100644 --- a/src/gtk1/frame.cpp +++ b/src/gtk1/frame.cpp @@ -233,10 +233,12 @@ bool wxFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title, long func = (long) GDK_FUNC_ALL; if ((m_windowStyle & wxCAPTION) == 0) decor |= GDK_DECOR_TITLE; +/* if ((m_windowStyle & wxMINIMIZE) == 0) func |= GDK_FUNC_MINIMIZE; if ((m_windowStyle & wxMAXIMIZE) == 0) func |= GDK_FUNC_MAXIMIZE; +*/ if ((m_windowStyle & wxSYSTEM_MENU) == 0) decor |= GDK_DECOR_MENU; if ((m_windowStyle & wxMINIMIZE_BOX) == 0) diff --git a/user/wxLayout/wxlwindow.cpp b/user/wxLayout/wxlwindow.cpp index 1e34fe3ac8..84f94d6264 100644 --- a/user/wxLayout/wxlwindow.cpp +++ b/user/wxLayout/wxlwindow.cpp @@ -440,7 +440,7 @@ wxLayoutWindow::Paste(void) if (wxTheClipboard->Open()) { wxTextDataObject data; - if (wxTheClipboard->IsSupported(wxDF_TEXT)) + if (wxTheClipboard->IsSupported( data.GetFormat() )) { wxTheClipboard->GetData(&data); text += data.GetText();