Commit Graph

56300 Commits

Author SHA1 Message Date
Vadim Zeitlin
6bc9f42c3d Ignore menu events while modal dialogs are shown in wxGTK.
Normally menus are disabled in this case but not when running under Ubuntu
Unity, so add an explicit test for this to avoid breaking the program expected
flow of control by allowing the user to show the same modal dialog twice, for
example.

This is not ideal, it would be better to visually disable the menu while the
modal dialogs are shown but is better than nothing.

Closes #14823.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73007 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-25 00:15:03 +00:00
Vadim Zeitlin
288de46cb2 Blind compilation fix for VC6 after r73004.
Define wxDocTemplateVector for VC6 too, it's used in docview.cpp.

Also wrap too long lines.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73006 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-24 23:01:45 +00:00
Paul Cornett
da63066b65 silence GCC warning "enumeral and non-enumeral type in conditional expression"
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73005 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-24 21:49:04 +00:00
Vadim Zeitlin
93d0805b35 Add wxDocManager::Get{Views,Documents,Templates}Vector().
Add accessors returning more convenient wxVectors to supplement the existing
ones giving access to internally used wxLists.

Closes #14814.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-24 17:37:12 +00:00
Vadim Zeitlin
102540a046 Add wxList::AsVector<>() helper.
This can be useful in legacy code using wxList to progressively replace it
with wxVector.

See #14814.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73003 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-24 17:36:44 +00:00
Vadim Zeitlin
84523830d5 Don't include wx/utils.h from wx/vector.h.
This will allow to include wx/vector.h from wx/list.h which is itself included
from wx/utils.h by breaking this circular dependency.

Don't use wxMin(), defined in wx/utils.h, in order to do this.

See #14814.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-24 17:36:19 +00:00
Vadim Zeitlin
431aea0327 Use wxBufferedPaintDC for wxStyledTextCtrl drawing in wxGTK.
GTK+ doesn't seem to use double buffering for Scintilla window for some
reason, resulting in bad flicker when it's updated, e.g. when the user types
into it.

Force the use of double buffering at wxWidgets level by using
wxBufferedPaintDC for painting it. This may be inefficient if GTK+ does double
buffer it in some cases but at least it gets rid of the flicker.

Closes #12704, #14828.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73001 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-24 00:33:44 +00:00
Vadim Zeitlin
7df04680cb Add check for destroying window with mouse capture in wxGTK.
We already have an assert checking for this at wxWindowBase level but it seems
that it wasn't always triggered somehow (maybe because we crashed before
getting there?), so do it sooner.

Closes #14602.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73000 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-24 00:33:19 +00:00
Stefan Csomor
395506ea99 support for custom app controllers, override OSXCreateAppController in wxApp subclass
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72999 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-23 19:02:01 +00:00
Vadim Zeitlin
b31d6326be Fix ribbon bar scroll buttons visibility bug.
Fix scroll buttons update code in wxRibbonPage.

Closes #14844.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72998 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-23 14:34:31 +00:00
Vadim Zeitlin
3c3b6f6063 Add possibility to delay showing wxRichToolTip.
Optionally show the tooltip after a delay instead of doing it immediately when
Show() is called.

Closes #14846.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-23 14:32:15 +00:00
Stefan Csomor
77c8efc8c3 fixing overrelease and out-of-bounds write, fixes #13725
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-23 07:55:58 +00:00
Vadim Zeitlin
40aa1a7e60 Implement GetSizeFromTextSize() for wxSpinCtrl.
Implement it for the native MSW and GTK versions and the generic one used in
the other ports and also for wxSpinCtrlDouble under MSW.

Also test this function in the spin page of the widgets sample.

Closes #14840.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-20 12:49:53 +00:00
Vadim Zeitlin
29604c85d6 Make wxSpinCtrlGenericBase a wxCompositeWindow.
This takes care of propagating methods setting fonts and colours to the
subwindows automatically, so that setting font for the generic wxSpinCtrl now
works, unlike before.

Closes #14839.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72994 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-20 12:49:29 +00:00
Vadim Zeitlin
a0e5592007 Revert all wxNOEXCEPT-related changes.
This reverts r72978, 72984, 72989 and 72992. Do not use wxNOEXCEPT for
wxTextCtrl dtor as this breaks compilation of any user-defined classes
inheriting from it unless they use wxNOEXCEPT as well and the benefits
(fixing a harmless warning for the niche ICC compiler) are just not worth
the compatibility breakage.

See #14826.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-20 12:49:03 +00:00
Vadim Zeitlin
e6a277032d Fix another compilation problem after wxNOEXCEPT introduction.
Also add wxNOEXCEPT to wxTextCtrl dtor definition in wxMSW.

See #14826.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-20 00:57:25 +00:00
Vadim Zeitlin
c71b5269df Add wxTL_NO_HEADER style to wxTreeListCtrl.
Closes #14838.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72990 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-19 18:07:55 +00:00
Vadim Zeitlin
ab7f003482 More compilation fixes after wxNOEXCEPT introduction.
This is a temporary change, r72984 and the following changes (see #14826) will
probably be reverted soon anyhow, but for now at least fix wxGTK compilation.

Closes #14837.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72989 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-19 18:01:01 +00:00
Stefan Csomor
f321d0bc0c implementing delayed freezing, fixes #12865
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72988 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-19 13:06:01 +00:00
Vadim Zeitlin
092e08a844 Add wxFSW_EVENT_UNMOUNT wxFileSystemWatcher flag and implement it for Linux.
This flag generates the corresponding event when the file system containing
the watched directory is unmounted. Currently it is only implemented for
Linux where unmounting now generates this event instead of an error.

Closes #14834.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-19 12:52:18 +00:00
Vadim Zeitlin
1ec4e9c2b7 Convert wxFSW_EVENT_{WARNING,ERROR} to string correctly.
Previously these types were not handled at all, resulting in asserts.

See #14834.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72986 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-19 12:51:54 +00:00
Vadim Zeitlin
b8613f810e Implement wxLocale::GetSystemEncodingName() for wxOSX.
Use CFStringGetNameOfEncoding() to get the canonical name of the encoding from
OS X itself.

Closes #2571.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-19 11:54:12 +00:00
Vadim Zeitlin
24f54e45dc Add wxNOEXCEPT to all wxTextCtrl dtors.
Fix compilation with some compilers after r72978 which added wxNOEXCEPT to
wxTextCtrlBase dtor and wxTextCtrl dtor in wxMSW but not in all the other
ports.

See #14826.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72984 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-19 11:53:49 +00:00
Paul Cornett
d180f4e007 put both versions of wxGetMousePosition in one place so they can use one implementation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72983 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-19 04:17:42 +00:00
Paul Cornett
907f5902b3 fix object referencing with wxSL_MIN_MAX_LABELS
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72982 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-19 02:29:24 +00:00
Vadim Zeitlin
c10361ef2e Define SPI_GETCARETWIDTH ourselves if it's not defined.
This fixes another compilation error for VC6.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72981 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-18 00:17:07 +00:00
Vadim Zeitlin
1b6010d86f Compilation fixes for VC6 after MSWGetComboBoxInfo() introduction.
Don't use COMBOBOXINFO outside of WINVER checks, we can only use
tagCOMBOBOXINFO that we forward declared ourselves.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72980 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-18 00:14:37 +00:00
Vadim Zeitlin
0508392167 Fix path returned from wxGTK wxFileDialog too.
This is similar to the fixes to wxDirDialog in r72779.

Closes #14786.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72979 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-17 23:56:47 +00:00
Vadim Zeitlin
1d9f819c69 Add wxNOEXCEPT and use it for std::streambuf-derived classes.
This fixes warnings from Intel compiler about overriding function using a
different exception specification than the base one and also incidentally
provides a handy macro that can be useful in other situations.

Closes #14826.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72978 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-17 23:56:23 +00:00
Vadim Zeitlin
f31f9900e4 Add wxFSW_EVENT_ATTRIB wxFileSystemWatcher flag.
This flag allows to monitor changes to the file attributes, such as file
modification time.

This patch adds the flag, support for it under Linux and the corresponding
modifications to the sample and the test suite.

Closes #14833.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72977 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-17 23:56:00 +00:00
Vadim Zeitlin
fce37f88fc Fix typo in include/wx/generic/private/richtooltip.h header guard.
A wrong symbol was being defined.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72976 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-17 23:55:35 +00:00
Robin Dunn
4e15d1caa0 Fix broken and missing DataView interface items for Phoenix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72966 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-17 22:17:10 +00:00
Steve Lamerton
fc95c9f7ab Fixed unused parameter warnings for webview on OSX.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72965 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-17 13:34:09 +00:00
Paul Cornett
6bfcc4ec98 avoid deprecated functions with GTK3
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72964 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-16 07:35:53 +00:00
Paul Cornett
070bae64c4 silence warnings about unhandled enum value in switch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72963 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-16 07:30:07 +00:00
Paul Cornett
4acce08799 Remove code that has no effect
Adjusting the wxEVT_ENTER_WINDOW mouse position is pointless, execution won't reach that far if
gdk_event->window != gtk_widget_get_window(widget), and GetClientAreaOrigin() always returns (0,0).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72962 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-16 07:24:29 +00:00
Vadim Zeitlin
b77bb705dd Support monitoring only some events in wxGTK wxFileSystemWatcher.
Call inotify() with the appropriate flags instead of always using IN_ALL_EVENTS.

Closes #14832.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72961 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-15 22:24:22 +00:00
Vadim Zeitlin
a386b9c614 Restore setting focus to generic wxDataViewCtrl on any mouse click.
The changes of r72632 resulted in focus not being given to
wxDataViewMainWindow on right or middle click, restore this behaviour.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72960 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-15 18:48:55 +00:00
Vadim Zeitlin
22ab2de0ee Document how to build wxOSX/Carbon under recent OS X.
Mention that Xcode 3 is needed for this.

Closes #14524.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72959 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-15 18:45:42 +00:00
Vadim Zeitlin
7bc572ec82 Add back WINVER check to fix VC6 compilation of wxMSW.
The changes of r72953 removed the check for WINVER around the code using
COMBOBOXINFO but it's still needed with VC^, so restore it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72958 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-15 12:22:05 +00:00
Paul Cornett
12fdbd3d6a Fix GetClientSize() when scrollbars are present
The value of GtkScrolledWindowClass.scrollbar_spacing seems to be invalid (-1).
Use the style property "scrollbar-spacing" instead.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72957 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-14 18:19:25 +00:00
Paul Cornett
01283acee2 re-enable using our own resize grip with GTK3, themes can (and do) disable the native grip
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72956 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-14 16:55:24 +00:00
Vadim Zeitlin
e2ac737fba Implement wxComboCtrl::GetSizeFromTextSize().
Improve calculation of wxComboCtrl best size which doesn't work correctly for
non-default fonts as shown by r72935. It is still not perfect but better now.

Closes #14825.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72955 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-14 13:48:23 +00:00
Vadim Zeitlin
aa24f946c6 Implement DoGetSizeFromTextSize() for wxMSW wx{Choice,Combobox,TextCtrl}.
Refactor and improve the existing DoGetBestSize() implementations to use
DoGetBestSize().

Closes #14816.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72954 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-14 13:47:59 +00:00
Vadim Zeitlin
df74e2d251 No changes, just refactor wxMSW wxComboBox code calling GetComboBoxInfo().
Move the code dynamically loading this function to the base wxChoice class to
make it possible to use it from there in the upcoming commit.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72953 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-14 13:47:36 +00:00
Vadim Zeitlin
04f8a852c1 Handle wxBORDER_NONE in wxGTK wxTextCtrl::DoGetSizeFromTextSize().
Don't add margins for the controls without borders, they are not used in this
case.

See #14816.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72952 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-14 13:47:13 +00:00
Vadim Zeitlin
b51014176a Don't call setlocale("") on startup by default any longer.
This undoes the changes of r44773 because calling setlocale() resulted in C
locale being set differently from C++ locale which was confusing and led to
huge slowdowns in any code using std::stream with at least MinGW. And setting
the C++ locale to be the same, as r72719 tried to do, doesn't seem to be
practical as it results in immediate crashes under OS X and MinGW when used
under XP.

Do provide wxApp::SetCLocale() helper to explicitly do what was previously
done implicitly, even though currently it is a trivial wrapper for setlocale()
and we don't even need to call gtk_set_locale() as it has never done anything
else and is deprecated since GTK+ 2.24.

Closes #14780.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72951 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-14 13:46:50 +00:00
Vadim Zeitlin
40df8a51f2 Optionally allow showing tooltips for disabled ribbon buttons.
Add wxRibbonButtonBar::SetShowToolTipsForDisabled() to allow enabling the
tooltips even for the disabled buttons.

Closes #14820.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72950 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-14 00:16:16 +00:00
Paul Cornett
4d8209b907 re-enable drawing our own resize grip with GTK3, themes can (and do) disable the native grip
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-13 17:38:29 +00:00
Václav Slavík
ab49aec91a Fix wxGTK's wxFileDialog:Get/SetFilename() to be in sync.
The m_fileName and m_dir variables, managed by the base class, were out
of sync when the dialog wasn't shown yet, because the wxGTK
implementation didn't always set them. GetFilename() following
SetFilename(x) could return something other than x. Fixed by calling the
base class version.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72948 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-13 12:36:32 +00:00