]> git.saurik.com Git - wxWidgets.git/commitdiff
Added missing wxGetFullHostName() and wxNO_DEFAULT for generic msgdialog
authorKarsten Ballüder <ballueder@usa.net>
Sun, 13 Jun 1999 16:04:54 +0000 (16:04 +0000)
committerKarsten Ballüder <ballueder@usa.net>
Sun, 13 Jun 1999 16:04:54 +0000 (16:04 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2768 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/defs.h
include/wx/utils.h
samples/richedit/wxlwindow.cpp
src/common/utilscmn.cpp
src/generic/msgdlgg.cpp

index f0d84c9a8bedbb53b948ca19d13abd6846d9ff4e..3bc4487512db8245d82a7e7bc93db6720a1904a8 100644 (file)
@@ -905,11 +905,12 @@ typedef enum
 #define wxCANCEL            0x0004
 #define wxYES               0x0008
 #define wxNO                0x0010
-
-#define wxICON_EXCLAMATION  0x0020
-#define wxICON_HAND         0x0040
-#define wxICON_QUESTION     0x0080
-#define wxICON_INFORMATION  0x0100
+#define wxNO_DEFAULT        0x0020
+#define wxYES_DEFAULT       0x0000  // has no effect
+#define wxICON_EXCLAMATION  0x0040
+#define wxICON_HAND         0x0080
+#define wxICON_QUESTION     0x0100
+#define wxICON_INFORMATION  0x0200
 
 #define wxICON_STOP         wxICON_HAND
 #define wxICON_ASTERISK     wxICON_INFORMATION
index 02ce0c40991738498ce7584f4774d961e3e5309a..4a11fd3316118ec73768f189790ebf211e5ce25c 100644 (file)
@@ -196,6 +196,7 @@ WXDLLEXPORT wxString wxGetHostName();
 
 // Get FQDN
 WXDLLEXPORT wxString wxGetFullHostName();
+WXDLLEXPORT bool wxGetFullHostName(wxChar *buf, int maxSize);
 
 // Get user ID e.g. jacs (this is known as login name under Unix)
 WXDLLEXPORT bool wxGetUserId(wxChar *buf, int maxSize);
index 07e6e01cde7323eaf022940e3e8704a22dc6d920..db44c83da30725cd18372e871369cd21d0074622 100644 (file)
@@ -208,6 +208,7 @@ wxLayoutWindow::Clear(int family,
 {
    GetLayoutList()->Clear(family,size,style,weight,underline,fg,bg);
    SetBackgroundColour(GetLayoutList()->GetDefaultStyleInfo().GetBGColour());
+   wxScrolledWindow::Clear();
    ResizeScrollbars(true);
    SetDirty();
    SetModified(false);
index 68f0d945f5ad68ac5de33dfb1a08d60651020246..1dffad113ce7d656c7e24408c302a4437ee42d8f 100644 (file)
@@ -901,3 +901,18 @@ wxString wxGetHostName()
     return buf;
 }
 
+wxString wxGetFullHostName()
+{
+    static const size_t hostnameSize = 257;
+
+    wxString buf;
+    bool ok = wxGetFullHostName(buf.GetWriteBuf(hostnameSize), hostnameSize);
+
+    buf.UngetWriteBuf();
+
+    if ( !ok )
+        buf.Empty();
+
+    return buf;
+}
+
index 7cf987fd15951175e781351ce7807e2ed73e75d2..996646d91521d8c2684c6449f372300ca90a61b3 100644 (file)
@@ -131,8 +131,16 @@ wxGenericMessageDialog::wxGenericMessageDialog( wxWindow *parent, const wxString
     }
     else if (yes)
     {
-        yes->SetDefault();
-        yes->SetFocus();
+       if(style & wxNO_DEFAULT)
+       {
+          no->SetDefault();
+          no->SetFocus();
+       }
+       else
+       {
+          yes->SetDefault();
+          yes->SetFocus();
+       }
     }
     
     int w = m_buttons.GetCount() * 100;