From 798e3fb358d5498fe79fa15634621945b0f15318 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 4 Jul 2012 11:45:27 +0000 Subject: [PATCH 01/26] Run unix2dos in quiet mode in git-oriented release script. Don't flood the screen with the messages about converting the files, we know that we convert them, this is what we run the bloody thing for. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71955 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- build/tools/git-make-release | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/tools/git-make-release b/build/tools/git-make-release index f0e7c7dcb1..3e2c46e32a 100755 --- a/build/tools/git-make-release +++ b/build/tools/git-make-release @@ -59,7 +59,7 @@ for f in `cat ../eol-native`; do # we renamed this file above so adjust f="include/wx/msw/setup.h" fi - unix2dos $f + unix2dos -q $f done set -x From b963ee6027c11ddf49254b252235be789ecf2177 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 4 Jul 2012 11:45:30 +0000 Subject: [PATCH 02/26] Remove duplicate item about Trac changes from release tech note. Part of the additions of r71951 was already present in this file, just in another place. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71956 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/tech/tn0022.txt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/docs/tech/tn0022.txt b/docs/tech/tn0022.txt index ff1133c692..f4c9e33d76 100644 --- a/docs/tech/tn0022.txt +++ b/docs/tech/tn0022.txt @@ -11,10 +11,6 @@ Put a date on the release line in docs/changes.txt. Update the date in the manual (docs/doxygen/mainpages/manual.h). -Mark the milestone corresponding to the previous release as being completed and -create a new version and a new milestone for it in Trac admin web interface -(ask Robin Dunn for password to access it). - Creating release files ---------------------- @@ -100,8 +96,8 @@ Version updates --------------- Trac: mark the milestone corresponding to the release as completed and add a -new version for it to allow reporting bugs against it (ask Vadim or Robin to do -it). +new version for it to allow reporting bugs against it and create the next +milestone (ask Vadim or Robin to do it or to get admin password). Run misc/scripts/inc_release to increment micro version, i.e. replace x.y.z with x.y.z+1 (minor or major versions updates require manual intervention). From 29e9a09825b35f46f6bc04ba8da0b817f233e67c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 4 Jul 2012 11:45:33 +0000 Subject: [PATCH 03/26] Put the README file used for SourceForge files page under version control. And this is another thing to do for the release. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71957 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/release_files.mdwn | 35 +++++++++++++++++++++++++++++++++++ docs/tech/tn0022.txt | 3 +++ 2 files changed, 38 insertions(+) create mode 100644 docs/release_files.mdwn diff --git a/docs/release_files.mdwn b/docs/release_files.mdwn new file mode 100644 index 0000000000..14d4c586a3 --- /dev/null +++ b/docs/release_files.mdwn @@ -0,0 +1,35 @@ +wxWidgets 2.9.4 +=============== + +This directory contains the files for wxWidgets 2.9.4 release. + +Please notice that since the 2.9 series only a single source distribution is +provided instead of the multiple distributions containing only the files for +each port as was done before. So you only need to download wxWidgets-2.9.4.zip +(or .7z for much smaller archive size) for Microsoft Windows systems or +wxWidgets-2.9.4.tar.bz2 for Unix ones, including Mac OS X. The only difference +between these files is that the ZIP (and 7z) archives contain files with DOS +line endings while the tar balls contain files with Unix line endings. + +Windows users: note that the provided wxWidgets-2.9.4-Setup.exe file installs +the sources for wxMSW and does *not* include wxWidgets binaries and you still +need to build the library, please see `docs/msw/install.txt` for instructions. + + +Reporting Problems +------------------ + +Please report any bugs in this release using [our Trac](http://trac.wxwidgets.org/report) +or by posting to [wx-users mailing list](http://groups.google.com/group/wx-users). + + +Check Sums +---------- + +To verify your download you can use the following sha1sums: + + 0b8921c5f115bd335cde24f0cf4f579067815195 wxWidgets-2.9.4.7z + 231c3e6b411ab3ab4c787e9bfa2bb5743ea8317d wxWidgets-2.9.4.tar.bz2 + 2031902d1bd0c69d559e5c98e49fc232cfaba87b wxWidgets-2.9.4.zip + 1c46c67f0db0fd89d86ab03f8cd1aa2016dcd95f wxWidgets-docs-html-2.9.4.tar.bz2 + e1a8ccc1032df673900e8d9248f32969a0d3ccb5 wxWidgets-docs-html-2.9.4.zip diff --git a/docs/tech/tn0022.txt b/docs/tech/tn0022.txt index f4c9e33d76..7bcac24c83 100644 --- a/docs/tech/tn0022.txt +++ b/docs/tech/tn0022.txt @@ -73,6 +73,9 @@ being "default downloads" for the appropriate platforms (.zip or .exe for MSW, .tar.bz2 for everything else) as otherwise SourceForge would continue to suggest people to download old files. +Also upload docs/release_files.mdwn as README.md to display it by default when +its directory is viewed on the web. + Also upload the files to the FTP mirror at ftp.wxwidgets.org (ask Chris for access if you don't have it). From e6bd7695dac890027ddece828b524381fdcbe581 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 4 Jul 2012 11:45:35 +0000 Subject: [PATCH 04/26] Rename all setup0.h files to setup.h in git-based release script. We also need to rename wx/univ/setup0.h and wx/gtk/setup0.h and it probably doesn't hurt to rename all the other ones even if though they're unused anyhow. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71958 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- build/tools/git-make-release | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/build/tools/git-make-release b/build/tools/git-make-release index 3e2c46e32a..72513ad436 100755 --- a/build/tools/git-make-release +++ b/build/tools/git-make-release @@ -48,17 +48,23 @@ cleanup git archive --prefix=$prefix/ HEAD | (cd ..; tar x) cd .. -mv $prefix/include/wx/msw/setup0.h $prefix/include/wx/msw/setup.h +# All setup0.h files are supposed to be renamed to just setup.h when checked +# out and in the distribution. +find $prefix/include/wx -type f -name setup0.h | while read f; do + mv $f ${f%0.h}.h +done tar cjf $prefix.tar.bz2 $prefix cd $prefix set +x for f in `cat ../eol-native`; do - if [ $f == "include/wx/msw/setup0.h" ]; then - # we renamed this file above so adjust - f="include/wx/msw/setup.h" - fi + case $f in + */setup0.h) + # we renamed this file above so adjust + f=${f%0.h}.h + ;; + esac unix2dos -q $f done set -x From 37e8713ee43c2d00788717729130c1d9549ca9ed Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 4 Jul 2012 11:45:38 +0000 Subject: [PATCH 05/26] Fix problem with most of wxGTK headers not being installed. GTK2_HDR should also include all the version-independent wxGTK headers. Closes #14455. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71959 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- Makefile.in | 58 +++++++++++++++++++++++++++++++++++++-- build/bakefiles/files.bkl | 1 + 2 files changed, 56 insertions(+), 3 deletions(-) diff --git a/Makefile.in b/Makefile.in index b31ac68e4f..c9f05f85f4 100644 --- a/Makefile.in +++ b/Makefile.in @@ -2863,9 +2863,61 @@ COND_TOOLKIT_GTK_TOOLKIT_VERSION__GUI_HDR = \ wx/gtk1/tglbtn.h \ wx/gtk1/treectrl.h @COND_TOOLKIT_GTK_TOOLKIT_VERSION_@GUI_HDR = $(COND_TOOLKIT_GTK_TOOLKIT_VERSION__GUI_HDR) -@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2@GUI_HDR \ -@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2@ = wx/generic/fontdlgg.h \ -@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2@ wx/gtk/gnome/gprint.h +COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_GUI_HDR = \ + wx/generic/fdrepdlg.h \ + wx/generic/filepickerg.h \ + wx/generic/listctrl.h \ + wx/generic/statusbr.h \ + wx/gtk/accel.h \ + wx/gtk/anybutton.h \ + wx/gtk/bmpbuttn.h \ + wx/gtk/button.h \ + wx/gtk/checkbox.h \ + wx/gtk/checklst.h \ + wx/gtk/chkconf.h \ + wx/gtk/collpane.h \ + wx/gtk/colordlg.h \ + wx/gtk/choice.h \ + wx/gtk/combobox.h \ + wx/gtk/control.h \ + wx/gtk/clrpicker.h \ + wx/gtk/dialog.h \ + wx/gtk/dirdlg.h \ + wx/gtk/filectrl.h \ + wx/gtk/filedlg.h \ + wx/gtk/fontpicker.h \ + wx/gtk/filepicker.h \ + wx/gtk/fontdlg.h \ + wx/gtk/frame.h \ + wx/gtk/gauge.h \ + wx/gtk/gnome/gvfs.h \ + wx/gtk/infobar.h \ + wx/gtk/listbox.h \ + wx/gtk/mdi.h \ + wx/gtk/menu.h \ + wx/gtk/menuitem.h \ + wx/gtk/msgdlg.h \ + wx/gtk/notebook.h \ + wx/gtk/print.h \ + wx/gtk/radiobox.h \ + wx/gtk/radiobut.h \ + wx/gtk/scrolbar.h \ + wx/gtk/scrolwin.h \ + wx/gtk/slider.h \ + wx/gtk/spinbutt.h \ + wx/gtk/spinctrl.h \ + wx/gtk/statbmp.h \ + wx/gtk/statbox.h \ + wx/gtk/statline.h \ + wx/gtk/stattext.h \ + wx/gtk/toolbar.h \ + wx/gtk/textctrl.h \ + wx/gtk/textentry.h \ + wx/gtk/tglbtn.h \ + wx/gtk/treeentry_gtk.h \ + wx/generic/fontdlgg.h \ + wx/gtk/gnome/gprint.h +@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2@GUI_HDR = $(COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_GUI_HDR) COND_TOOLKIT_GTK_TOOLKIT_VERSION_3_GUI_HDR = \ wx/generic/fdrepdlg.h \ wx/generic/filepickerg.h \ diff --git a/build/bakefiles/files.bkl b/build/bakefiles/files.bkl index 2f82756444..f5c3e587f2 100644 --- a/build/bakefiles/files.bkl +++ b/build/bakefiles/files.bkl @@ -1236,6 +1236,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file! wx/gtk/treeentry_gtk.h + $(GTK_HDR) wx/generic/fontdlgg.h wx/gtk/gnome/gprint.h From 33d8353fa58dbc66fc9d22fcd510ded6b26ce719 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Wed, 4 Jul 2012 16:15:02 +0000 Subject: [PATCH 06/26] correcting text alignment flag git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71960 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- interface/wx/spinctrl.h | 2 +- interface/wx/stattext.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/wx/spinctrl.h b/interface/wx/spinctrl.h index 0b88027f09..958f0869eb 100644 --- a/interface/wx/spinctrl.h +++ b/interface/wx/spinctrl.h @@ -23,7 +23,7 @@ dialog) under MSW. @style{wxALIGN_LEFT} Same as wxTE_LEFT for wxTextCtrl: the text is left aligned. - @style{wxALIGN_CENTRE} + @style{wxALIGN_CENTRE_HORIZONTAL} Same as wxTE_CENTRE for wxTextCtrl: the text is centered. @style{wxALIGN_RIGHT} Same as wxTE_RIGHT for wxTextCtrl: the text is right aligned (this is diff --git a/interface/wx/stattext.h b/interface/wx/stattext.h index 08fddf0b15..5df00457e9 100644 --- a/interface/wx/stattext.h +++ b/interface/wx/stattext.h @@ -25,7 +25,7 @@ Align the text to the left. @style{wxALIGN_RIGHT} Align the text to the right. - @style{wxALIGN_CENTRE} + @style{wxALIGN_CENTRE_HORIZONTAL} Center the text (horizontally). @style{wxST_NO_AUTORESIZE} By default, the control will adjust its size to exactly fit to the From 72e88d8ea37de545ea095cd536d652d153f78da9 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Wed, 4 Jul 2012 16:17:55 +0000 Subject: [PATCH 07/26] fixing another reference to wrong center flag git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71961 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- interface/wx/stattext.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/wx/stattext.h b/interface/wx/stattext.h index 5df00457e9..3ab1ac2b7e 100644 --- a/interface/wx/stattext.h +++ b/interface/wx/stattext.h @@ -32,7 +32,7 @@ size of the text when SetLabel() is called. If this style flag is given, the control will not change its size (this style is especially useful with controls which also have the @c wxALIGN_RIGHT or - the @c wxALIGN_CENTRE style because otherwise they won't make sense any + the @c wxALIGN_CENTRE_HORIZONTAL style because otherwise they won't make sense any longer after a call to SetLabel()). @style{wxST_ELLIPSIZE_START} If the labeltext width exceeds the control width, replace the beginning From af098dd344d6eeaa619d5dcdc45ee29bbb6a62a3 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Wed, 4 Jul 2012 16:30:24 +0000 Subject: [PATCH 08/26] using correct constant git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71962 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/cocoa/stattext.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osx/cocoa/stattext.mm b/src/osx/cocoa/stattext.mm index 76497e7fca..591a97a476 100644 --- a/src/osx/cocoa/stattext.mm +++ b/src/osx/cocoa/stattext.mm @@ -102,7 +102,7 @@ private: NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init]; [paragraphStyle setLineBreakMode:m_lineBreak]; int style = GetWXPeer()->GetWindowStyleFlag(); - if (style & wxALIGN_CENTER) + if (style & wxALIGN_CENTER_HORIZONTAL) [paragraphStyle setAlignment: NSCenterTextAlignment]; else if (style & wxALIGN_RIGHT) [paragraphStyle setAlignment: NSRightTextAlignment]; From d68a2a24d1d25542974045f0bff3f035c192e5bb Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Wed, 4 Jul 2012 16:42:03 +0000 Subject: [PATCH 09/26] supporting alignment in single line controls, see #14452 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71964 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/cocoa/textctrl.mm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/osx/cocoa/textctrl.mm b/src/osx/cocoa/textctrl.mm index c75aad1a69..0eb4afc84e 100644 --- a/src/osx/cocoa/textctrl.mm +++ b/src/osx/cocoa/textctrl.mm @@ -932,6 +932,15 @@ wxWidgetImplType* wxWidgetImpl::CreateTextControl( wxTextCtrl* wxpeer, else v = [[wxNSTextField alloc] initWithFrame:r]; + if ( style & wxTE_RIGHT) + { + [v setAlignment:NSRightTextAlignment]; + } + else if ( style & wxTE_CENTRE) + { + [v setAlignment:NSCenterTextAlignment]; + } + if ( style & wxNO_BORDER ) { // FIXME: How can we remove the native control's border? From 0f79c83f89a625c88fc95afd30a685c3124fe6c9 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 4 Jul 2012 17:09:53 +0000 Subject: [PATCH 10/26] Use list mode in wxListbook list control instead of report. Use wxLC_LIST instead of wxLC_REPORT when we don't have any icons. This makes the code simpler as wxLC_LIST is more similar to wxLC_ICON which we used, and continue to use, when we do have icons, because we don't need to add and remove any columns on the fly. And it fixes the appearance of wxListbook without images with wxBK_TOP or wxBK_BOTTOM styles as it now lays out its items horizontally and not vertically as before. It also fixes the best size calculation of wxListbook control since the changes to wxListCtrl best size calculations in r71733 as a nice side effect. Closes #14451. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71965 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/listbook.h | 4 -- src/generic/listbkg.cpp | 86 +++++++++++------------------------------ 2 files changed, 23 insertions(+), 67 deletions(-) diff --git a/include/wx/listbook.h b/include/wx/listbook.h index 1d8853526c..4e46af0847 100644 --- a/include/wx/listbook.h +++ b/include/wx/listbook.h @@ -88,10 +88,6 @@ protected: wxBookCtrlEvent* CreatePageChangingEvent() const; void MakeChangedEvent(wxBookCtrlEvent &event); - // get flags for different list control modes - long GetListCtrlIconViewFlags() const; - long GetListCtrlReportViewFlags() const; - // event handlers void OnListSelected(wxListEvent& event); void OnSize(wxSizeEvent& event); diff --git a/src/generic/listbkg.cpp b/src/generic/listbkg.cpp index 0861211c0e..88a3c4a7ff 100644 --- a/src/generic/listbkg.cpp +++ b/src/generic/listbkg.cpp @@ -38,24 +38,6 @@ #include "wx/sysopt.h" -namespace -{ - -// FIXME: This function exists because native OS X wxListCtrl seems to have -// problems with report view, either imperfect display or reported hanging, so -// disable it for now (but it should be fixed, and this function removed). -bool CanUseReportView() -{ -#if defined(__WXMAC__) && !defined(__WXUNIVERSAL__) && wxOSX_USE_CARBON - if (wxSystemOptions::GetOptionInt(wxMAC_ALWAYS_USE_GENERIC_LISTCTRL) == 0) - return false; - else -#endif - return true; -} - -} // anonymous namespace - // ---------------------------------------------------------------------------- // various wxWidgets macros // ---------------------------------------------------------------------------- @@ -118,13 +100,10 @@ wxListbook::Create(wxWindow *parent, wxDefaultPosition, wxDefaultSize, wxLC_SINGLE_SEL | - (CanUseReportView() ? GetListCtrlReportViewFlags() - : GetListCtrlIconViewFlags()) + (IsVertical() ? wxLC_ALIGN_LEFT : wxLC_ALIGN_TOP) | + wxLC_LIST ); - if ( CanUseReportView() ) - GetListView()->InsertColumn(0, wxT("Pages")); - #ifdef __WXMSW__ // On XP with themes enabled the GetViewRect used in GetControllerSize() to // determine the space needed for the list view will incorrectly return @@ -138,20 +117,6 @@ wxListbook::Create(wxWindow *parent, return true; } -// ---------------------------------------------------------------------------- -// wxListCtrl flags -// ---------------------------------------------------------------------------- - -long wxListbook::GetListCtrlIconViewFlags() const -{ - return (IsVertical() ? wxLC_ALIGN_LEFT : wxLC_ALIGN_TOP) | wxLC_ICON; -} - -long wxListbook::GetListCtrlReportViewFlags() const -{ - return wxLC_REPORT | wxLC_NO_HEADER; -} - // ---------------------------------------------------------------------------- // wxListbook geometry management // ---------------------------------------------------------------------------- @@ -259,39 +224,34 @@ bool wxListbook::SetPageImage(size_t n, int imageId) void wxListbook::SetImageList(wxImageList *imageList) { - if ( CanUseReportView() ) + wxListView * const list = GetListView(); + + // If imageList presence has changed, we update the list control style + if ( (imageList != NULL) != (GetImageList() != NULL) ) { - wxListView * const list = GetListView(); + // Preserve the selection which is lost when changing the mode + const int oldSel = GetSelection(); - // If imageList presence has changed, we update the list control view - if ( (imageList != NULL) != (GetImageList() != NULL) ) + // Update the style to use icon view for images, list view otherwise + long style = list->GetWindowStyle() & ~wxLC_MASK_TYPE; + if ( imageList ) { - // Preserve the selection which is lost when changing the mode - const int oldSel = GetSelection(); - - // Update the style to use icon view for images, report view otherwise - long style = wxLC_SINGLE_SEL; - if ( imageList ) - { - style |= GetListCtrlIconViewFlags(); - } - else // no image list - { - style |= GetListCtrlReportViewFlags(); - } - - list->SetWindowStyleFlag(style); - if ( !imageList ) - list->InsertColumn(0, wxT("Pages")); - - // Restore selection - if ( oldSel != wxNOT_FOUND ) - SetSelection(oldSel); + style |= wxLC_ICON; + } + else // no image list + { + style |= wxLC_LIST; } - list->SetImageList(imageList, wxIMAGE_LIST_NORMAL); + list->SetWindowStyleFlag(style); + + // Restore selection + if ( oldSel != wxNOT_FOUND ) + SetSelection(oldSel); } + list->SetImageList(imageList, wxIMAGE_LIST_NORMAL); + wxBookCtrlBase::SetImageList(imageList); } From 41e027551c8fb9a01f57b389a7a56113ce600c1f Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Fri, 6 Jul 2012 16:39:08 +0000 Subject: [PATCH 11/26] guard against empty name field in inotify_event, see #14466 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71967 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/unix/fswatcher_inotify.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/unix/fswatcher_inotify.cpp b/src/unix/fswatcher_inotify.cpp index 6c27e5c0f2..1ad02086e3 100644 --- a/src/unix/fswatcher_inotify.cpp +++ b/src/unix/fswatcher_inotify.cpp @@ -344,9 +344,12 @@ protected: wxString mask = (inevt.mask & IN_ISDIR) ? wxString::Format("IS_DIR | %u", inevt.mask & ~IN_ISDIR) : wxString::Format("%u", inevt.mask); + const char* name = ""; + if (inevt.len) + name = inevt.name; return wxString::Format("Event: wd=%d, mask=%s, cookie=%u, len=%u, " "name=%s", inevt.wd, mask, inevt.cookie, - inevt.len, inevt.name); + inevt.len, name); } static wxFileName GetEventPath(const wxFSWatchEntry& watch, @@ -354,7 +357,7 @@ protected: { // only when dir is watched, we have non-empty e.name wxFileName path = watch.GetPath(); - if (path.IsDir()) + if (path.IsDir() && inevt.len) { path = wxFileName(path.GetPath(), inevt.name); } From 7d6a4d96961eac84d05db8bb24c64d39003f6e54 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sat, 7 Jul 2012 13:06:50 +0000 Subject: [PATCH 12/26] new file added git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71968 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- build/osx/wxiphone.xcodeproj/project.pbxproj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/osx/wxiphone.xcodeproj/project.pbxproj b/build/osx/wxiphone.xcodeproj/project.pbxproj index 1fb528b287..addb860f0a 100644 --- a/build/osx/wxiphone.xcodeproj/project.pbxproj +++ b/build/osx/wxiphone.xcodeproj/project.pbxproj @@ -513,6 +513,7 @@ AAC2CB4D851230008AE4ABA1 /* dcscreen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 22D6E6D9712338C6906CFAA4 /* dcscreen.cpp */; }; AB58406CEBA13BC4A2A83B66 /* printmac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5CC5C13F8AA1387BADB7E60C /* printmac.cpp */; }; ABCD15C4AB37396EA17B7B28 /* translation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6AC666417602346EA583709E /* translation.cpp */; }; + AC0B0C52922B30188AE95E94 /* tabart.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51054B41BFD83E97BAF76D07 /* tabart.cpp */; }; AC6AC589EFB233C7B65A3224 /* overlaycmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 303ACF199BE431BD891C9301 /* overlaycmn.cpp */; }; AC91349D7F0E37739B1F5165 /* palette.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BEF6B3FB66243812969E5BD1 /* palette.cpp */; }; ACD644CFA85A3B70A3E3B118 /* jcparam.c in Sources */ = {isa = PBXBuildFile; fileRef = 2F41EDEB298538CC86FF6DC1 /* jcparam.c */; }; @@ -1003,6 +1004,7 @@ 4FDE5A962FA234FA83A605AD /* Indicator.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Indicator.cxx; path = ../../src/stc/scintilla/src/Indicator.cxx; sourceTree = ""; }; 4FE0B33481283D3493613B0F /* config.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = config.cpp; path = ../../src/common/config.cpp; sourceTree = ""; }; 508B04B4FF913BECBC9DBFFB /* LexSpecman.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LexSpecman.cxx; path = ../../src/stc/scintilla/src/LexSpecman.cxx; sourceTree = ""; }; + 51054B41BFD83E97BAF76D07 /* tabart.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = tabart.cpp; path = ../../src/aui/tabart.cpp; sourceTree = ""; }; 5145561C78303EEE9F827962 /* LexLua.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LexLua.cxx; path = ../../src/stc/scintilla/src/LexLua.cxx; sourceTree = ""; }; 5168ADF7BE39351F8F24E1E6 /* cfstring.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = cfstring.cpp; path = ../../src/osx/core/cfstring.cpp; sourceTree = ""; }; 5190E3E110443FD29F2474FC /* treelist.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = treelist.cpp; path = ../../src/generic/treelist.cpp; sourceTree = ""; }; @@ -2146,6 +2148,7 @@ A298576700C33F018616E7BD /* auibook.cpp */, 05A4437E9697300390FDE14E /* auibar.cpp */, C0155E0C2F6131358D2DA5ED /* tabmdi.cpp */, + 51054B41BFD83E97BAF76D07 /* tabart.cpp */, ); name = src/aui; sourceTree = ""; @@ -3455,6 +3458,7 @@ E104017EE1A4357DAF84E1E6 /* auibook.cpp in Sources */, 39CC380F801F3EE984523275 /* auibar.cpp in Sources */, 6C46AF0370793AA0B74A5A4A /* tabmdi.cpp in Sources */, + AC0B0C52922B30188AE95E94 /* tabart.cpp in Sources */, DE43350F6C9D3148A64F0AF9 /* art_internal.cpp in Sources */, 7DC4A542372437ECA0790F87 /* art_msw.cpp in Sources */, A0BA01A85C303C78A3130711 /* art_aui.cpp in Sources */, From 074d54bcf56b1c2be73bf129465dcea41b87c52a Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sat, 7 Jul 2012 13:07:23 +0000 Subject: [PATCH 13/26] added missing return value git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71969 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/iphone/textctrl.mm | 1 + src/osx/iphone/toolbar.mm | 1 + 2 files changed, 2 insertions(+) diff --git a/src/osx/iphone/textctrl.mm b/src/osx/iphone/textctrl.mm index d8f65b39a7..ab3baf12f2 100644 --- a/src/osx/iphone/textctrl.mm +++ b/src/osx/iphone/textctrl.mm @@ -674,6 +674,7 @@ bool wxUITextFieldControl::SetHint(const wxString& hint) { wxCFStringRef hintstring(hint); [m_textField setPlaceholder:hintstring.AsNSString()]; + return true; } #endif diff --git a/src/osx/iphone/toolbar.mm b/src/osx/iphone/toolbar.mm index 659fb243f2..dcfe1a9bda 100644 --- a/src/osx/iphone/toolbar.mm +++ b/src/osx/iphone/toolbar.mm @@ -249,6 +249,7 @@ bool wxToolBar::Create( SetPeer(new wxWidgetIPhoneImpl( this, toolbar )); MacPostControlCreate(pos, size) ; + return true; } wxToolBar::~wxToolBar() From 9d294e51cd846e312a3ca78ccb0e69aa05bd5233 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sat, 7 Jul 2012 13:24:05 +0000 Subject: [PATCH 14/26] adding support for enabled property, avoiding missing return values git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71970 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/iphone/window.mm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/osx/iphone/window.mm b/src/osx/iphone/window.mm index d453aa8871..2ad2b7e27f 100644 --- a/src/osx/iphone/window.mm +++ b/src/osx/iphone/window.mm @@ -561,10 +561,22 @@ void wxWidgetIPhoneImpl::GetBestRect( wxRect *r ) const bool wxWidgetIPhoneImpl::IsEnabled() const { + UIView* targetView = m_osxView; + // TODO add support for documentViews + + if ( [targetView respondsToSelector:@selector(isEnabled) ] ) + return [targetView isEnabled]; + + return true; } void wxWidgetIPhoneImpl::Enable( bool enable ) { + UIView* targetView = m_osxView; + // TODO add support for documentViews + + if ( [targetView respondsToSelector:@selector(setEnabled:) ] ) + [targetView setEnabled:enable]; } void wxWidgetIPhoneImpl::SetMinimum( wxInt32 v ) @@ -577,10 +589,12 @@ void wxWidgetIPhoneImpl::SetMaximum( wxInt32 v ) wxInt32 wxWidgetIPhoneImpl::GetMinimum() const { + return 0; } wxInt32 wxWidgetIPhoneImpl::GetMaximum() const { + return 0; } void wxWidgetIPhoneImpl::PulseGauge() From 57bf8a6f1efc2d58099f058bfd17579b147baac2 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 7 Jul 2012 13:27:31 +0000 Subject: [PATCH 15/26] Return correct index from wxGenericListCtrl::InsertColumn(). It used to always return 0 in the generic version, return the correct index of the newly inserted column now. Closes #13677. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71971 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 1 + include/wx/generic/private/listctrl.h | 2 +- src/generic/listctrl.cpp | 11 ++++++++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index 6b48cb59e6..f8534e00e2 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -565,6 +565,7 @@ All (GUI): - Added wxDataViewListCtrl::GetItemCount() (Kry). - Added support for Korean Johab and Vietnamese encodings (jank9201). - Fix off by 1 bug with setting font size in points in wxHTML (gevorg). +- Fix return value of wxGenericListCtrl::InsertColumn() (Sebastian Walderich). GTK: diff --git a/include/wx/generic/private/listctrl.h b/include/wx/generic/private/listctrl.h index 3145bd1b7d..48a1f016b8 100644 --- a/include/wx/generic/private/listctrl.h +++ b/include/wx/generic/private/listctrl.h @@ -644,7 +644,7 @@ public: long FindItem( const wxPoint& pt ); long HitTest( int x, int y, int &flags ) const; void InsertItem( wxListItem &item ); - void InsertColumn( long col, const wxListItem &item ); + long InsertColumn( long col, const wxListItem &item ); int GetItemWidthWithImage(wxListItem * item); void SortItems( wxListCtrlCompare fn, wxIntPtr data ); diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index de34935ced..e41e9ce95d 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -4125,8 +4125,10 @@ void wxListMainWindow::InsertItem( wxListItem &item ) RefreshLines(id, GetItemCount() - 1); } -void wxListMainWindow::InsertColumn( long col, const wxListItem &item ) +long wxListMainWindow::InsertColumn( long col, const wxListItem &item ) { + long idx = -1; + m_dirty = true; if ( InReportView() ) { @@ -4143,9 +4145,11 @@ void wxListMainWindow::InsertColumn( long col, const wxListItem &item ) node = m_columns.Item( col ); m_columns.Insert( node, column ); m_aColWidths.Insert( colWidthInfo, col ); + idx = col; } else { + idx = m_aColWidths.GetCount(); m_columns.Append( column ); m_aColWidths.Add( colWidthInfo ); } @@ -4167,6 +4171,7 @@ void wxListMainWindow::InsertColumn( long col, const wxListItem &item ) // invalidate it as it has to be recalculated m_headerWidth = 0; } + return idx; } int wxListMainWindow::GetItemWidthWithImage(wxListItem * item) @@ -4947,14 +4952,14 @@ long wxGenericListCtrl::DoInsertColumn( long col, const wxListItem &item ) { wxCHECK_MSG( InReportView(), -1, wxT("can't add column in non report mode") ); - m_mainWin->InsertColumn( col, item ); + long idx = m_mainWin->InsertColumn( col, item ); // NOTE: if wxLC_NO_HEADER was given, then we are in report view mode but // still have m_headerWin==NULL if (m_headerWin) m_headerWin->Refresh(); - return 0; + return idx; } bool wxGenericListCtrl::ScrollList( int dx, int dy ) From 2643e2e496b4fa209610cfc2baff6cf81950bedc Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 7 Jul 2012 13:27:36 +0000 Subject: [PATCH 16/26] Explicitly call base class ctor in wxRichTextFieldType copy ctor. Failure to do this provokes g++ warnings with -Wextra and is, generally speaking, wrong, even if it probably doesn't matter in this particular case. See #14459. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71972 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/richtext/richtextbuffer.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/wx/richtext/richtextbuffer.h b/include/wx/richtext/richtextbuffer.h index 1a644eac9a..cc28edbc5e 100644 --- a/include/wx/richtext/richtextbuffer.h +++ b/include/wx/richtext/richtextbuffer.h @@ -3613,7 +3613,9 @@ public: /** Copy constructor. */ - wxRichTextFieldType(const wxRichTextFieldType& fieldType) { Copy(fieldType); } + wxRichTextFieldType(const wxRichTextFieldType& fieldType) + : wxObject(fieldType) + { Copy(fieldType); } void Copy(const wxRichTextFieldType& fieldType) { m_name = fieldType.m_name; } @@ -3766,7 +3768,9 @@ public: The copy constructor. */ - wxRichTextFieldTypeStandard(const wxRichTextFieldTypeStandard& field) { Copy(field); } + wxRichTextFieldTypeStandard(const wxRichTextFieldTypeStandard& field) + : wxRichTextFieldType(field) + { Copy(field); } /** Initialises the object. From 9e4587114bd0d17e0ecafce45e7b094e863e48ea Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 7 Jul 2012 13:27:40 +0000 Subject: [PATCH 17/26] Avoid unused variable warning in wxPropertyGrid code in non-wxGTK. Put the variable only used in wxGTK inside "#ifdef __WXGTK__". This fixes the warning but the real fix would be to get rid of this variable completely and just fix whatever problem in wxWindow::Navigate() this was supposed to work around. See #14459. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71973 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/propgrid/propgrid.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index 42395f47a2..f9f94ebfcc 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -5553,12 +5553,14 @@ void wxPropertyGrid::HandleKeyEvent( wxKeyEvent &event, bool fromChild ) if ( keycode == WXK_TAB ) { +#if defined(__WXGTK__) wxWindow* mainControl; if ( HasInternalFlag(wxPG_FL_IN_MANAGER) ) mainControl = GetParent(); else mainControl = this; +#endif if ( !event.ShiftDown() ) { From 85ad2fa7d2aeaa5f01ce1e1c34c3a04527671852 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 7 Jul 2012 13:27:44 +0000 Subject: [PATCH 18/26] Avoid warning about unused variable in wxGetUTCTimeMillis() in wxMSW. Put the declaration of the variable only used under Unix inside the corresponding "#if" branch. See #14459. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71974 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/time.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/common/time.cpp b/src/common/time.cpp index 4a76dfac48..5b2460ca69 100644 --- a/src/common/time.cpp +++ b/src/common/time.cpp @@ -292,8 +292,6 @@ wxLongLong wxGetUTCTimeUSec() // Get local time as milliseconds since 00:00:00, Jan 1st 1970 wxLongLong wxGetUTCTimeMillis() { - wxLongLong val = MILLISECONDS_PER_SECOND; - // If possible, use a function which avoids conversions from // broken-up time structures to milliseconds #if defined(__WINDOWS__) @@ -306,7 +304,10 @@ wxLongLong wxGetUTCTimeMillis() t /= 10000; t -= wxLL(11644473600000); // Unix - Windows epochs difference in ms. return t; -#elif defined(HAVE_GETTIMEOFDAY) +#else // !__WINDOWS__ + wxLongLong val = MILLISECONDS_PER_SECOND; + +#if defined(HAVE_GETTIMEOFDAY) struct timeval tp; if ( wxGetTimeOfDay(&tp) != -1 ) { @@ -342,6 +343,8 @@ wxLongLong wxGetUTCTimeMillis() val *= wxGetUTCTime(); return val; #endif // time functions + +#endif // __WINDOWS__/!__WINDOWS__ } wxLongLong wxGetLocalTimeMillis() From 9d261cbb55f64d4041d1a7e44b39e2d63082a218 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 7 Jul 2012 13:27:47 +0000 Subject: [PATCH 19/26] Avoid warnings about uninitialized variables in TGA loading code. Initialize the variables containing the colour components: even though they should normally be always filled by Palette_GetRGB() call below, this presumably might not happen for a corrupted image with invalid palette table entries and g++ correctly complains about it. See #14459. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71975 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/imagtga.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/common/imagtga.cpp b/src/common/imagtga.cpp index e7203f3065..9a5c4ccd87 100644 --- a/src/common/imagtga.cpp +++ b/src/common/imagtga.cpp @@ -292,9 +292,9 @@ int ReadTGA(wxImage* image, wxInputStream& stream) case 1: { - unsigned char r; - unsigned char g; - unsigned char b; + unsigned char r = 0; + unsigned char g = 0; + unsigned char b = 0; // No compression read the data directly to imageData. @@ -486,9 +486,9 @@ int ReadTGA(wxImage* image, wxInputStream& stream) case 9: { - unsigned char r; - unsigned char g; - unsigned char b; + unsigned char r = 0; + unsigned char g = 0; + unsigned char b = 0; // Decode the RLE data. From ff534ba469473a9ace193e736ca131144df307f9 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 7 Jul 2012 13:27:51 +0000 Subject: [PATCH 20/26] Fix uninitialized variable warning in wxMSW wxFileSystemWatcher code. This warning was harmless as the variable was in fact always initialized if the code where it was used was reached but g++ 4.6.1 is not smart enough to see it, just as MSVC for which we already had a workaround. So initialize it explicitly just to suppress the warning. See #14459. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71976 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/fswatcher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msw/fswatcher.cpp b/src/msw/fswatcher.cpp index 7f2bcd6e89..a186acd2ca 100644 --- a/src/msw/fswatcher.cpp +++ b/src/msw/fswatcher.cpp @@ -136,7 +136,7 @@ void wxFSWatcherImplMSW::SendEvent(wxFileSystemWatcherEvent& evt) bool wxFSWatcherImplMSW::DoSetUpWatch(wxFSWatchEntryMSW& watch) { - BOOL bWatchSubtree wxDUMMY_INITIALIZE(FALSE); + BOOL bWatchSubtree = FALSE; switch ( watch.GetType() ) { From d2dcbf20aa97d60147c5e44b21877e229282f436 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 7 Jul 2012 13:27:55 +0000 Subject: [PATCH 21/26] Don't call HitTest() unnecessarily in MSW wxTreeCtrl code. We already called TreeView_HitTest() above, there is no need to call wxTreeCtrl::HitTest() again to retrieve exactly the same information. This also incidentally fixes a warning about unused variable, see #14459. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71977 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/treectrl.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index 2cfcbd8f39..e84bd1b324 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -2925,10 +2925,7 @@ wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) // click if needed if ( processed ) { - int htFlags = 0; - wxTreeItemId item = HitTest(wxPoint(x, y), htFlags); - - if ( htFlags & wxTREE_HITTEST_ONITEMSTATEICON ) + if ( tvht.flags & TVHT_ONITEMSTATEICON ) { m_triggerStateImageClick = true; } From 235a997f9aea9d80774e296d314682e99e0c46f1 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 7 Jul 2012 13:27:59 +0000 Subject: [PATCH 22/26] Use "_x64" instead of "amd64" for x64 MSW makefile builds. Still accept "amd64" as a valid TARGET_CPU value but also accept, and encourage people to use, "x64". Add a new section about the build system changes to the change log and added a mini-TOC to it to make navigating it a bit easier and show what changes are there at a glance. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71978 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- build/bakefiles/common.bkl | 8 ++++++-- build/bakefiles/config.bkl | 3 ++- build/msw/config.vc | 3 ++- build/msw/makefile.vc | 16 ++++++++++++++-- docs/changes.txt | 22 ++++++++++++++++++++++ 5 files changed, 46 insertions(+), 6 deletions(-) diff --git a/build/bakefiles/common.bkl b/build/bakefiles/common.bkl index 4747f48f1a..db792b410b 100644 --- a/build/bakefiles/common.bkl +++ b/build/bakefiles/common.bkl @@ -32,10 +32,12 @@ _$(CPU) - _amd64 - _amd64 + _x64 + _x64 _ia64 _ia64 + _x64 + _x64 @@ -318,6 +320,8 @@ /MACHINE:X64 /MACHINE:IA64 /MACHINE:IA64 + /MACHINE:X64 + /MACHINE:X64