]> git.saurik.com Git - wxWidgets.git/commitdiff
Added screen design to system settings for
authorRobert Roebling <robert@roebling.de>
Sat, 4 May 2002 18:33:35 +0000 (18:33 +0000)
committerRobert Roebling <robert@roebling.de>
Sat, 4 May 2002 18:33:35 +0000 (18:33 +0000)
    different dialog layouts on desktop vs
    PDA screens

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15376 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

26 files changed:
distrib/msw/tmake/filelist.txt
distrib/msw/tmake/makeall.sh
include/wx/settings.h
src/common/settcmn.cpp [new file with mode: 0644]
src/files.lst
src/generic/filedlgg.cpp
src/gtk/files.lst
src/gtk1/files.lst
src/mac/carbon/files.lst
src/mac/files.lst
src/mgl/files.lst
src/mgl/makefile.wat
src/microwin/files.lst
src/motif/files.lst
src/msw/files.lst
src/msw/makefile.b32
src/msw/makefile.bcc
src/msw/makefile.dos
src/msw/makefile.g95
src/msw/makefile.sc
src/msw/makefile.vc
src/msw/makefile.wat
src/univ/button.cpp
src/wxUniv.dsp
src/wxWindows.dsp
src/x11/files.lst

index c1932fe457cc0898656f7e9348950d79c35b4734..4ac2eb454535ddf951218fb369bdaf6466a7e92b 100644 (file)
@@ -219,6 +219,7 @@ sckaddr.cpp Common  Socket,Base
 sckfile.cpp    Common  Socket,Base
 sckipc.cpp     Common  Socket,Base
 sckstrm.cpp    Common  Socket,Base
+settcmn.cpp    Common
 sizer.cpp      Common
 socket.cpp     Common  Socket,Base
 statbar.cpp    Common
index 39d15ef158f093ddaf762596d9bb378988e4a340..ea5e3973c24bb58af4f6b966ad45c3f10e8e7965 100755 (executable)
@@ -21,91 +21,91 @@ do
     case $tname in
        b32.t)
            echo "Generating $mswdir/makefile.b32 for Borland C++ (32 bits)..."
-           tmake -t b32 wxwin.pro -o $mswdir/makefile.b32 ;;
+           ./tmake -t b32 wxwin.pro -o $mswdir/makefile.b32 ;;
 
        bcc.t)
            echo "Generating $mswdir/makefile.bcc for Borland C++ (16 bits)..."
-           tmake -t bcc wxwin.pro -o $mswdir/makefile.bcc;;
+           ./tmake -t bcc wxwin.pro -o $mswdir/makefile.bcc;;
 
        dos.t)
            echo "Generating $mswdir/makefile.dos for Visual C++ 1.52..."
-           tmake -t dos wxwin.pro -o $mswdir/makefile.dos;;
+           ./tmake -t dos wxwin.pro -o $mswdir/makefile.dos;;
 
        g95.t)
            echo "Generating $mswdir/makefile.g95 for Cygwin/Mingw32..."
-           tmake -t g95 wxwin.pro -o $mswdir/makefile.g95;;
+           ./tmake -t g95 wxwin.pro -o $mswdir/makefile.g95;;
 
        sc.t)
            echo "Generating $mswdir/makefile.sc for Symantec C++..."
-           tmake -t sc wxwin.pro -o $mswdir/makefile.sc;;
+           ./tmake -t sc wxwin.pro -o $mswdir/makefile.sc;;
 
        vc.t) 
            echo "Generating $mswdir/makefile.vc for Visual C++ 4.0..."
-           tmake -t vc wxwin.pro -o $mswdir/makefile.vc;;
+           ./tmake -t vc wxwin.pro -o $mswdir/makefile.vc;;
 
        vc6msw.t) 
            echo "Generating $srcdir/wxWindows.dsp for Visual C++ 6.0..."
-           tmake -t vc6msw wxwin.pro -o $srcdir/wxWindows.dsp;;
+           ./tmake -t vc6msw wxwin.pro -o $srcdir/wxWindows.dsp;;
 
        vc6base.t) 
            echo "Generating $srcdir/wxBase.dsp for Visual C++ 6.0..."
-           tmake -t vc6base wxwin.pro -o $srcdir/wxBase.dsp;;
+           ./tmake -t vc6base wxwin.pro -o $srcdir/wxBase.dsp;;
 
        vc6univ.t) 
            echo "Generating $srcdir/wxUniv.dsp for Visual C++ 6.0..."
-           tmake -t vc6univ wxwin.pro -o $srcdir/wxUniv.dsp;;
+           ./tmake -t vc6univ wxwin.pro -o $srcdir/wxUniv.dsp;;
 
        wat.t)
            echo "Generating $mswdir/makefile.wat for Watcom C++..."
-           tmake -t wat wxwin.pro -o $mswdir/makefile.wat;;
+           ./tmake -t wat wxwin.pro -o $mswdir/makefile.wat;;
 
        base.t)
            echo "Generating $topdir/src/files.lst for Configure..."
-           tmake -t base wxwin.pro -o $topdir/src/files.lst ;;
+           ./tmake -t base wxwin.pro -o $topdir/src/files.lst ;;
 
        gtk.t)
            echo "Generating $topdir/src/gtk/files.lst for GTK and Configure..."
-           tmake -t gtk wxwin.pro -o $topdir/src/gtk/files.lst;;
+           ./tmake -t gtk wxwin.pro -o $topdir/src/gtk/files.lst;;
 
        mgl.t)
            echo "Generating $topdir/src/mgl/files.lst for MGL and Configure..."
-           tmake -t mgl wxwin.pro -o $topdir/src/mgl/files.lst;;
+           ./tmake -t mgl wxwin.pro -o $topdir/src/mgl/files.lst;;
 
        micro.t)
            echo "Generating $topdir/src/micro/files.lst for MicroWindows and Configure..."
-           tmake -t micro wxwin.pro -o $topdir/src/microwin/files.lst;;
+           ./tmake -t micro wxwin.pro -o $topdir/src/microwin/files.lst;;
 
        msw.t)
            echo "Generating $topdir/src/msw/files.lst for MSW and Configure..."
-           tmake -t msw wxwin.pro -o $topdir/src/msw/files.lst;;
+           ./tmake -t msw wxwin.pro -o $topdir/src/msw/files.lst;;
 
        mac.t)
            echo "Generating $topdir/src/mac/files.lst for Mac and Configure..."
-           tmake -t mac wxwin.pro -o $topdir/src/mac/files.lst;;
+           ./tmake -t mac wxwin.pro -o $topdir/src/mac/files.lst;;
 
        motif.t)
            echo "Generating $topdir/src/motif/files.lst for Motif and Configure..."
-           tmake -t motif wxwin.pro -o $topdir/src/motif/files.lst;;
+           ./tmake -t motif wxwin.pro -o $topdir/src/motif/files.lst;;
 
        univ.t)
            echo "Generating $topdir/src/univ/files.lst for wxUniversal..."
-           tmake -t univ wxwin.pro -o $topdir/src/univ/files.lst;;
+           ./tmake -t univ wxwin.pro -o $topdir/src/univ/files.lst;;
 
        unx.t)
            echo "Generating $topdir/src/os2/files.lst for OS/2 PM and Configure..."
-           tmake -t os2 wxwin.pro -o $topdir/src/os2/files.lst;;
+           ./tmake -t os2 wxwin.pro -o $topdir/src/os2/files.lst;;
 
        mgl.t)
            echo "Generating $topdir/src/mgl/files.lst for MGL and Configure..."
-           tmake -t mgl wxwin.pro -o $topdir/src/mgl/files.lst;;
+           ./tmake -t mgl wxwin.pro -o $topdir/src/mgl/files.lst;;
 
        x11.t)
            echo "Generating $topdir/src/x11/files.lst for X11 and Configure..."
-           tmake -t x11 wxwin.pro -o $topdir/src/x11/files.lst;;
+           ./tmake -t x11 wxwin.pro -o $topdir/src/x11/files.lst;;
 
        watmgl.t)
            echo "Generating $topdir/src/mgl/makefile.wat for Watcom C++ and MGL+DOS..."
-           tmake -t watmgl wxwin.pro -o $topdir/src/mgl/makefile.wat;;
+           ./tmake -t watmgl wxwin.pro -o $topdir/src/mgl/makefile.wat;;
     esac
 done
 
index 1d3248d2c8012ce2117a18f0fcaa7d4e6630462c..14d4e5fa3f74ec60cf464165b39e9766099b3271 100644 (file)
@@ -130,6 +130,16 @@ enum wxSystemFeature
     wxSYS_CAN_ICONIZE_FRAME
 };
 
+// values for different screen designs
+enum wxSystemScreen
+{
+    wxSYS_SCREEN_NONE = 0,  //   not yet defined
+    wxSYS_SCREEN_DESKTOP,   //   >= 800x600
+    wxSYS_SCREEN_SMALL,     //   >= 640x480
+    wxSYS_SCREEN_PDA,       //   >= 320x240
+    wxSYS_SCREEN_TINY       //   <
+};
+
 // ----------------------------------------------------------------------------
 // wxSystemSettingsNative: defines the API for wxSystemSettings class
 // ----------------------------------------------------------------------------
@@ -171,6 +181,16 @@ public:
     static wxColour GetColour(wxSystemColour index);
 #endif // __WXUNIVERSAL__
 
+    // Get system screen design (desktop, pda, ..) used for
+    // laying out various dialogs.
+    static wxSystemScreen GetScreen();
+    
+    // Override default.
+    static void SetScreen( wxSystemScreen screen );
+    
+    // Value
+    static wxSystemScreen ms_screen;
+
 
     // the backwards compatible versions of wxSystemSettingsNative functions,
     // don't use these methods in the new code!
diff --git a/src/common/settcmn.cpp b/src/common/settcmn.cpp
new file mode 100644 (file)
index 0000000..7e527aa
--- /dev/null
@@ -0,0 +1,79 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        common/settcmn.cpp
+// Purpose:     common (to all ports) wxWindow functions
+// Author:      Robert Roebling
+// RCS-ID:      $Id$
+// Copyright:   (c) wxWindows team
+// Licence:     wxWindows license
+/////////////////////////////////////////////////////////////////////////////
+
+// ============================================================================
+// declarations
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+#ifdef __GNUG__
+    #pragma implementation "settings.h"
+#endif
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+    #pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+    #include "wx/defs.h"
+    #include "wx/utils.h"
+    #include "wx/settings.h"
+#endif //WX_PRECOMP
+
+// ----------------------------------------------------------------------------
+// static data
+// ----------------------------------------------------------------------------
+
+wxSystemScreen wxSystemSettings::ms_screen = wxSYS_SCREEN_NONE;
+
+// ----------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+
+wxSystemScreen wxSystemSettings::GetScreen()
+{
+    if (ms_screen == wxSYS_SCREEN_NONE)
+#ifndef __WXUNIV__
+    {
+        // As a start, all GUI are desktops.
+        ms_screen = wxSYS_SCREEN_DESKTOP;
+    }
+#else
+    {
+        // wxUniv will be used on small devices, too.
+        int x = 0;
+        int y = 0;
+        wxGetDisplaySize( &x, &y );
+
+        ms_screen = wxSYS_SCREEN_DESKTOP;
+            
+        if (x < 800)
+            ms_screen = wxSYS_SCREEN_SMALL;
+            
+        if (x < 640)
+            ms_screen = wxSYS_SCREEN_PDA;
+            
+        if (x < 200)
+            ms_screen = wxSYS_SCREEN_TINY;
+    }
+#endif
+
+    return ms_screen;
+}
+    
+void wxSystemSettings::SetScreen( wxSystemScreen screen )
+{
+    ms_screen = screen;
+}
+
index 9cee4ea1850c6719ee723b141b4d9ad7e2710a63..1a97f58f2b8b19aed153bf056333cca350efc7bf 100644 (file)
@@ -127,6 +127,7 @@ ALL_HEADERS = \
                hashmap.h \
                intl.h \
                ioswrap.h \
+               ipc.h \
                ipcbase.h \
                isql.h \
                isqlext.h \
index 43d35d78e86d4596ab4d9934c350d8e947b4d1c1..9d3d7bc280e4057351ffa32fe83010fae13044ed 100644 (file)
@@ -1109,16 +1109,14 @@ wxFileDialog::wxFileDialog(wxWindow *parent,
 #endif
     buttonsizer->Add( butNewDir, 0, wxALL, 5 );
 
-#ifdef __WXX11__
-    mainsizer->Add( buttonsizer, 0, wxALL | wxEXPAND, 0 );
-#else
-    mainsizer->Add( buttonsizer, 0, wxALL | wxEXPAND, 5 );
-#endif
+    if (wxSystemSettings::GetScreen() >= wxSYS_SCREEN_PDA)
+        mainsizer->Add( buttonsizer, 0, wxALL | wxEXPAND, 0 );
+    else
+        mainsizer->Add( buttonsizer, 0, wxALL | wxEXPAND, 5 );
 
     wxBoxSizer *staticsizer = new wxBoxSizer( wxHORIZONTAL );
-#ifndef __WXX11__
-    staticsizer->Add( new wxStaticText( this, -1, _("Current directory:") ), 0, wxRIGHT, 10 );
-#endif
+    if (wxSystemSettings::GetScreen() < wxSYS_SCREEN_PDA)
+        staticsizer->Add( new wxStaticText( this, -1, _("Current directory:") ), 0, wxRIGHT, 10 );
     m_static = new wxStaticText( this, -1, m_dir );
     staticsizer->Add( m_static, 1 );
     mainsizer->Add( staticsizer, 0, wxEXPAND | wxLEFT|wxRIGHT|wxBOTTOM, 10 );
@@ -1133,7 +1131,8 @@ wxFileDialog::wxFileDialog(wxWindow *parent,
     m_list->SetNewDirControl(butNewDir);
     m_list->SetGoToParentControl(butDirUp);
 
-#ifdef __WXX11__
+    if (wxSystemSettings::GetScreen() >= wxSYS_SCREEN_PDA)
+    {
     // PDAs have a different screen layout
     mainsizer->Add( m_list, 1, wxEXPAND | wxLEFT|wxRIGHT, 5 );
 
@@ -1155,8 +1154,9 @@ wxFileDialog::wxFileDialog(wxWindow *parent,
     buttonsizer->Add( new wxButton( this, wxID_OK, _("OK") ), 0, wxCENTER | wxALL, 5 );
     buttonsizer->Add( new wxButton( this, wxID_CANCEL, _("Cancel") ), 0, wxCENTER | wxALL, 5 );
     mainsizer->Add( buttonsizer, 0, wxALIGN_RIGHT );
-
-#else
+    }
+    else
+    {
     mainsizer->Add( m_list, 1, wxEXPAND | wxLEFT|wxRIGHT, 10 );
 
     wxBoxSizer *textsizer = new wxBoxSizer( wxHORIZONTAL );
@@ -1173,8 +1173,7 @@ wxFileDialog::wxFileDialog(wxWindow *parent,
     choicesizer->Add( m_check, 0, wxCENTER|wxALL, 10 );
     choicesizer->Add( new wxButton( this, wxID_CANCEL, _("Cancel") ), 0, wxCENTER | wxALL, 10 );
     mainsizer->Add( choicesizer, 0, wxEXPAND );
-
-#endif
+    }
 
     m_choice->Append( firstWildText, (void*) new wxString( firstWild ) );
     while (tokens.HasMoreTokens())
index c974c316027f8bd272451eb4ec7cb46b530ffc42..e433131f7d93044726ae0d944214d8a4f4d4153e 100644 (file)
@@ -145,6 +145,7 @@ ALL_SOURCES = \
                common/sckfile.cpp \
                common/sckipc.cpp \
                common/sckstrm.cpp \
+               common/settcmn.cpp \
                common/sizer.cpp \
                common/socket.cpp \
                common/statbar.cpp \
@@ -727,6 +728,7 @@ COMMONOBJS = \
                sckfile.o \
                sckipc.o \
                sckstrm.o \
+               settcmn.o \
                sizer.o \
                socket.o \
                statbar.o \
index c974c316027f8bd272451eb4ec7cb46b530ffc42..e433131f7d93044726ae0d944214d8a4f4d4153e 100644 (file)
@@ -145,6 +145,7 @@ ALL_SOURCES = \
                common/sckfile.cpp \
                common/sckipc.cpp \
                common/sckstrm.cpp \
+               common/settcmn.cpp \
                common/sizer.cpp \
                common/socket.cpp \
                common/statbar.cpp \
@@ -727,6 +728,7 @@ COMMONOBJS = \
                sckfile.o \
                sckipc.o \
                sckstrm.o \
+               settcmn.o \
                sizer.o \
                socket.o \
                statbar.o \
index 78bd42f50925eb92a6bca1280ae40d8b4eaafaf9..ab009e56665a787717a3dac15dc10e893ee95420 100644 (file)
@@ -142,6 +142,7 @@ ALL_SOURCES = \
                common/sckfile.cpp \
                common/sckipc.cpp \
                common/sckstrm.cpp \
+               common/settcmn.cpp \
                common/sizer.cpp \
                common/socket.cpp \
                common/statbar.cpp \
@@ -753,6 +754,7 @@ COMMONOBJS = \
                sckfile.o \
                sckipc.o \
                sckstrm.o \
+               settcmn.o \
                sizer.o \
                socket.o \
                statbar.o \
index 78bd42f50925eb92a6bca1280ae40d8b4eaafaf9..ab009e56665a787717a3dac15dc10e893ee95420 100644 (file)
@@ -142,6 +142,7 @@ ALL_SOURCES = \
                common/sckfile.cpp \
                common/sckipc.cpp \
                common/sckstrm.cpp \
+               common/settcmn.cpp \
                common/sizer.cpp \
                common/socket.cpp \
                common/statbar.cpp \
@@ -753,6 +754,7 @@ COMMONOBJS = \
                sckfile.o \
                sckipc.o \
                sckstrm.o \
+               settcmn.o \
                sizer.o \
                socket.o \
                statbar.o \
index 14552622028f5c84ca8145438e76cb4f57fda2c0..34ba0931ef2caa6a38cadd40099b82e683ae500c 100644 (file)
@@ -146,6 +146,7 @@ ALL_SOURCES = \
                common/sckfile.cpp \
                common/sckipc.cpp \
                common/sckstrm.cpp \
+               common/settcmn.cpp \
                common/sizer.cpp \
                common/socket.cpp \
                common/statbar.cpp \
@@ -628,6 +629,7 @@ COMMONOBJS = \
                sckfile.o \
                sckipc.o \
                sckstrm.o \
+               settcmn.o \
                sizer.o \
                socket.o \
                statbar.o \
index e430120e81cf40624618ad0a20918c926807fc4b..82ffbcd8f457b022a492767653d6c894e1a0fad2 100644 (file)
@@ -188,6 +188,7 @@ COMMONOBJS = &
        sckfile.obj &
        sckipc.obj &
        sckstrm.obj &
+       settcmn.obj &
        sizer.obj &
        socket.obj &
        statbar.obj &
@@ -829,6 +830,9 @@ sckipc.obj:     $(COMMDIR)\sckipc.cpp
 sckstrm.obj:     $(COMMDIR)\sckstrm.cpp
   *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
 
+settcmn.obj:     $(COMMDIR)\settcmn.cpp
+  *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
+
 sizer.obj:     $(COMMDIR)\sizer.cpp
   *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
 
index a44d985f8a22fe52831668b88f461d1d5f6a9ad5..af59915286a369a55cfc12cec95df917363f9cd2 100644 (file)
@@ -143,6 +143,7 @@ ALL_SOURCES = \
                common/sckfile.cpp \
                common/sckipc.cpp \
                common/sckstrm.cpp \
+               common/settcmn.cpp \
                common/sizer.cpp \
                common/socket.cpp \
                common/statbar.cpp \
@@ -722,6 +723,7 @@ COMMONOBJS = \
                sckfile.o \
                sckipc.o \
                sckstrm.o \
+               settcmn.o \
                sizer.o \
                socket.o \
                statbar.o \
index 099680f545b800a4700cd96ddbd80e4cee4adad6..9b4f84677fabc59ef6541409a8fd632198729b32 100644 (file)
@@ -144,6 +144,7 @@ ALL_SOURCES = \
                common/sckfile.cpp \
                common/sckipc.cpp \
                common/sckstrm.cpp \
+               common/settcmn.cpp \
                common/sizer.cpp \
                common/socket.cpp \
                common/statbar.cpp \
@@ -715,6 +716,7 @@ COMMONOBJS = \
                sckfile.o \
                sckipc.o \
                sckstrm.o \
+               settcmn.o \
                sizer.o \
                socket.o \
                statbar.o \
index 69ddf7699a149b295c160131ee316c4ffe9ae04c..15e56d29b6f6c05b10381aa1f0f0cd1507030ba6 100644 (file)
@@ -130,6 +130,7 @@ ALL_SOURCES = \
                common/sckfile.cpp \
                common/sckipc.cpp \
                common/sckstrm.cpp \
+               common/settcmn.cpp \
                common/sizer.cpp \
                common/socket.cpp \
                common/statbar.cpp \
@@ -791,6 +792,7 @@ COMMONOBJS = \
                sckfile.o \
                sckipc.o \
                sckstrm.o \
+               settcmn.o \
                sizer.o \
                socket.o \
                statbar.o \
index 65504b448acab7c499c5f69b5cc4cdc773e994e5..7e01ae2e199bb2d81927d51f5531921725b59b07 100644 (file)
@@ -15,7 +15,7 @@
 # Makefile : Builds wxWindows library wx.lib for MS Windows,
 # and Borland C++ (32-bit).
 
-#BCCDIR now defined in ../makeb32.env
+# BCCDIR now defined in ../makeb32.env
 
 !if "$(WXWIN)" == ""
 !error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
@@ -211,6 +211,7 @@ COMMONOBJS = \
                $(MSWDIR)\sckfile.obj \
                $(MSWDIR)\sckipc.obj \
                $(MSWDIR)\sckstrm.obj \
+               $(MSWDIR)\settcmn.obj \
                $(MSWDIR)\sizer.obj \
                $(MSWDIR)\socket.obj \
                $(MSWDIR)\statbar.obj \
@@ -859,6 +860,8 @@ $(MSWDIR)\sckipc.obj: $(COMMDIR)\sckipc.$(SRCSUFF)
 
 $(MSWDIR)\sckstrm.obj: $(COMMDIR)\sckstrm.$(SRCSUFF)
 
+$(MSWDIR)\settcmn.obj: $(COMMDIR)\settcmn.$(SRCSUFF)
+
 $(MSWDIR)\sizer.obj: $(COMMDIR)\sizer.$(SRCSUFF)
 
 $(MSWDIR)\socket.obj: $(COMMDIR)\socket.$(SRCSUFF)
index 12afb467871b99de613af18eaa3e1266e7e8315e..747967f8c034777f4cfc2376ada3d40636c448f8 100644 (file)
@@ -186,6 +186,7 @@ COMMONOBJS = \
                $(MSWDIR)\radiocmn.obj \
                $(MSWDIR)\regex.obj \
                $(MSWDIR)\resource.obj \
+               $(MSWDIR)\settcmn.obj \
                $(MSWDIR)\sizer.obj \
                $(MSWDIR)\statbar.obj \
                $(MSWDIR)\strconv.obj \
@@ -675,6 +676,8 @@ $(MSWDIR)\regex.obj: $(COMMDIR)\regex.$(SRCSUFF)
 
 $(MSWDIR)\resource.obj: $(COMMDIR)\resource.$(SRCSUFF)
 
+$(MSWDIR)\settcmn.obj: $(COMMDIR)\settcmn.$(SRCSUFF)
+
 $(MSWDIR)\sizer.obj: $(COMMDIR)\sizer.$(SRCSUFF)
 
 $(MSWDIR)\statbar.obj: $(COMMDIR)\statbar.$(SRCSUFF)
index b4a85ff6370ece19f3a2725cd3857537368d5c4e..85e3470379af77f04ee5ffb1ef0f688d694ac517 100644 (file)
@@ -174,6 +174,7 @@ COMMONOBJS2 = \
                $(COMMDIR)\radiocmn.obj \
                $(COMMDIR)\regex.obj \
                $(COMMDIR)\resource.obj \
+               $(COMMDIR)\settcmn.obj \
                $(COMMDIR)\sizer.obj \
                $(COMMDIR)\statbar.obj \
                $(COMMDIR)\strconv.obj \
@@ -1209,6 +1210,11 @@ $(COMMDIR)/resource.obj:     $*.$(SRCSUFF)
 $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
 <<
 
+$(COMMDIR)/settcmn.obj:     $*.$(SRCSUFF)
+        cl @<<
+$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
+<<
+
 $(COMMDIR)/sizer.obj:     $*.$(SRCSUFF)
         cl @<<
 $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
index 61a563ba2ccd4b9921fcb8476af61dfc5c044e39..b95bd786242129f8b6b87793ff84b83ec113163d 100644 (file)
@@ -234,6 +234,7 @@ COMMONOBJS  = \
                $(COMMDIR)/quantize.$(OBJSUFF) \
                $(COMMDIR)/radiocmn.$(OBJSUFF) \
                $(COMMDIR)/resource.$(OBJSUFF) \
+               $(COMMDIR)/settcmn.$(OBJSUFF) \
                $(COMMDIR)/sizer.$(OBJSUFF) \
                $(COMMDIR)/statbar.$(OBJSUFF) \
                $(COMMDIR)/tbarbase.$(OBJSUFF) \
index c3a6362057b148300f3b7dbf14cad3ae33afb38e..8b44a3a4faf9ea72f7fbf39f91177db6377b398c 100644 (file)
@@ -157,6 +157,7 @@ COMMONOBJS = \
                $(COMMDIR)\sckfile.obj \
                $(COMMDIR)\sckipc.obj \
                $(COMMDIR)\sckstrm.obj \
+               $(COMMDIR)\settcmn.obj \
                $(COMMDIR)\sizer.obj \
                $(COMMDIR)\socket.obj \
                $(COMMDIR)\statbar.obj \
index 6a5295a5413ca6f79e376cf27137d77c212df0fa..439458b4d0ce48ecfc245af92ebb92366fcaadf2 100644 (file)
@@ -233,6 +233,7 @@ COMMONOBJS = \
                $(COMMDIR)\$D\sckfile.obj \
                $(COMMDIR)\$D\sckipc.obj \
                $(COMMDIR)\$D\sckstrm.obj \
+               $(COMMDIR)\$D\settcmn.obj \
                $(COMMDIR)\$D\sizer.obj \
                $(COMMDIR)\$D\socket.obj \
                $(COMMDIR)\$D\statbar.obj \
index 87d43e0b6e3032d543b0e6b599102df49ba11d1d..70c77aaf2b04bf01ea8269fdd109cd25182f9718 100644 (file)
@@ -195,6 +195,7 @@ COMMONOBJS = &
        sckfile.obj &
        sckipc.obj &
        sckstrm.obj &
+       settcmn.obj &
        sizer.obj &
        socket.obj &
        statbar.obj &
@@ -1031,6 +1032,9 @@ sckipc.obj:     $(COMMDIR)\sckipc.cpp
 sckstrm.obj:     $(COMMDIR)\sckstrm.cpp
   *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
 
+settcmn.obj:     $(COMMDIR)\settcmn.cpp
+  *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
+
 sizer.obj:     $(COMMDIR)\sizer.cpp
   *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
 
index b06789a25d7ee39caad11d32bd2c52fe0e05a8c9..6306d33ac5a2897a90dfd253a27aab5421b6c028 100644 (file)
@@ -34,6 +34,7 @@
     #include "wx/dcscreen.h"
     #include "wx/button.h"
     #include "wx/validate.h"
+    #include "wx/settings.h"
 #endif
 
 #include "wx/univ/renderer.h"
@@ -136,15 +137,16 @@ wxSize wxButton::DoGetBestClientSize() const
     }
 
     // for compatibility with other ports, the buttons default size is never
-    // less than the standard one
-#ifndef __WXX11__
-    if ( !(GetWindowStyle() & wxBU_EXACTFIT) )
+    // less than the standard one, but not when display not PDAs.
+    if (wxSystemSettings::GetScreen() < wxSYS_SCREEN_PDA)
     {
-        wxSize szDef = GetDefaultSize();
-        if ( width < szDef.x )
-            width = szDef.x;
+        if ( !(GetWindowStyle() & wxBU_EXACTFIT) )
+        {
+            wxSize szDef = GetDefaultSize();
+            if ( width < szDef.x )
+                width = szDef.x;
+        }
     }
-#endif
 
     return wxSize(width, height);
 }
index f5e5ea109e160daa56991100da928ae48820e3d7..9fb840a5192019b017f8af3cd12352c1285bbe75 100644 (file)
@@ -477,6 +477,10 @@ SOURCE=.\common\sckstrm.cpp
 # End Source File
 # Begin Source File
 
+SOURCE=.\common\settcmn.cpp
+# End Source File
+# Begin Source File
+
 SOURCE=.\common\sizer.cpp
 # End Source File
 # Begin Source File
index f19a8149d236be757cc624801648b615facc0636..dedd7c444154c5891653eb55cd7e3332d90d6fdb 100644 (file)
@@ -636,6 +636,10 @@ SOURCE=.\common\sckstrm.cpp
 # End Source File
 # Begin Source File
 
+SOURCE=.\common\settcmn.cpp
+# End Source File
+# Begin Source File
+
 SOURCE=.\common\sizer.cpp
 # End Source File
 # Begin Source File
index 39055001e673f337cca3df33d075c15fb12d4b01..5bcedfd5aef03c032d1444d422714fd5bd0c3b31 100644 (file)
@@ -177,6 +177,7 @@ ALL_SOURCES = \
                common/sckfile.cpp \
                common/sckipc.cpp \
                common/sckstrm.cpp \
+               common/settcmn.cpp \
                common/sizer.cpp \
                common/socket.cpp \
                common/statbar.cpp \
@@ -742,6 +743,7 @@ COMMONOBJS = \
                sckfile.o \
                sckipc.o \
                sckstrm.o \
+               settcmn.o \
                sizer.o \
                socket.o \
                statbar.o \