Commit Graph

59284 Commits

Author SHA1 Message Date
Mariano Reingart
b56a3f5235 Improve wxQT cursor implementation, thanks @seandepagnier
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77911 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-29 02:55:33 +00:00
Vadim Zeitlin
fc18330137 Remove obsolete toolkits mentions from configure.
Cocoa, MGL and PM are not supported any more.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77910 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-28 15:14:56 +00:00
Vadim Zeitlin
13bbe37adf Regenerate configure after power sample addition to configure.in.
This should have been part of 77511, see #16413.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77909 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-28 15:14:50 +00:00
Vadim Zeitlin
908bf66242 Don't define wxSelectionStore::NO_SELECTION inline.
This results in link errors under Unix for some reason.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77908 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-27 23:29:32 +00:00
Vadim Zeitlin
52476a443e Don't leak memory when receiving TaskbarButtonCreated messages.
It is possible to receive more than one TaskbarButtonCreated message for the
same window, so at the very least don't leak memory if this happens.

We really ought to notify the application to allow it to reinitialize the
taskbar button in this case though.

See #16566.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77907 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-27 20:51:51 +00:00
Vadim Zeitlin
b28b9d44c4 Centre columns contents vertically in dataview sample.
If we specify the horizontal alignment, we also need to specify the vertical
alignment as otherwise the right-aligned columns would be also top-aligned,
looking out of kilter with the other columns which are centered by default.

Closes #16559.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77906 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-27 20:46:28 +00:00
Vadim Zeitlin
36a5983f64 Use wxSelectionStore in wxDataViewCtrl generic implementation.
This makes the code (slightly) shorter and more clear and is more efficient as
selecting all items in wxDataViewCtrl is now a O(1) operation instead of being
O(N), where N is the number of items -- and the latter could take quite a long
time (and consume non-negligible amount of memory) for large N.

Increase the size of the virtual list control from 1000 to 10000000 in the
sample to show this.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77905 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-27 20:46:25 +00:00
Vadim Zeitlin
adf8f9d0cd Handle multiple item insertion and deletion in wxSelectionStore.
Rename the existing but not implemented and never used OnItemAdd() method to
OnItemsInserted() and add OnItemsDeleted(), which is more efficient than
OnItemDelete() when many items are being removed from the control at once.

This is not used yet, but will be used in wxDataViewCtrl soon and maybe in the
other controls later.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77904 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-27 20:46:21 +00:00
Vadim Zeitlin
06ab4da3f3 Add wxSelectionStore::IsEmpty() helper.
Just a simple and potentially (although not right now) more efficient
equivalent to GetSelectedCount() == 0.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-27 20:46:18 +00:00
Vadim Zeitlin
d058c09e9f Add possibility to iterate over all selected items in wxSelectionStore.
This is necessary for retrieving all the selected items at once: while doing
this is not recommended for a control with a potentially very large number of
items, it must be possible to allow using wxSelectionStore for wxDataViewCtrl
implementation as wxDataViewCtrl must implement its GetSelections() method.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77902 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-27 20:46:15 +00:00
Vadim Zeitlin
f5941e4f83 Simplify row selection function in the generic wxDataViewCtrl.
No real changes, just don't make SelectRows() more complicated than necessary:
it is always called with its arguments in order, so it doesn't need to reorder
them and it is never called to deselect the items.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77901 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-27 20:46:11 +00:00
Vadim Zeitlin
e05e1b93bd Avoid selecting all rows up to UINT_MAX in generic wxDataViewCtrl.
Shift clicking in a control with multiple selections without a previous
current row attempted to select all rows from the current one up to UINT_MAX
which resulted in a program freezing (and probably running out of memory in 64
bit builds).

Fix this by explicitly checking for the absence of the current item.

Closes #16582.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77900 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-27 20:46:06 +00:00
Vadim Zeitlin
aaddf6be7f Don't add DST offset when converting to local time zone.
Local time zone already logically includes DST, even if its offset doesn't
account for it (because the offset depends on the date, so it can't be part of
TZ itself), so don't add it again when converting to/from it.

Closes #16585.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77899 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-27 17:26:06 +00:00
Vadim Zeitlin
445e2c32e2 Revert "Skip mouse button release events in wxGenericListCtrl."
This reverts r76824 as it is not necessary any longer, the fix in the previous
commit takes care of this problem more generally.

See #16365.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77893 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-27 16:12:45 +00:00
Vadim Zeitlin
42fdb98f74 Don't prevent the other button release handlers from running in wxGTK.
There doesn't seem to be any advantage in doing this, but it can result in
problems see #16055. So just always let the other handlers for this event
execute as well, even if we did process it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77892 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-27 16:12:40 +00:00
Vadim Zeitlin
47f6df12b3 Revert "Skip mouse button release events in wxGenericTreeCtrl."
This reverts r76094 as it broke label editing in the control.

See #16055, closes #16573.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77891 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-27 16:12:34 +00:00
Vadim Zeitlin
0465215157 Avoid calling SetSize() from wxCompositeWindow::Create() under wxGTK.
This was unexpected and resulted in a crash in the case of wxDatePickerCtrl.
And while this particular crash could be fixed just by checking for the
pointers validity in the overridden wxDatePickerCtrl::SetSize(), it seems
better to avoid such unexpected calls to SetSize(), especially as they only
happen under wxGTK, which calls SetLayoutDirection(wxLayout_Default) from its
wxWindow::Create(), and so wouldn't be found by any amount of testing under
other platforms.

Closes #16589.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77890 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-27 16:12:29 +00:00
Artur Wieczorek
89364e95b9 In wxPropertyGridPageState use Boolean member variables to store Boolean values.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77888 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-25 17:29:50 +00:00
Artur Wieczorek
329b59e263 Fix saving edited property value when wxPG property is in 'invalid value' state.
When wxPGProperty is loosing focus in 'invalid value' state its pending value should be stored before resetting property to 'normal' state  because this operation (wxPG::OnValidationFailureReset) also resets pending value.

Closes #16587


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77887 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-25 17:22:11 +00:00
Václav Slavík
10018c1de0 Don't break other toolbars with wxToolBar::OSXSetSelectableTools()
wxOSX's implementation used a shared global delegate for all toolbars,
which is not only highly unusual, but broke with code that modified the
delegate. Specifically, wxPreferencesEditor's window uses
OSXSetSelectableTools() to make its toolbar selectable. Because the
delegate was shared, all toolbars in the application would start
behaving as selectable as soon as the user opened preferences (even
after the preferences window was closed).

Don't share the delegate. Create a unique copy and store it in
wxNSToolbar instance. This isn't particularly elegant solution, but it
has the advantage of being binary compatible and simple.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-25 16:10:23 +00:00
Václav Slavík
5d0c8c9302 Make toggle toolbar button emulation on OS X nicer
Actually use gray background behind toggled icon. Remove the ugly black
frame. Increase rounded rectangle's radius so that it is (barely)
visible that the rectangle is rounded.

Previously, the code used wxLIGHT_GREY by mistake, which is the same
color as the toolbar already uses, so toggled items were rendered with
the same background as untoggled, only with an ugly black rectangle
around them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77883 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-25 12:29:22 +00:00
Vadim Zeitlin
73eaaa97c3 Fix compilation of generic renderer DrawGauge() in non-PCH build.
Include "wx/msw/wrapwin.h" explicitly to get the declaration of MulDiv()
needed since the changes of r77748.

Closes #16577.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77882 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-24 14:55:16 +00:00
Julian Smart
08f4911e73 Fixes for visibility, GetVisibleLineForCaretPosition, and bitmap drawing slowness
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77881 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-24 12:59:11 +00:00
Julian Smart
550b039d6c Improved search text control height and position on Windows.
Was previously much too tall (regression from 3.0).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77880 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-24 12:52:54 +00:00
Julian Smart
c7ca903834 Corrected border size for wxBORDER_THEME
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77879 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-24 12:48:56 +00:00
Paul Cornett
7f7c619c85 avoid duplicate initialization and warnings about initialization order
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77877 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-24 03:39:30 +00:00
Robin Dunn
175c299666 Add cairo_image_surface_get_[width|height] to the wxCairo dynamic importer
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77875 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-24 02:03:50 +00:00
Vadim Zeitlin
1b9caedbcd Detabify the new wxX11 clipboard sources.
No changes, just whitespace cleanup.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77874 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:45:15 +00:00
Vadim Zeitlin
01c1dde264 Avoid deprecated wxPen/wxBrush/wxFont API in wxX11 code.
Also simplify the code by relying on implicit constructors of wxPen and
wxBrush from wxColour.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77873 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:45:10 +00:00
Vadim Zeitlin
db2ecf57cc Avoid signed/unsigned comparison warnings.
Also declare the variable only used inside the loop in the loop statement
itself.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77872 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:45:01 +00:00
Vadim Zeitlin
367210aded Remove unused TRACE_CLIPBOARD variable from wxX11 wxClipboard code.
wxLogTrace() calls using this apparently were removed, so remove the trace
mask as well to avoid "unused variable" warnings about it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77871 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:44:59 +00:00
Vadim Zeitlin
7b210ef041 Remove trivial difference with master before merge.
Somehow an empty line got removed in the AUI sample, restore it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77870 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:44:56 +00:00
Vadim Zeitlin
f257a110c5 Remove accidentally committed swap file.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77869 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:44:53 +00:00
Vadim Zeitlin
e6a6bc71db Initialize the member at first, make sure it would not cause segementation fault on the platform that not define wxHAS_RAW_BITMAP, the true init and assign function called within it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77868 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:44:50 +00:00
Vadim Zeitlin
cf5c6861a7 remove these codes. The code could not work correctly under x11. Redesigning
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77867 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:44:47 +00:00
Vadim Zeitlin
98c68150ed no changes, add more specific description of these tests.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:44:45 +00:00
Vadim Zeitlin
72a90d051a store the raw data in bitmap to m_buffer that in wxCairoBitmapData
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77865 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:44:41 +00:00
Vadim Zeitlin
7d6abbffb8 merge to independent preprocessor to one check.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77864 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:44:39 +00:00
Vadim Zeitlin
999150a45a let wxCairoContext could create cairo context correctly under x11 in this constructor
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77863 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:44:36 +00:00
Vadim Zeitlin
fae6a86a49 This statement that will cause segmentation fault before. Now it ok and enable it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:44:30 +00:00
Vadim Zeitlin
7b3774444b remove unnecessary Clear() and wrong delete
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77861 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:44:28 +00:00
Vadim Zeitlin
5a6c061f37 use wxCharTypeBuffer replace unsigned char pointer
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77860 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:44:25 +00:00
Vadim Zeitlin
b3c88024e8 delete variable on stack is wrong, remove it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77859 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:44:22 +00:00
Vadim Zeitlin
cae31c23f3 remove unnessary internal variables, parameters; use wxVector replace c++ array; enable implemented function parameter
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77858 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:44:19 +00:00
Vadim Zeitlin
dea35139cd adjust codes according to comments of Catalin
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77857 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:44:16 +00:00
Vadim Zeitlin
fc3b0de9cc add return to a case statment, make sure it is not fall through to other statment
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77856 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:44:14 +00:00
Vadim Zeitlin
116d57e850 add WXX11 check. make sure only reposition scrollbar under x11
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77855 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:44:11 +00:00
Vadim Zeitlin
463df5a58a use cairo implement rotated text
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77854 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:44:08 +00:00
Vadim Zeitlin
51309ad50a make x11 dc could get cairo context, so the graphic module could use in x11. This use cairo xlib backend.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77853 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:44:06 +00:00
Vadim Zeitlin
3704547684 fix complilation error: narrowing conversions in xbm files under wxX11. For discussion, please see ticket 12575
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77852 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:44:01 +00:00