parent
39885d3889
commit
fa4f542c6f
@ -0,0 +1,155 @@
|
||||
diff -rupN wxWidgets-3.0.2-orig/src/generic/grid.cpp wxWidgets-3.0.2/src/generic/grid.cpp
|
||||
--- wxWidgets-3.0.2-orig/src/generic/grid.cpp 2014-10-06 17:33:44.000000000 -0400
|
||||
+++ wxWidgets-3.0.2/src/generic/grid.cpp 2015-06-22 11:50:16.359029017 -0400
|
||||
@@ -2114,7 +2114,8 @@ void wxGridWindow::OnFocus(wxFocusEvent&
|
||||
m_owner->GetGridCursorCol());
|
||||
const wxRect cursor =
|
||||
m_owner->BlockToDeviceRect(cursorCoords, cursorCoords);
|
||||
- Refresh(true, &cursor);
|
||||
+ if (cursor != wxGridNoCellRect)
|
||||
+ Refresh(true, &cursor);
|
||||
}
|
||||
|
||||
if ( !m_owner->GetEventHandler()->ProcessEvent( event ) )
|
||||
diff -rupN wxWidgets-3.0.2-orig/src/generic/listctrl.cpp wxWidgets-3.0.2/src/generic/listctrl.cpp
|
||||
--- wxWidgets-3.0.2-orig/src/generic/listctrl.cpp 2014-10-06 17:33:44.000000000 -0400
|
||||
+++ wxWidgets-3.0.2/src/generic/listctrl.cpp 2015-06-22 12:12:26.838603542 -0400
|
||||
@@ -1935,6 +1935,13 @@ void wxListMainWindow::RefreshLines( siz
|
||||
size_t visibleFrom, visibleTo;
|
||||
GetVisibleLinesRange(&visibleFrom, &visibleTo);
|
||||
|
||||
+ if ( lineFrom > visibleTo || lineTo < visibleFrom )
|
||||
+ {
|
||||
+ // None of these lines are currently visible at all, don't bother
|
||||
+ // doing anything.
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
if ( lineFrom < visibleFrom )
|
||||
lineFrom = visibleFrom;
|
||||
if ( lineTo > visibleTo )
|
||||
diff -rupN wxWidgets-3.0.2-orig/src/gtk/aboutdlg.cpp wxWidgets-3.0.2/src/gtk/aboutdlg.cpp
|
||||
--- wxWidgets-3.0.2-orig/src/gtk/aboutdlg.cpp 2014-10-06 17:33:44.000000000 -0400
|
||||
+++ wxWidgets-3.0.2/src/gtk/aboutdlg.cpp 2015-06-22 12:09:00.951644896 -0400
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "wx/aboutdlg.h"
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
- #include "wx/utils.h" // for wxLaunchDefaultBrowser()
|
||||
+ #include "wx/window.h"
|
||||
#endif //WX_PRECOMP
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
@@ -131,7 +131,7 @@ static void wxGtkAboutDialogOnLink(GtkAb
|
||||
}
|
||||
#endif
|
||||
|
||||
-void wxAboutBox(const wxAboutDialogInfo& info, wxWindow* WXUNUSED(parent))
|
||||
+void wxAboutBox(const wxAboutDialogInfo& info, wxWindow* parent)
|
||||
{
|
||||
// don't create another dialog if one is already present
|
||||
if ( !gs_aboutDialog )
|
||||
@@ -235,6 +235,11 @@ void wxAboutBox(const wxAboutDialogInfo&
|
||||
g_signal_connect(dlg, "response",
|
||||
G_CALLBACK(wxGtkAboutDialogOnClose), NULL);
|
||||
|
||||
+ GtkWindow* gtkParent = NULL;
|
||||
+ if (parent && parent->m_widget)
|
||||
+ gtkParent = (GtkWindow*)gtk_widget_get_ancestor(parent->m_widget, GTK_TYPE_WINDOW);
|
||||
+ gtk_window_set_transient_for(GTK_WINDOW(dlg), gtkParent);
|
||||
+
|
||||
gtk_window_present(GTK_WINDOW(dlg));
|
||||
}
|
||||
|
||||
diff -rupN wxWidgets-3.0.2-orig/src/gtk/filedlg.cpp wxWidgets-3.0.2/src/gtk/filedlg.cpp
|
||||
--- wxWidgets-3.0.2-orig/src/gtk/filedlg.cpp 2014-10-06 17:33:44.000000000 -0400
|
||||
+++ wxWidgets-3.0.2/src/gtk/filedlg.cpp 2015-06-22 12:16:47.386285719 -0400
|
||||
@@ -187,7 +187,8 @@ bool wxFileDialog::Create(wxWindow *pare
|
||||
const wxSize& sz,
|
||||
const wxString& name)
|
||||
{
|
||||
- parent = GetParentForModalDialog(parent, style);
|
||||
+ // wxFD_MULTIPLE has the same value as wxDIALOG_NO_PARENT
|
||||
+ parent = GetParentForModalDialog(parent, style & ~wxFD_MULTIPLE);
|
||||
|
||||
if (!wxFileDialogBase::Create(parent, message, defaultDir, defaultFileName,
|
||||
wildCard, style, pos, sz, name))
|
||||
diff -rupN wxWidgets-3.0.2-orig/src/gtk/fontdlg.cpp wxWidgets-3.0.2/src/gtk/fontdlg.cpp
|
||||
--- wxWidgets-3.0.2-orig/src/gtk/fontdlg.cpp 2014-10-06 17:33:44.000000000 -0400
|
||||
+++ wxWidgets-3.0.2/src/gtk/fontdlg.cpp 2015-06-22 11:51:23.827727490 -0400
|
||||
@@ -78,6 +78,7 @@ bool wxFontDialog::DoCreate(wxWindow *pa
|
||||
gtk_parent = GTK_WINDOW(parent->m_widget);
|
||||
|
||||
#if GTK_CHECK_VERSION(3,2,0)
|
||||
+ g_type_ensure(PANGO_TYPE_FONT_FACE);
|
||||
if (gtk_check_version(3,2,0) == NULL)
|
||||
m_widget = gtk_font_chooser_dialog_new(wxGTK_CONV(message), gtk_parent);
|
||||
else
|
||||
diff -rupN wxWidgets-3.0.2-orig/src/gtk/print.cpp wxWidgets-3.0.2/src/gtk/print.cpp
|
||||
--- wxWidgets-3.0.2-orig/src/gtk/print.cpp 2014-10-06 17:33:44.000000000 -0400
|
||||
+++ wxWidgets-3.0.2/src/gtk/print.cpp 2015-06-22 12:01:37.173889476 -0400
|
||||
@@ -32,7 +32,6 @@
|
||||
#include "wx/fontutil.h"
|
||||
#include "wx/dynlib.h"
|
||||
#include "wx/paper.h"
|
||||
-#include "wx/scopeguard.h"
|
||||
#include "wx/modalhook.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
@@ -612,6 +611,11 @@ wxGtkPrintDialog::wxGtkPrintDialog( wxWi
|
||||
|
||||
m_parent = parent;
|
||||
SetShowDialog(true);
|
||||
+
|
||||
+ const wxPrintData& printData = m_printDialogData.GetPrintData();
|
||||
+ wxGtkPrintNativeData* native =
|
||||
+ static_cast<wxGtkPrintNativeData*>(printData.GetNativeData());
|
||||
+ native->SetPrintJob(gtk_print_operation_new());
|
||||
}
|
||||
|
||||
wxGtkPrintDialog::wxGtkPrintDialog( wxWindow *parent, wxPrintData *data )
|
||||
@@ -625,11 +629,22 @@ wxGtkPrintDialog::wxGtkPrintDialog( wxWi
|
||||
|
||||
m_parent = parent;
|
||||
SetShowDialog(true);
|
||||
+
|
||||
+ const wxPrintData& printData = m_printDialogData.GetPrintData();
|
||||
+ wxGtkPrintNativeData* native =
|
||||
+ static_cast<wxGtkPrintNativeData*>(printData.GetNativeData());
|
||||
+ native->SetPrintJob(gtk_print_operation_new());
|
||||
}
|
||||
|
||||
|
||||
wxGtkPrintDialog::~wxGtkPrintDialog()
|
||||
{
|
||||
+ const wxPrintData& printData = m_printDialogData.GetPrintData();
|
||||
+ wxGtkPrintNativeData* native =
|
||||
+ static_cast<wxGtkPrintNativeData*>(printData.GetNativeData());
|
||||
+ GtkPrintOperation* printOp = native->GetPrintJob();
|
||||
+ g_object_unref(printOp);
|
||||
+ native->SetPrintJob(NULL);
|
||||
}
|
||||
|
||||
// This is called even if we actually don't want the dialog to appear.
|
||||
@@ -921,10 +936,9 @@ bool wxGtkPrinter::Print(wxWindow *paren
|
||||
wxPrintData printdata = GetPrintDialogData().GetPrintData();
|
||||
wxGtkPrintNativeData *native = (wxGtkPrintNativeData*) printdata.GetNativeData();
|
||||
|
||||
- wxGtkObject<GtkPrintOperation> printOp(gtk_print_operation_new());
|
||||
- native->SetPrintJob(printOp);
|
||||
- wxON_BLOCK_EXIT_OBJ1(*native, wxGtkPrintNativeData::SetPrintJob,
|
||||
- static_cast<GtkPrintOperation*>(NULL));
|
||||
+ // wxGtkPrintDialog needs to be created first as it creates the PrintOp
|
||||
+ wxGtkPrintDialog dialog(parent, &m_printDialogData);
|
||||
+ GtkPrintOperation* printOp = native->GetPrintJob();
|
||||
|
||||
wxPrinterToGtkData dataToSend;
|
||||
dataToSend.printer = this;
|
||||
@@ -937,7 +951,6 @@ bool wxGtkPrinter::Print(wxWindow *paren
|
||||
|
||||
// This is used to setup the DC and
|
||||
// show the dialog if desired
|
||||
- wxGtkPrintDialog dialog( parent, &m_printDialogData );
|
||||
dialog.SetPrintDC(m_dc);
|
||||
dialog.SetShowDialog(prompt);
|
||||
|
Loading…
Reference in new issue