]> git.saurik.com Git - wxWidgets.git/commitdiff
improved dialup manager, added wxALL_FILES define
authorKarsten Ballüder <ballueder@usa.net>
Thu, 21 Oct 1999 15:00:17 +0000 (15:00 +0000)
committerKarsten Ballüder <ballueder@usa.net>
Thu, 21 Oct 1999 15:00:17 +0000 (15:00 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4111 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/defs.h
include/wx/proplist.h
src/unix/dialup.cpp

index d638ba2db39fe30d1203a974f8fd16710839b11e..18aefbaaef007207d2164d191dca97f8c012aa25 100644 (file)
     #pragma interface "defs.h"
 #endif
 
+
+// needed to handle strings with xgettext:
+#ifndef gettext_noop
+#  define gettext_noop(x) x
+#endif
+
 // ----------------------------------------------------------------------------
 // compiler and OS identification
 // ----------------------------------------------------------------------------
@@ -1505,6 +1511,16 @@ typedef enum {
     wxPRINT_MODE_PRINTER = 3    // Send to printer
 } wxPrintMode;
 
+// ---------------------------------------------------------------------------
+// Macro to specify "All Files" on different platforms
+// ---------------------------------------------------------------------------
+#if defined(__WXMSW__)
+#   define wxALL_FILES_PATTERN   "*.*"
+#   define wxALL_FILES           gettext_noop("All files (*.*)|*.*")
+#else
+#   define wxALL_FILES_PATTERN   "*"
+#   define wxALL_FILES           gettext_noop("All files (*)|*")
+#endif
 // ---------------------------------------------------------------------------
 // macros that enable wxWindows apps to be compiled in absence of the
 // sytem headers, although some platform specific types are used in the
index f5eaa7b0faecbe87e57869ec6a9b38762eb67184..023c0517669e5cf9df24835d2698b0c12b093ff4 100644 (file)
@@ -478,7 +478,7 @@ class WXDLLEXPORT wxFilenameListValidator: public wxPropertyListValidator
 {
   DECLARE_DYNAMIC_CLASS(wxFilenameListValidator)
  public:
-   wxFilenameListValidator(wxString message = "Select a file", wxString wildcard = "*.*", long flags = 0);
+   wxFilenameListValidator(wxString message = "Select a file", wxString wildcard = wxALL_FILES_PATTERN, long flags = 0);
 
    ~wxFilenameListValidator(void);
 
index a46ef04b1e8ceddcf82346ab1898964b6c1d634b..2dac8544b89e67ee3e155386c1556fb97098da2e 100644 (file)
@@ -32,6 +32,7 @@
 #include "wx/process.h"
 #include "wx/intl.h"
 #include "wx/app.h"
+#include "wx/wxchar.h"
 
 #include <stdlib.h>
 
@@ -245,6 +246,12 @@ wxDialUpManagerImpl::wxDialUpManagerImpl()
    m_CanUseIfconfig = -1; // unknown
    m_BeaconHost = WXDIALUP_MANAGER_DEFAULT_BEACONHOST;
    m_BeaconPort = 80;
+   SetConnectCommand("pon", "poff"); // default values for Debian/GNU linux
+   wxChar * dial = wxGetenv(_T("WXDIALUP_DIALCMD"));
+   wxChar * hup = wxGetenv(_T("WXDIALUP_HUPCMD"));
+   if(dial || hup)
+      SetConnectCommand(dial ? wxString(dial) : m_ConnectCommand,
+                        hup ? wxString(hup) : m_HangUpCommand); 
 }
 
 wxDialUpManagerImpl::~wxDialUpManagerImpl()