Commit Graph

35703 Commits

Author SHA1 Message Date
Paul Cornett
b4a6f39ab2 Use HandleWindowEvent() from C callbacks
Avoids issues with exceptions. Also remove worthless null pointer checks, the
pointer has already been dereferenced, and GetEventHandler() never returns NULL
2017-06-15 09:22:37 -07:00
Paul Cornett
188b249467 Avoid reading uninitialized member variable
m_historyLimit is unused with webkit2
2017-06-15 09:04:05 -07:00
Paul Cornett
b9c9fc3534 Initialize member variables during construction
avoids uninitialized memory accesses later on
2017-06-15 08:57:05 -07:00
Stefan Csomor
75831d232c modernizing API 2017-06-14 21:58:42 +02:00
Stefan Csomor
df898c0e44 xcode 9 runtime checks showed nullptr access here in dialogs sample 2017-06-11 18:05:15 +02:00
Stefan Csomor
0873b809a2 fixing compilation when not using precomp headers under osx 2017-06-08 11:56:28 +02:00
Stefan Csomor
85a24fd4db properly support weak_linking AVKit when compiling under 10.9 + SDK, even when deployment can be lower, removing QTKit 2017-06-08 10:37:58 +02:00
Stefan Csomor
7453cfcbb6 fixing memory leak 2017-06-07 23:06:23 +02:00
Stefan Csomor
16eac9ed06 keeping encoding simpler for unicode 2017-06-07 23:02:09 +02:00
Stefan Csomor
d28dd3333b change code to help analyzer trace ownership properly 2017-06-07 23:00:28 +02:00
Stefan Csomor
76305b53ad fixing possible null ptr access or memory leaks according to analyzer 2017-06-07 17:50:17 +02:00
Stefan Csomor
2f4b249fcf analyzer warning: setAttributedTitle has copy semantics, therefore we have to release what we allocated 2017-06-07 14:05:30 +02:00
Stefan Csomor
0a178ca374 analyzer warning: super init assign to self and check for nil , NSImageView leaking (contentView is a strong reference, therefore release it after assigning) 2017-06-07 14:03:05 +02:00
Stefan Csomor
e61922b4c7 using return code properly even when using CFUserNotification in non-gui thread, rearranging [alert release] so that callback does not get a zombie as a parameter 2017-06-07 13:55:09 +02:00
Stefan Csomor
4312de64c7 analyzer warnings: assign [super init] to self and check for nil 2017-06-07 10:21:18 +02:00
Stefan Csomor
c6ca6d922f analyzer warning: method should never return nil 2017-06-07 08:09:49 +02:00
Tobias Taschner
3aaa2bae6e Include macOS 10.13 name in wxGetOsDescription() 2017-06-06 13:53:58 +02:00
Dimitri Schoolwerth
ff44703871 Fix wxOSX' wxThread::Wait() with configure-based wxBase build
Check for platform using __DARWIN__ instead of using __WXOSX__ which
shouldn't be defined in builds with wxUSE_GUI set to 0.

Closes https://github.com/wxWidgets/wxWidgets/pull/93.
2017-06-02 00:02:35 +04:00
Stefan Csomor
6a3b936d0f use built-in that exists since 10.6 2017-06-01 15:10:09 +02:00
Stefan Csomor
ad96f4be55 fixing header button to properly use native themed arrows 2017-06-01 11:30:59 +02:00
John Roberts
9e83d415ed Remove unused global variable left over from Carbon
This "g_MacLastWindow" was only used in Carbon code and should have been removed
in 5ba67c67e4.
2017-05-31 13:13:21 +02:00
JulianSmart
f14d702e4a Limit LOCALE_SNAME avoidance to VS2010 2017-05-30 19:23:32 +01:00
Vadim Zeitlin
9af43c8c06 Merge branch 'xml-eol'
Add a possibility to change the line endings used in the files generated by
wxXmlDocument.
2017-05-30 19:40:49 +02:00
Vadim Zeitlin
f8b3ecbb0e Fix bug due to undefined g_wxAnyValueTypeGlobals initialization order
This fixes the changes of commit 3543ae0177
which didn't work if any of the globals using wxPreRegisterAnyToVariant() were
instantiated before g_wxAnyValueTypeGlobals itself.

Wrap the global inside a function to ensure that we initialized it before it
is used by wxPreRegisterAnyToVariant() and not after.
2017-05-30 19:18:53 +02:00
Paul Cornett
4ffb9d342c Fix use of PANGO_VERSION_CHECK macro
PANGO_VERSION_CHECK is not available before Pango version 1.16
2017-05-30 09:50:03 -07:00
Paul Cornett
d7b616d507 Fix crash when notification is closed.
"closed" signal callback function had incorrect signature. See #17876
2017-05-30 09:43:23 -07:00
Adrian DC
11e5413558 wx/xml: Implement line-ending modes for xml saves
* Add 'wxTextFileType m_fileType' to hold the type
 * Add 'wxString m_eol' to hold the end of lines string

 * Add SetFileType() and GetFileType() to set and get the type
 * Add GetEOL() to get the end of lines wxString

 * Backwards compatibility preserved by using wxTextFileType_Unix

Change-Id: I3e8547b377e2c4060a3a2d97c299a08ea2c0a376
Signed-off-by: Adrian DC <radian.dc@gmail.com>
2017-05-30 14:31:59 +02:00
Artur Wieczorek
2afd8bfcaf Use faster function to retrieve a line from the paragraph
Because contents of the retrieved line is not going to be modified, faster
read-only function can be used for retrieval.
2017-05-29 20:31:42 +02:00
Artur Wieczorek
136f909f58 Free object representing font description in wxGtkPrinterDC dtor
Closes #14233.
2017-05-29 20:30:22 +02:00
Artur Wieczorek
ab6bdb94be Release temporary object representing page setup
See #14233.
2017-05-29 20:28:01 +02:00
Artur Wieczorek
fe7854933a Release old print settings object prior to storing a new one
Old GtkPrintSettings object should be released before copying its new
instance.

See #14233.
2017-05-29 20:25:33 +02:00
Artur Wieczorek
de047e1ad9 Delete temporary device context used in wxGtkPrinter
Lifetime of wxPrinterDC created in BeginPrint() handler (associated with
"begin-print" signal) is limited to the current print job and therefore
this object should be destroyed when the actual printing is finished.

See #14233.
2017-05-29 20:23:03 +02:00
Artur Wieczorek
79a7fa0330 Create new instance of wxPrintDC in wxGtkPrintDialog
GetPrintDC() should return a new device context created by the print
dialog, not the duplicate of existing context passed from the caller
(e.g. from wxGtkPrinter) through SetPrintDC(). Therefore SetPrintDC() is
no longer useful and can be removed.
2017-05-29 20:17:19 +02:00
JulianSmart
91cb0b4875 Restore previous GetLocaleName behaviour except for Norwegian Bokmål since wxLocale::Init fails otherwise for VS2010 2017-05-29 13:18:13 +01:00
Paul Cornett
c1f2bbce5d Use wxString::empty() instead of comparison to wxEmptyString 2017-05-29 00:05:52 -07:00
Paul Cornett
01909a20c8 Remove initializations of wxString with wxEmptyString
An empty string is the default
2017-05-28 23:53:44 -07:00
Paul Cornett
3fe9d59651 Fix build with wxNO_RTTI, see #17781 2017-05-28 23:14:26 -07:00
Vadim Zeitlin
de47af2f0f Merge branch 'configure-enhance'
Miscellaneous enhancements to configure
2017-05-28 16:21:21 +02:00
tm
7ce3693956 Add support for bitmaps to wxToggleButton XRC handler
Handle "bitmap" and "bitmapposition" attributes in wxToggleButton XRC handler,
just as it's already done for wxBitmap and wxBitmapToggleButton.

Closes #17850.
2017-05-28 16:05:38 +02:00
tm
0a3720beff Handle wxST_ELLIPSIZE_XXX styles in wxStaticText XRC handler
Add forgotten/missing styles.

See #17850.
2017-05-28 16:05:31 +02:00
Vadim Zeitlin
2f8a343b22 Add an option for reproducible library builds
This can be useful to the library packagers, notably under Debian.

Closes #17000.
2017-05-27 19:03:32 +02:00
Scott Furry
3414fde5f6 Work around signed/unsigned comparison warnings in regex code
Make various NUM_XXX constants signed to avoid numerous -Wsign-compare clang
warnings when comparing with them.

Closes #17869.
2017-05-27 18:36:24 +02:00
Artur Wieczorek
b99f4d9327 Fix drawing shapes with transparent borders in wxGtkPrinterDC
Stroke the path of the shape only if pen using in drawing is
non-transparent. Otherwise, the shape would have a visible border even for
transparent pen.
2017-05-26 00:32:58 +02:00
Artur Wieczorek
ef3863a71e Implement GetPartialTextExtents() in wxGtkPrinterDC
Generic implementation from wxDCImpl doesn't work well with wxPrinterDC
under wxGTK.
(This implementation is adopted from wxCairoContext::GetPartialTextExtents.)
2017-05-26 00:32:49 +02:00
Vadim Zeitlin
3543ae0177 Avoid memory leaks when wxWidgets is not used by the application
It can happen that an application using wxWidgets doesn't actually use it,
e.g. because it runs in the console mode and doesn't need the GUI stuff. In
this case, g_wxAnyValueTypeGlobals was leaked because the cleanup function of
the module, which is supposed to clean it up, was never executed.

Fix this by making this pointer a smart pointer, thus making sure that the CRT
cleans it up even if we don't. We still do it from the module OnExit() to
account for the possibility of initializing and shutting down the library more
than once.
2017-05-26 00:19:53 +02:00
Julian Smart
b573c6a79f A border around a wxChoice is not appropriate. 2017-05-25 18:12:06 +01:00
JulianSmart
72298d7d04 Removed unused code and added TODO comment 2017-05-24 17:39:54 +01:00
JulianSmart
0fd3845141 Improved icon scaling quality 2017-05-23 17:12:29 +01:00
Václav Slavík
2f7adacb9d Make wxTextFile::Write() much faster
Write output text in reasonably-sized chunks instead of line by line.
This is significantly faster because of lack of any caching in wxTempFile.
2017-05-23 15:59:27 +02:00
Jose Lorenzo
b6f2973c41 Return true from wxDialog::IsModal() in wxEVT_INIT_DIALOG handler
Ensure that checking for dialog modality in wxEVT_INIT_DIALOG handler returns
true when the dialog is being shown modally in MSW and GTK.

Add a unit test checking that this is the case.

Closes #10385.
2017-05-22 01:21:43 +02:00