diff --git a/docs/gtk/changes.txt b/docs/gtk/changes.txt index fe1eb4f1fb..c0292dca10 100644 --- a/docs/gtk/changes.txt +++ b/docs/gtk/changes.txt @@ -1,8 +1,120 @@ +This file contains the detailed log of wxGTK-specific changes, please see +doc/changes.txt for the concise log of important changes in all wxWindows +ports. -22nd July 2000: wxWindows 2.2.1 released +*** wxWindows 2.3.0 *** + +scaling for map modes other than wxMM_TEXT works correctly (Derry Bryson) + +*** wxWindows 2.2.6 *** + +wxGauge now supports wxGA_VERTICAL (Shane Forsythe) + +*** 29th January 2001: wxWindows 2.2.5 released *** + +Synchronized with wxMSW 2.2.5, include macros +for upwards 2.4.0 compatibility. + +Added missing wxEntry prototype to wx/gtk/app.h. + +Fixed compilation with --enable-no_rtti/no_exceptions +with older egcs. + +*** 15th January 2001: wxWindows 2.2.4 released *** + +Corrected wxYield() to handle recursive calls +more gracefully (and with a warning in debug mode). +This fixes a problem with crashing wxTreeCtrl's +built-in drag'n'drop and probably some other as +well. + +Corrected wxMenuItem::GetLabel() to handle deliberate '_' +characters correctly. + +Patch for better 8-bit-display support. + +Corrected log error message box. + +Implememted wxCommandEvent::IsSelection() for wxListBox. + +Corrected wxListBox::Set() for sorted mode. + +Added EVT_TEXT_UPDATED for spin ctrl. + +Corrected wrongly rounded value in slider and scrollbar +for negative values. + +Small fix for wxTextFile type guessing. + +Translation updates. + +Various other fixes. + +Synchronized release with wxMSW again. + +*** 3rd November: wxWindows 2.2.3 released *** + +Fixed bugs in HTTP code. + +Implemented wxNO_FULL_REPAINT_ON_RESIZE whenever possible +and reduced flicker a little (no longer diables GTK's own +anti-flicker code). + +Always have a clipping region equivalent to the update +region in OnPaint events (such as under wxMSW and wxMac). + +Implemented wxListBox::SetFirstItem(). + +Fixed some minor problems in HTML code, wxListCtrl, +wxListBox. + +Fixed compilation on RedHat 7.0. + +Updated many translations, added Swedish. + +Changed default screenpixels-per-inch from 100 to 75 in +printing code. + +Updated AFM font metrics for Ghostscript fonts and let +Linux and FreeBSD default to using GS fonts (and not +Adobe fonts). + +*** 20th September: wxWindows 2.2.2 released *** + +Fixed wxSizer bug that made items with option +flags greater than 1 report a wrong size. + +Fixed many incompatibilties with GTK themes - +essentially a backport from the 2.3 branch. + +Added missing wxImage::Paste() for transparent +images. + +Fixed a drawing error for ellipses and arc in both +the DC code and the PostScript code. + +Fixed wxListCtrl::HitTest() for report mode. + +Other minor fixes. + +*** 20th August 2000: wxWindows 2.2.1 released *** Minor build fixes. +Use the wxCommmandEvent::IsChecked() function for checkable +menu items. This mean that the m_int parameter no longer +contains the ID of the menu! + +Fixed major problems in ODBC logging code. This change is +binary backward incompatible. + +Fixed reentry problems in DnD code. + +Changed PostScript code so that it can handle a higher +resolution (720dpi). + +Minor improvements to wxGrid code. + Corrected guffow-scrolling so that no surplus expose events are generated. @@ -12,45 +124,44 @@ Minor correction to wxDC::DrawRoundedRectangle. Added support for and menu accelerators. -Use the wxCommmandEvent::IsChecked() function for checkable -menu items. - Made wxComboBox case-sensitive. Minor correction to doc-view architecture. -10th July 2000: wxWindows 2.2.0 released +Minor wxCommandLineParser changes. + +*** 10th July 2000: wxWindows 2.2.0 released *** Added code for writing BMP images. Added code for writing TIFF images. Fixed problem with best visuals (on SGI) - + Applied a number of compile fixes for various Unix variants. Fixed wrong background colours appearing sometimes and fix for resetting the default font in controls. - + Speed-up to wxListCtrl. Fixed bug wxTextStream::ReadLine() - + Various improvements commandline parser. - + Changed wxColour unequal operator to compare colours. - + Fixed wxMenuBar::Replace bug. Added new position to slider update event. - + Minor fix to idle handling (now wxGTK events come after all GTK events). Various fixes to the new wxGrid class. - + Bug-fixes. -4th June 2000: wxWindows pre-2.2 release +*** 4th June 2000: wxWindows pre-2.2 release *** Complete freeze now. Only vital bug-fixes allowed. @@ -62,15 +173,15 @@ Reworked wxURL. MANY bugfixes. -22th March 2000: wxWindows 2.1.15 released +*** 22th March 2000: wxWindows 2.1.15 released *** Build fix. RPMs no loner require GTK's include files. An extra library for the OpenGl class now gets builts -19th March 2000: wxWindows 2.1.14 released +*** 19th March 2000: wxWindows 2.1.14 released *** An extra library for the OpenGl class now gets builts -and installed. There is also an extra RPM for this +and installed. There is also an extra RPM for this small class now. Added possibility to compile wxGTK with already installed @@ -128,7 +239,7 @@ style when using the default. The L-GPL iODBC library must now be enables explicitly so as to not mislead people into reading the license wrong. -24th January '2000: wxWindows 2.1.13 released +*** 24th January '2000: wxWindows 2.1.13 released *** Corrections to TAB handling in notebooks. @@ -173,9 +284,9 @@ Updates to the ODBC classes (George Tasker). Build-fixes for various platforms and compilers. -6th January '2000: wxWindows 2.1.12 released +*** 6th January '2000: wxWindows 2.1.12 released *** -Who has a BigEndian computer (e.g. Sparc or PowerPC) that runs a 15 +Who has a BigEndian computer (e.g. Sparc or PowerPC) that runs a 15 and/or 16 bit colour mode? I need this for testing purposes, i.e. this person could help me by running a small testprogram and sending me the output. @@ -264,7 +375,7 @@ Fixed several problems with buffered streams. Added support for setting the end-of-line mode (Mac,DOS,Unix) in wxTextOutputStream. Added code to send events from one thread to another and added -function to wake up idle system (needed for sending inter-thread +function to wake up idle system (needed for sending inter-thread events). Corrected wrongly set flag in dialogs which broke its tab code. @@ -284,7 +395,7 @@ More minor changes and fixes. Began work on a new dialog and resource editor (wxDesigner). -7st November '99: wxWindows 2.1.11 released +*** 7st November '99: wxWindows 2.1.11 released *** There is still an unresolved problem with bitmap to image conversion on big-endian architectures (such as Solaris), @@ -298,8 +409,8 @@ release will be called wxWindows 2.2.X, development snapshots will be called 2.1.X. A lot of discussion has been wasted on how to maintain a -once released stable version. It was almost universally -agreed that only a commercial entity will have the motivation +once released stable version. It was almost universally +agreed that only a commercial entity will have the motivation ($$$) to do that - so far there is no wxWindows Inc. Support for GTK 1.0 has been dropped. This version has @@ -310,8 +421,8 @@ Rewritten the support for multiple-format Drag'n'Drop and clipboard under both GTK and MSW. There are probably some problems here and there left. -wxListBox and wxChoice can now handle only either void -client data (which it will not delete on destruction) or +wxListBox and wxChoice can now handle only either void +client data (which it will not delete on destruction) or client data of the wxClientData type (which it will delete), instead of both at the same time. The same will happen to wxComboBox some time. Also, wxListBox can now sort its @@ -405,7 +516,7 @@ Made default button action work in more cases. As the old makefile system didn't work, I trashed it and wrote a new one - mo more GNU. This, of course, caused a lot of people -to start sing their song of complaints - any change is a good +to start sing their song of complaints - any change is a good opportunity to complain, but the effect of the change is that we now have shared library support on Linux and Solaris (and probably others as well) and that the Linux shared library no @@ -468,7 +579,7 @@ A few more minor fixes. 6th August '99: Eight wxGTK 2.1 snapshot released -The new makefile system is not able to produce shared libraries +The new makefile system is not able to produce shared libraries on Unix with the exception of Linux - libtool is really great. Therefore, the build system defaults to static libraries on anything but Linux for now. @@ -531,8 +642,8 @@ Some more corrections I forgot. New wxPython (includes new layout system and printing). 15th June '99: Sixth wxGTK 2.1 snapshot released - - + + The biggest change is the completely rewritten configure/makefile system using automake. The main argument for switching to automake is that the resulting makefiles should be more portable so that @@ -542,69 +653,69 @@ shared-only compilation, can be invoked from any directory for concurrent builds wihtin one source tree, uses libtool for greater shared-library platform support, has a functinonal "make uninstall", works with GTK, Motif and WINE, conforms better to GNU standards -as far as configure option names are concerned and is easier to +as far as configure option names are concerned and is easier to maintain. - + Applied patches to compile wxGTK on OS/2. - + Configure checks for byte-order and new defines for byte swapping with respect to the byte-order. Added test for this to typetest sample. -Also made BMP handler bigendian safe so that it should work on -Solaris and such. - -Small changes to basic drawing stuff: made wxColour actually compare +Also made BMP handler bigendian safe so that it should work on +Solaris and such. + +Small changes to basic drawing stuff: made wxColour actually compare RGB values in the == operator, added new constructor to wxMask, corrected initial background colour for DCs, it is now possible to use a wxWindowDC etc before there is any window (this doesn't make any sense, but it is what wxMSW does.) - + Added support for the PRIMARY SELECTION to the wxClipboard class. - + Fixed redraw bug when scrolling window-less widgets out of the visible area (actually a work-around for a GTK bug). - + Regrouped some samples, created new one for various versions of the wxTextCtrl. - + Added wxWindow::Reparent() and wxFrame::MakeModal(). - + Improved handling of column width in wxListCtrl and made this more compatible with the wxMSW version. Also removed a bug from the wxImageList returning an off-by-one id for added images. - + Fixed keyboard hotkeys and resizing for wxMDIChildFrame menu bars. - + Added flag to wxSplitterWindow to update its children's sizes "live" instead of moving a XOR'ed bar around - this is a resource-draining option. Also corrected cursors in splitter window. - + New way to show "disabled" or greyed toolbar items. - + Rewrote parts of the tree ctrl to allow multiple selections and variable size items (Sylvain). These new function do not exist in the native Win32 tree control. - + Implemented global cursors and wxBusyCursor etc. Also removed another cursor misbehaviour. - + Updated many parts of the documentation to reflect changes in wxWindows 2.1, wxPython and more exact description of cross-platform issues as well as platform differences. - + Many other fixes, mainly by others... - + Further compile fixes for different architectures. - - + + 25th May '99: Fifth wxGTK 2.1 snapshot released - - + + This is mostly a bug-fix release. We are having funny times to make wxGTK work well with different micro versions of GTK 1.2 - which is very close to impossible. @@ -613,165 +724,165 @@ vary a lot. I use GTK 1.2.3 and only get wanrnings in one sample (notebook) and that one is due to a bug in GTK - some people using GTK 1.2.2 reported hundreds of warnings getting spitted out for what seems like no reason. - + This snapshot contains the beginnings of our merging of headers, meaning that in the future all ports will use the same headers and will share a lot more code. We have taken this moment to reorganize some code and hope to have eliminated much bad C++ code, as reported primarily by SGI's compilers (Vadim Zeitlin). - + Rewritten char and key event propagation routines to reflect documentation and do the same on wxGTK as on wxMSW. If you are interested in ascii chars -and cursor key etc, intercept EVT_CHAR, if you +and cursor key etc, intercept EVT_CHAR, if you are interested in which key actually got pressed, intercept EVT_KEYDOWN (Norbert Irmer). - + Control that are given -1 as their ID no longer get arbitrary positive IDs assigned but arbitrary negative IDs. This had caused some trouble with ID clashes. - + wxWindow and wxScrolledWindow no longer use the wxScrollEvent, but the newly invented wxScrollWinEvent so that no mixing up of events sent from wxSliders or wxScrollbars placed in a wxWindow can occur. - + Added wxProgressDialog for use with long background work such as printing. - + Added drawing sample and scrolling sample, both of which show some misbehaviours... - + When drawing with the wxXOR logical mode, wxGTK now uses GdkXOR (instead of GdkInvert) and when drawing in wxINVERT logical mode, wxGTK now uses GdkInvert (as before). When you did some rubberband dragging and you used wxXOR and a black pen, then you should change wxINVERT. - + Applied more patches for SGI and HP-UX compilation. - + More updates for wxSockets (Guilhem Lavaux). Seems to be nearly finished. - -You can now use threads within your GUI again. Well, -at least if you know what you are doing and you had a look + +You can now use threads within your GUI again. Well, +at least if you know what you are doing and you had a look at the threads sample. - + wxGLCanvas updated so that it can share display lists -over several windows and to not exhibit any flicker. +over several windows and to not exhibit any flicker. (Norber Irmer). - + wxNotebook revamped so that its process of creation matches wxMSW's more closely, also avoiding problems with wrong page number. Added InsertPage() and the possibility to prevent switching pages by intercepting the PAGE_CHANGING event. Also, wxNotebooks now get shown even if all pages are empty. - + Added Activate() to wxMDIChildFrame (Russel). - + Improved wxSplitterWindow behaviour and visual feed-back when given a minimal size etc (Bruce DeVisser). - + Minor updates to wxTreeCtrl, wxListBox, printing, wxClipboard, wxString, wxThreads and many others. - + Also wxMSW got a big face-lift, not to mention the new wxMac release... - - - + + + 11th May '99: Fourth wxGTK 2.1 snapshot released - - + + This is mostly a bug-fix release. This affects wxSocket, wxThread, and a few GUI classes. Also more work has been done and window placement and decorations etc. which we hope to have finished now. - + Applied patches for FreeBSD and SGI compilation (not yet finshed). - + Updated wxPython to beta 9. - + Made wxGLCanvas work again - strangely it flickers now... - + wxStaticText is currently broken with GTK 1.2.2 (which I don't yet have and thus could not fix). Also, scrolling subwindows (although much improved including a sample) doesn't work perfectly due to a bug in GTK 1.2.1 (probably 1.2.2 as well). - -Added wxStaticLine. - -Note that the next release might bring about changes to keyboard -handling and scroll event intercepting from wxScrolledWindow. - -By and large much of the code has stabilized and won't be much -different in the final wxWindows 2.1 release. Please test as -much as you can. - -The next release will have a new build system. - - +Added wxStaticLine. + +Note that the next release might bring about changes to keyboard +handling and scroll event intercepting from wxScrolledWindow. + +By and large much of the code has stabilized and won't be much +*** different in the final wxWindows 2.1 release. Please test as *** +much as you can. + +The next release will have a new build system. + + + 3rd May '99: Third wxGTK 2.1 snapshot released - - + + Updated INSTALL.txt and SYMBOLS.txt. - + Support for Unicode is now almost complete. Most samples work in both Unicode and non-Unicode mode. Thanks to Ove Kaaven and Vadim. - + Internal changes required for wxOLE and addition of a very experimental wxOLE code section using GNOME's Bonobo library (from GNOME's CVS). - + New version of wxPython that works with the wxGTK 2.1. This now includes a very comprensive test/demo suite. Thanks to Robin Dunn, Harm v.d. Heijden and others. Beware of the hang-man... - + More fine tuning of focus handling and GUI widgets. - + Complete rewrite of wxSocket classes (still experimental). Thanks to Guilhem Lavaux. - + wxMenuBar supports underlined shortcuts like Windows does, indicated by a leading & character. wxMenus now have hotkeys such as in wxXt and wxMSW. - + Rewritten MDI subsystem. - + Correcetions and additions to the printing framework including a paper type database (Julian). - + Several controls now support more style flags for modifying look (and feel) of the controls and windows. - + New implementation of idle handlers, which now send an idle event only once after the event queue has been emptied (which is what happens in the wxMSW port as well), not regularly. This no longer forces wxGTK applications to sleep (by having to call usleep()) in idle time - giving more CPU slices to the application if desired. - -wxGLCanvas (the OpenGl for wxWindows) now accepts keyboard input. - -The usual number of compile and bug fixes from all involved. - - +wxGLCanvas (the OpenGl for wxWindows) now accepts keyboard input. + +The usual number of compile and bug fixes from all involved. + + + 21st April '99: Second wxGTK 2.1 snapshot released - - + + Added much code for Unicode support. Still experimental, but looks very cool - thanks to Ove Kaaven and Vadim Zeitlin. If you are very brave, then you can compile wxGTK with "configure --with-unicode". - + More updates on the dreaded issue of making frames and dialogs impossible to resize etc. - + Drag and Drop works now under GTK 1.2 - at least basically when dragging and dropping text. The API is not entirely fixed yet but seems quite good now. Support for different actions (copy/move/link/..) still missing. I also removed support for GTK 1.0 Drag and Drop - this is just broken and unusable in GTK 1.0 and I don't want to fix it. - + I now embed the JPEG library and handlers for JPEG and GIF have been added to the existing PNG and BMP (and XPM for GTK version only). In the future, the RPMs will not contain these libraries but depend on @@ -780,211 +891,211 @@ ship with everything that is needed for wxGTK so that no downloading of ten image libs will be required - also avoiding problems with ten different kinds of libJPEG-6.0.1.7.IV beta 7. We also updated the PNG code to the newest PNG version. - + wxImage now makes use of the fast rendering code as provided by GTK 1.2 whenever possible. This should mean a speed-up for graphics heavy apps. - + Many fixes all over. Also should compile with GTK 1.2.0 as opposed to only with GTK 1.2.1 now. - -wxPython still doesn't compile, I think. - - +wxPython still doesn't compile, I think. + + + 12th April '99: First wxGTK 2.1 snapshot released - - + + This is the first developers' version of wxWindows 2.1 for GTK. It's main new feature is that it supports GTK 1.2 (as opposed to GTK 1.0) which will make development within the GNOME evironment a lot easier. - + Apart from the move to GTK 1.2 and the changes (some major) that were required as part of that work, enhancement or corrections have been -made to many of the non-GUI classes and functions (such as wxClipboard, +made to many of the non-GUI classes and functions (such as wxClipboard, wxThread, wxSocket, wxConfig) and a few GUI classes (accelerators in menus, listbox always with scrollbar, wxFrame honours Motif Window Manager hints, corrected tab traversal for broken GTK 1.0 widgets). - + There have been slight changes to the priting dialogs and their setup data (which might break apps using this code in previous versions). Also, a bug concerning printing white has been fixed (actually not tested). - + Although this is only the first 2.1 snapshot, there is little reason not to use it as many bugs from version 2.0 have been corrected. There are, pf course, still a few problem left with GTK 1.2 (some of which relate to bugs in GTK). - + I think I preserved backward compatility with GTK 1.0 and if not it should be easy to fix - but mostly I don't care. - + Drag'N'Drop is currently completely broken. Also, wxPython currently doesn't compile with this release. The OpenGL canvas still seems to work. - + Major targets for the final release (still a long way): a new configure system, support JPEG and GIF formats, wxHTML, super-duppah frame layout -stuff, syntax-highlighting editor, possibly Unicode, possibly some GNOME +stuff, syntax-highlighting editor, possibly Unicode, possibly some GNOME gooddies, possibly world domination. - - -5th March '99: wxWindows 2.0 released - - + + +*** 5th March '99: wxWindows 2.0 released *** + + This is the final version of wxWindows 2.0 for GTK. The versions for Windows and Motif (and also this version) are available form Julian Smart's site. The Mac version is still under development. - - -19th February '99: wxWindows 2.0 beta 5 - - + + +*** 19th February '99: wxWindows 2.0 beta 5 *** + + This is the fifth beta release and it contains mostly bug fixes and updates for documentation. - -Applied compile fixes for Solaris (different flavours and compilers). - - -12th February '99: wxWindows 2.0 beta 4 - - +Applied compile fixes for Solaris (different flavours and compilers). + + + +*** 12th February '99: wxWindows 2.0 beta 4 *** + + This is the fourth beta release and it contains mostly bug fixes and updates for documentation. - + Tracked a few more cases, where the bahaviour between wxMSW and wxGTK differed. This was the case for closing a dialog or frame as well as for clearing a device context or setting its background colour and some other minor details. - -Most standard dialogs have been face-liftet a little. - -Implememted default buttons for GTK. - -Fixed many bugs. You guessed it. - - -29th January '99: wxWindows 2.0 beta 3 - - -This is the third beta release and it contains mostly bug fixes. - +Most standard dialogs have been face-liftet a little. + +Implememted default buttons for GTK. + +Fixed many bugs. You guessed it. + + + +*** 29th January '99: wxWindows 2.0 beta 3 *** + + +This is the third beta release and it contains mostly bug fixes. + There is one field where we haven't been able to fix the API yet, and that it Drag'n'Drop. This is mostly due to the fact that DnD in GTK 1.0 is hardly usable and much different from GTK 1.2 which means that we have to design a common API for Windows, GTK 1.0 and GTK 1.2. Although we are trying to prevent that, it is possible that wxWindows 2.0 (being based on GTK 1.0) will not have proper DnD support. - -The major changes are that tool tips have been added, threads have been completely -rewritten, the ODBC code has been updated and improved, the socket code works + +The major changes are that tool tips have been added, threads have been completely +rewritten, the ODBC code has been updated and improved, the socket code works better now. - + Classes for managing MIME-types under Windows and Unix have been added. - + There is now a wxGLCanvas class for OpenGl/Mesa for the Windows, GTK and Motif ports. Come see the penguins flying... - + Documentation has received a big face lift - it now covers nearly all the classes, at least. - + The usual amount of bug fixes. Countless. - + A few member functions of wxString have been renamed. - + For those who are using the ever-so-popular wxImage class (which now available on Motif and Windows as well) in 8-bit mode: wxGTK now creates a color cube upon start-up in 8-bit mode and thus the generation of bitmaps from images has been speeded up 20 times. - + It is now possible to develop with wxGTK without having the GTK 1.0 header files installed so that having the GTK 1.2 header files installed no longer is any problem. We also provide RPMs for RedHat glibc 2 based systems, compiled with egcs 1.1.1 on SuSE 6.0. Note that the RPM will not work in SuSE 6.0 as SuSE decided to ship 6.0 with a broken GTK+ package. - - -6th January '99: wxWindows 2.0 beta 2 - - + + +*** 6th January '99: wxWindows 2.0 beta 2 *** + + This is the second beta release and contains it mostly build and bug fixes. Threads work well now on (up-to-date) glibc 2 systems, commercial Unices and Windows. - - - -20th December '98: wxWindows 2.0 beta 1 - - + + + +*** 20th December '98: wxWindows 2.0 beta 1 *** + + This is the first beta release and we have used the time before this release to tidy up some parts of the API. All releases from now on will be source code compatible but we reserve binary compatibility for the final release. Because of this, the actual library name of -the beta version will not be 2.0 but 1.99, so that we prevent +the beta version will not be 2.0 but 1.99, so that we prevent conflicts with the final library later on. After the final release we'll only fix bugs so that there will be no reason to link any program statically with wxGTK. - + We changed the name of the shared library to include the version of the GTK used so that no conflicts emerge with simultaneous versions of wxWindows for GTK 1.0 and for GTK 1.2 and so on. - + As you can see, we have not moved to GTK 1.1.X as the different development versions are too different and buggy to be useful. We'll wait for a stable GTK 1.2 release (hardly 1.2.0) and start porting then. - + wxGTK now compiles without problems on anything between gcc 2.7.2 on Linux-x86 and egcs 1.1 on Linux-Alpha and egcs 1.0 on Sparc. This isn't as easy as it sounds... - + Available form this site are the Python bindings of wxWindows. Thanks to Robin Dunn for this tremendous contribution. Tkinter is dead, Java is dead, wxPython rules! That's all there is to say. - + Although only a few new classes have been added, many have been polished up substantially, the most visible are wxListCtrl, wxTreeCtrl and all classes related to printing. Also the DialogEd now functions -much better than before. Drag'n'Drop is fucntional but probably won't +much better than before. Drag'n'Drop is fucntional but probably won't be perfect until we use GTK 1.2 and its much improved DnD features. - + wxClipboard has arrived and works for text. Other formats have not been tested carefully yet. - + wxMiniFrame has been added which might be useful for docking toolbars etc. Someone has already done that for the MSW port and we hope to include his very nice work later. - + wxDirDialog has been added (thanks to Harm von der Heijden). - + The entite "tab traveral" system for moving from item to item in a dialog has been rewritten. It now completely overrides the not-so-well-done GTK native tab system. - + Quite much has been done to improve the wxImage class, which is now available in the Windows port as well. Very useful for anything related to image processing. wxGTK also uses this class internally e.g. to scale bitmaps when the scale factor (e.g. zooming) of a drawing context has changed. - + Some of the small and handy classes (wxDate, wxTime, wxVariant) have received a face-lift. wxList has been rewritten to make it possible to write type-safe lists. The collection of utility functions (wxFileFind etc) has been revamped and cleaned-up (thanks to Vadim Zeitlin, who has also greatly enhanced many basic classes, ranging wxString to the debug and log system). - + We removed some constructors of GDI classes (such as wxPen, wxColour) which took a pointer as a parameter. This lead to many errors among users resulting in unexpected behaviour so it was decided to remove these constructors. - + As the number of users and the number of test programs and samples is steadialy rising the core classes of wxWindows for MSW and GTK 1.0 can be considered to be very stable if not outright bug-free. I haven't diff --git a/src/gtk/dc.cpp b/src/gtk/dc.cpp index 57273f2ba5..46ea5626c4 100644 --- a/src/gtk/dc.cpp +++ b/src/gtk/dc.cpp @@ -38,8 +38,10 @@ wxDC::wxDC() { m_ok = FALSE; - m_mm_to_pix_x = 1.0; - m_mm_to_pix_y = 1.0; + m_mm_to_pix_x = (double)wxGetDisplaySize().GetWidth() / + (double)wxGetDisplaySizeMM().GetWidth(); + m_mm_to_pix_y = (double)wxGetDisplaySize().GetHeight() / + (double)wxGetDisplaySizeMM().GetHeight(); m_needComputeScaleX = FALSE; /* not used yet */ m_needComputeScaleY = FALSE; /* not used yet */ @@ -74,8 +76,8 @@ void wxDC::DoGetSizeMM( int* width, int* height ) const int w = 0; int h = 0; GetSize( &w, &h ); - if (width) *width = int( double(w) / (m_scaleX*m_mm_to_pix_x) ); - if (height) *height = int( double(h) / (m_scaleY*m_mm_to_pix_y) ); + if (width) *width = int( double(w) / (m_userScaleX*m_mm_to_pix_x) ); + if (height) *height = int( double(h) / (m_userScaleY*m_mm_to_pix_y) ); } // Resolution in pixels per logical inch diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp index 740f2b06da..b5d5c58a91 100644 --- a/src/gtk/dcclient.cpp +++ b/src/gtk/dcclient.cpp @@ -2041,7 +2041,7 @@ void wxWindowDC::ComputeScaleAndOrigin() // Resolution in pixels per logical inch wxSize wxWindowDC::GetPPI() const { - return wxSize(100, 100); + return wxSize(m_mm_to_pix_x * 25.4 + 0.5, m_mm_to_pix_y * 25.4 + 0.5); } int wxWindowDC::GetDepth() const diff --git a/src/gtk1/dc.cpp b/src/gtk1/dc.cpp index 57273f2ba5..46ea5626c4 100644 --- a/src/gtk1/dc.cpp +++ b/src/gtk1/dc.cpp @@ -38,8 +38,10 @@ wxDC::wxDC() { m_ok = FALSE; - m_mm_to_pix_x = 1.0; - m_mm_to_pix_y = 1.0; + m_mm_to_pix_x = (double)wxGetDisplaySize().GetWidth() / + (double)wxGetDisplaySizeMM().GetWidth(); + m_mm_to_pix_y = (double)wxGetDisplaySize().GetHeight() / + (double)wxGetDisplaySizeMM().GetHeight(); m_needComputeScaleX = FALSE; /* not used yet */ m_needComputeScaleY = FALSE; /* not used yet */ @@ -74,8 +76,8 @@ void wxDC::DoGetSizeMM( int* width, int* height ) const int w = 0; int h = 0; GetSize( &w, &h ); - if (width) *width = int( double(w) / (m_scaleX*m_mm_to_pix_x) ); - if (height) *height = int( double(h) / (m_scaleY*m_mm_to_pix_y) ); + if (width) *width = int( double(w) / (m_userScaleX*m_mm_to_pix_x) ); + if (height) *height = int( double(h) / (m_userScaleY*m_mm_to_pix_y) ); } // Resolution in pixels per logical inch diff --git a/src/gtk1/dcclient.cpp b/src/gtk1/dcclient.cpp index 740f2b06da..b5d5c58a91 100644 --- a/src/gtk1/dcclient.cpp +++ b/src/gtk1/dcclient.cpp @@ -2041,7 +2041,7 @@ void wxWindowDC::ComputeScaleAndOrigin() // Resolution in pixels per logical inch wxSize wxWindowDC::GetPPI() const { - return wxSize(100, 100); + return wxSize(m_mm_to_pix_x * 25.4 + 0.5, m_mm_to_pix_y * 25.4 + 0.5); } int wxWindowDC::GetDepth() const