Commit Graph

60036 Commits

Author SHA1 Message Date
Artur Wieczorek
5c3fbc6e4d Use variable of type long to store a style flags returned by GetWindowStyleFlag function.
Since wxWindowBase::GetWindowStyleFlag() returns long the variable used to hold returned value should be also of the same type.
2015-05-23 18:24:03 +02:00
JulianSmart
4c772b4221 Fixed clipped borders on scaled-to-fit images, and fixed a floating image layout bug. 2015-05-23 15:33:54 +01:00
Olly Betts
ecf85bf4cb Remove WXWIN_OS_DESCRIPTION.
This constant wasn't very useful as it contained the description of the OS on
the machine where the library was built, not the one on which the application
using it was running. It also wasn't used anywhere in wxWidgets and apparently
wasn't meant to be used outside of it.

Finally, putting the output of `uname -r` into it created problems with
creating reproducible builds as just a change in the kernel version changed
the build results.

Closes #17002.
2015-05-22 02:29:49 +02:00
Olly Betts
aa4811cdbb Improvements to script to regenerate doxygen docs.
- The default is actually "html" not "all", so fix comment to match
  reality.
- A shell script is run in a sub-shell, and the parent's current
  directory won't be affected, so it's pointless (and confusing) to
  try to restore it at the end of the script.
- Remove trailing ";" from "export FOO=bar;" - it's not required,
  though is valid (it means every "export" is followed by an empty
  statement).
- After adjusting doxygen.log, simply use "mv" to replace the
  original, rather than "cat" then "rm".

Fixes #17001
2015-05-21 17:41:37 -06:00
Dimitri Schoolwerth
9a517e572e Revert "Disable wxFont::SetStrikethrough() test under wxOSX."
Enable the test again because strike-through support has been available
under wxOSX for some time.

This reverts commit 9b1aeb4c93.
2015-05-22 03:28:07 +04:00
Dimitri Schoolwerth
0bee861d16 Fix minor memory leaks under OS X
Two wxDataFormat arrays are not deleted. Use a wxScopedArray to delete
them after usage (not using delete[] in case the functions ever have
multiple exit points which makes it easier to forget adding them).
2015-05-22 03:12:41 +04:00
Dimitri Schoolwerth
cc81acecc1 Make use of strike-through when creating an ATSU font
This makes the wxTextCtrl in the font sample under OS X support showing
a stricken-through font when using ATSU (which by default is used by
OSX/Carbon). It doesn't work for other controls such as a wxButton and
wxStaticText but at least it's a slight improvement from only working
with DrawText (which was added in 9ecf3170).
2015-05-22 03:12:41 +04:00
Dimitri Schoolwerth
d601e0efd8 Fix OS X compilation with wxOSX_USE_ATSU_TEXT==1
Not all wxNativeFontInfo::Init calls were changed to pass the
strike-through parameter, add it.

Also 'strikethrough' is not an existing enum member in the system
headers (unlike e.g. 'bold' and 'italic'). As such the strike-through
property can't be stored in the QD Style member.

Both compile errors were introduced in 79fb4e22.
2015-05-22 03:12:41 +04:00
Artur Wieczorek
a39311bc2d Use HasExtraStyle() function to examine extra wxPG flags.
This dedicated function to check the extra flag is used instead of doing explicit check of the value returned by GetExtraStyle() function.
2015-05-21 20:10:26 +02:00
Olly Betts
716656ae47 Fix typo in GetOperatingSystemDescription() docs.
Fix the case of wxGetOSDescription() in the link.

Closes #17003.
2015-05-21 19:30:52 +02:00
Artur Wieczorek
7394dd8e1f Allow wxPG to take focus on the entire area even if wxPG is not a standalone control.
By default, to prevent wxPG from stealing focus from other controls, focus is moved to the grid only if it was already in one of its child controls.
When newly introduced wxPG_EX_ALWAYS_ALLOW_FOCUS flag is set then wxPG can take focus on the entire grid area (on canvas) even if focus is moved from another control.
Default wxPG behavior remains unchanged because wxPG_EX_ALWAYS_ALLOW_FOCUS flag must be explicitly set with wxPropertyGrid::SetExtraStyle function.

Closes #16993.
2015-05-21 18:51:37 +02:00
Paul Cornett
f583ba0ffb Avoid GTK warning "invalid cast from 'GtkTextView' to 'GtkEntry'" when using SetHint()
closes #16321
2015-05-20 23:12:17 -07:00
Vadim Zeitlin
5f8ac45789 Avoid using out of range value in wxSpinCtrl with inversed range.
In wxMSW it is possible that minimal allowed value is greater than maximal
allowed one and the native control works correctly in this case, however
wxSpinCtrl set m_oldValue to an invalid value which could result in an
infinite recursion if SetRange() was called from the wxEVT_SPINCTRL event
handler.

For example, if the control value was initially 0 and the event handler called
SetRange(1, 0), it would result setting the value to 1 because it was less
than the minimum, resulting in another call to the event handler which would
now set the value to 0 because it was more than the maximum resulting in
another call to the event handler and so forth.

Fix this by ensuring that the value lies between minimal and maximal values,
whatever is their relative order.
2015-05-21 01:09:55 +02:00
Vadim Zeitlin
ba107a9a87 Document that wxMSW wxSpinButton supports inversed range.
This was surprising to discover and seems useful to know in the documentation,
if only to say that this is not supported under the other platforms.
2015-05-21 01:06:10 +02:00
Bryan Petty
42469a4fc1 Merge pull request #27 from orbitcowboy/master
No real changes, fixed typos in comments.
2015-05-20 08:21:19 -06:00
orbitcowboy
1f66d274f8 No real changes, fixed typos in comments. 2015-05-20 11:21:35 +02:00
Dimitri Schoolwerth
928e0fb577 Don't re-create wxChoice with proportion of 1
When re-creating a wxChoice in the widgets sample it expands vertically.
Same fix as dd740d8 (ticket #9594) but for the Choice page instead of
Combobox page.
2015-05-18 18:42:40 +04:00
Vadim Zeitlin
1430123e58 Reset the pointer to NULL after deleting it in wxCmdLineArgsArray.
This ensures that a dangling pointer can't be dereferenced later and fixes a
fatal bug if wxCmdLineArgsArray::operator=() was called more than once (which
is however not supposed to normally happen).
2015-05-17 22:34:18 +02:00
Artur Wieczorek
b6ab81584f Deprecate wxPGProperty::GetFlags() getter method.
Instead of using pass-trough getter just to check the bits of internal field there are implemented dedicated HasFlag() and HasFlagsExact() methods to do so.
2015-05-16 17:17:14 +02:00
Artur Wieczorek
08f9e27351 Added some hints for translators in wxPG.
Because context of some texts to be translated can be unclear added some instructions for translators which can be extracted by gettext or similar tools.
2015-05-16 17:06:37 +02:00
Vadim Zeitlin
12f69f7603 Add a check for wxWindow::Create() success to wxXRC.
Give an error in a very unlikely but still possible case that the window
creation failed before setting it up.
2015-05-16 16:03:23 +02:00
Vadim Zeitlin
1c63ec5564 Don't scale the value(s) of -1 in wxWindow::FromDIP().
Using FromDIP() in wxXRC broke creating controls whose width or height was
specified as -1 as it became -2 when sufficiently high DPI was used, and so
lost the special meaning of "unspecified" that -1 had.

Avoid this problem by never scaling -1 in FromDIP(), this is unlikely to ever
be useful and could result in more difficult to debug problems in the future.
2015-05-16 16:03:22 +02:00
Artur Wieczorek
4b8e8adf16 Use wxString::empty() function calls to determine if string is empty in wxPG.
Use this dedicated function instead of explicitly check if wxString::length() returns non-zero value.
2015-05-15 22:34:25 +02:00
Artur Wieczorek
fc68bb4252 Use enum constants to identify menu items in propgrid sample.
To implement the same pattern of coding in the sample.
2015-05-14 19:08:36 +02:00
Artur Wieczorek
7145a601b0 Consistently use wxT macro with string literals in propgrid sample.
Continued unification of string literals in the sample.
2015-05-14 19:08:11 +02:00
Dimitri Schoolwerth
5c4abb0dd8 Minor changes to Dutch translations
Change a couple of translations from pull request #25.

Also change "U" usage to "u". While "U" is correct too it is less likely
to be the form that should be used here (it's used to address a holy
person or deity).
2015-05-14 20:08:02 +04:00
Gideon van Melle
c41aaf257f Update Dutch translations
Apply pull request #25.
2015-05-14 20:02:38 +04:00
Artur Wieczorek
aa495f9389 Fix inserting child properties into the parent composed property (in wxPropertyGridPageState::DoInsert).
When new sub-property is added and the parent property is a container of composed values then its editor (if exists) need to be refreshed to reflect the new composed value.

Closes #16982.
2015-05-14 15:38:05 +02:00
Artur Wieczorek
b7c4b51b41 Fix wxPropertyGrid::DoEndLabelEdit function, cont.
Explicit cell content handling for edited label is necessary only for column other then 0 because cell handling for label in column is 0 is done inside wxPGProperty::SetLabel() function.
2015-05-14 15:33:41 +02:00
Fulvio Senore
1cd916fc0a Don't show the last page number when printing if it wasn't defined.
Show just the current page in the printing progress messages if the last page
has its default "infinitely big" value.

Closes #16987.
2015-05-12 17:14:40 +02:00
Vadim Zeitlin
e211757af4 Don't use wxToolBarToolBase::SetNormalBitmap() in wxToolbook.
This doesn't work, use wxToolBar::SetToolNormalBitmap() which does.

As a side effect, don't silently ignore invalid page indices in
wxToolbook::SetPageImage() any more, they should result in an assert, which is
now going to happen inside wxToolBar::SetToolNormalBitmap() if this method is
called with an invalid index.

See #16985.
2015-05-12 17:10:02 +02:00
Vadim Zeitlin
17fa642bfd Make it more clear that wxToolBarToolBase can't be used to modify toolbar.
This was already mentioned in wxToolBar documentation, but mention it also in
wxToolBarToolBase and remove the modifier methods from the documentation
completely, they have nothing to do there as they are not part of the public
API at all.

See #16985.
2015-05-12 17:05:58 +02:00
Vadim Zeitlin
ea406d2f3a Don't make wxToolBarToolBase::Set{Normal,Disabled}Bitmap() virtual.
There is no need for this, these methods are not supposed to be overridden as
they are only ever called by wxToolBar itself and making them virtual just
confused things.

See #16985.
2015-05-12 17:04:59 +02:00
Paul Cornett
bc3f5503db Fix wxPrintDialog when used directly, closes #16821 2015-05-11 10:15:05 -07:00
Vadim Zeitlin
0a6b08cca3 Don't cache cells being measured in wxHtmlListBox.
This can result in a crash if the measuring code is called, possibly
indirectly, from a method of a cell object itself and if that cell is
displaced from the cache while caching the cell created in OnMeasureItem().

Closes #16651.
2015-05-10 22:09:48 +02:00
Artur Wieczorek
a0157b37f2 Use wxVariant::IsType() function to check the type of variant values in propgrid sample.
Use this dedicated function to check the type of variant value instead of calling wxVariant::GetType() function and performing explicit comparisons of returned string.
2015-05-10 20:22:40 +02:00
Artur Wieczorek
cc799c10ac Use wxT macro with string literals in propgrid sample.
This fix is to unify string literals in the sample.
2015-05-10 20:21:37 +02:00
Artur Wieczorek
d4440703b2 Fixed wxPropertyGrid::DoEndLabelEdit function
When label editing is finished then property label has to be always updated. If there is a text which is cached in the corresponding cell then it also needs to be updated.

See #16982.
2015-05-10 18:53:16 +02:00
Artur Wieczorek
91144a2247 Fixed setting property label with wxPGproperty::SetLabel
If there is a corresponding cell containing a cached text for column 0 then this text also needs to be updated when the label is changed.

See #16982.
2015-05-10 18:50:25 +02:00
Iwbnwif Yiw
dd036218bd Update wxGrid correctly in presence of hidden rows/columns.
Use GetRowHeight()/GetColWidth() instead of accessing m_rowHeights/m_colWidths
arrays directly as the functions handle the hidden rows/columns correctly.

This fixes bug with corruption of wxGrid appearance if any rows/columns were
inserted into or deleted from a grid containing some hidden rows/columns.

Closes #16980.
2015-05-10 03:13:35 +02:00
Kevin B. McCarty
1298f5970b Fix race condition in Unix wxExecute() if child exited too quickly.
Check if the child has already finished before starting waiting for it.

Closes #16661.
2015-05-09 19:28:04 +02:00
Kevin B. McCarty
1ad4596e8c Fix setting "pressed" bitmap for wxToggleButton.
Move wxAnyButton::GetNormalState(), which allows wxToggleButton to override
what "normal" means for it, down to the platform-independent wxAnyButtonBase
class and use it now in wxGTK as well to correctly choose the pressed bitmap
for a toggle button in this state.

Closes #16771.
2015-05-09 19:22:28 +02:00
Vadim Zeitlin
c0ae81ced7 No changes, just rename GTKGetCurrentState() to be more clear.
Update the name and the comment to explain better that this method returns the
state for which the bitmap is currently shown, not necessarily the current
state.

See #16771.
2015-05-09 19:17:41 +02:00
Kevin B. McCarty
178e9c9335 Improve wxFileCtrl::SetFilename() and SetPath() consistency.
Don't allow specifying the directory in the former and do check for the
directory existence in the latter.

Also update the file shown in the dialog in SetFilename().

Closes #16685.
2015-05-09 19:05:05 +02:00
Kevin B. McCarty
9a44b109bf No real changes, just use wxNOT_FOUND instead of -1.
Replace -1 with more clear wxNOT_FOUND in wxGenericFileCtrl code.

See #16685.
2015-05-09 18:59:01 +02:00
Kevin B. McCarty
5e376532f7 Don't assert in wxGenericFileCtrl if there is no selected file.
Don't use the list control item if there is no selection in it.

Closes #16684.
2015-05-09 18:54:55 +02:00
Tomas Rapkauskas
97286e13bd Speed up finding message catalog by name in wxTranslations.
Use a helper hash map to allow efficiently finding message catalogs by name
instead of using linear search in a linked list which can be noticeably slow
when many catalogs are used.

This speeds up wxGetTranslation() when the domain is specified.

Closes #16975.
2015-05-09 18:27:16 +02:00
Vadim Zeitlin
d1de0f3038 Document wxOSX non-BMP characters fix in the changelog.
This should have been part of the previous commit but was forgotten.

See #16979.
2015-05-09 18:21:36 +02:00
ARATA Mizuki
a266a0a446 Generate correct wxEVT_CHAR for non-BMP characters in wxOSX.
Since [NSString characterAtIndex:] return UTF-16 values, it can't be used as a
"character", convert the entire NSString to wxString and iterate over it to
obtain the real characters that should be sent in wxEVT_CHAR events.

Closes #16979.
2015-05-09 18:18:12 +02:00
Knut Petter Lehre
6c20d775c4 Fix adding blocks to existing selection in wxGrid by Ctrl-drag.
Allow using Ctrl-dragging to add more blocks to the existing selection,
similarly to how spreadsheets work.

Closes #14141.
2015-05-09 17:55:58 +02:00