From a1696b86f89c2f990a7c708064c43f95aa99a5c8 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Tue, 9 Sep 2003 18:04:57 +0000 Subject: [PATCH] Upported a number of patches to HEAD. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23452 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/fontdlgg.cpp | 1 + src/gtk/dataobj.cpp | 6 ++++-- src/gtk/window.cpp | 14 +++++++++++++- src/gtk1/dataobj.cpp | 6 ++++-- src/gtk1/window.cpp | 14 +++++++++++++- 5 files changed, 35 insertions(+), 6 deletions(-) diff --git a/src/generic/fontdlgg.cpp b/src/generic/fontdlgg.cpp index 40aed1a7dc..0b0ed9a842 100644 --- a/src/generic/fontdlgg.cpp +++ b/src/generic/fontdlgg.cpp @@ -348,6 +348,7 @@ void wxGenericFontDialog::OnChangeFont(wxCommandEvent& WXUNUSED(event)) { m_fontData.m_fontColour = *col; m_previewer->SetForegroundColour(*col); + delete col; } } m_previewer->Refresh(); diff --git a/src/gtk/dataobj.cpp b/src/gtk/dataobj.cpp index 3da4095b2b..84b89dbef6 100644 --- a/src/gtk/dataobj.cpp +++ b/src/gtk/dataobj.cpp @@ -202,8 +202,9 @@ bool wxFileDataObject::GetDataHere(void *buf) const for (size_t i = 0; i < m_filenames.GetCount(); i++) { + filenames += wxT("file:"); filenames += m_filenames[i]; - filenames += (wxChar) 0; + filenames += wxT("\r\n"); } memcpy( buf, filenames.mbc_str(), filenames.Len() + 1 ); @@ -217,8 +218,9 @@ size_t wxFileDataObject::GetDataSize() const for (size_t i = 0; i < m_filenames.GetCount(); i++) { + // This is junk in UTF-8 res += m_filenames[i].Len(); - res += 1; + res += 5 + 2; // "file:" (5) + "\r\n" (2) } return res + 1; diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index b966d46d21..8d51c018aa 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -517,7 +517,7 @@ static int gtk_window_expose_callback( GtkWidget *widget, GtkPizza *pizza = GTK_PIZZA( widget ); if (gdk_event->window != pizza->bin_window) return FALSE; -#if 0 +#if 1 if (win->GetName()) { wxPrintf( wxT("OnExpose from ") ); @@ -528,6 +528,18 @@ static int gtk_window_expose_callback( GtkWidget *widget, (int)gdk_event->area.width, (int)gdk_event->area.height ); } + + gtk_paint_box + ( + win->m_wxwindow->style, + pizza->bin_window, + GTK_STATE_NORMAL, + GTK_SHADOW_OUT, + (GdkRectangle*) NULL, + win->m_wxwindow, + (char *)"button", // const_cast + 20,20,24,24 + ); #endif win->GetUpdateRegion() = wxRegion( gdk_event->region ); diff --git a/src/gtk1/dataobj.cpp b/src/gtk1/dataobj.cpp index 3da4095b2b..84b89dbef6 100644 --- a/src/gtk1/dataobj.cpp +++ b/src/gtk1/dataobj.cpp @@ -202,8 +202,9 @@ bool wxFileDataObject::GetDataHere(void *buf) const for (size_t i = 0; i < m_filenames.GetCount(); i++) { + filenames += wxT("file:"); filenames += m_filenames[i]; - filenames += (wxChar) 0; + filenames += wxT("\r\n"); } memcpy( buf, filenames.mbc_str(), filenames.Len() + 1 ); @@ -217,8 +218,9 @@ size_t wxFileDataObject::GetDataSize() const for (size_t i = 0; i < m_filenames.GetCount(); i++) { + // This is junk in UTF-8 res += m_filenames[i].Len(); - res += 1; + res += 5 + 2; // "file:" (5) + "\r\n" (2) } return res + 1; diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index b966d46d21..8d51c018aa 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -517,7 +517,7 @@ static int gtk_window_expose_callback( GtkWidget *widget, GtkPizza *pizza = GTK_PIZZA( widget ); if (gdk_event->window != pizza->bin_window) return FALSE; -#if 0 +#if 1 if (win->GetName()) { wxPrintf( wxT("OnExpose from ") ); @@ -528,6 +528,18 @@ static int gtk_window_expose_callback( GtkWidget *widget, (int)gdk_event->area.width, (int)gdk_event->area.height ); } + + gtk_paint_box + ( + win->m_wxwindow->style, + pizza->bin_window, + GTK_STATE_NORMAL, + GTK_SHADOW_OUT, + (GdkRectangle*) NULL, + win->m_wxwindow, + (char *)"button", // const_cast + 20,20,24,24 + ); #endif win->GetUpdateRegion() = wxRegion( gdk_event->region ); -- 2.45.2