From: Karsten Ballüder Date: Thu, 21 Oct 1999 15:00:17 +0000 (+0000) Subject: improved dialup manager, added wxALL_FILES define X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/2c41c4404c0d4ec0a0095bc31ab6cc732f2126c1?ds=sidebyside;hp=572c6194d35ad2791c71aee05d6996da2761b07a improved dialup manager, added wxALL_FILES define git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4111 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/defs.h b/include/wx/defs.h index d638ba2db3..18aefbaaef 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -16,6 +16,12 @@ #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 diff --git a/include/wx/proplist.h b/include/wx/proplist.h index f5eaa7b0fa..023c051766 100644 --- a/include/wx/proplist.h +++ b/include/wx/proplist.h @@ -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); diff --git a/src/unix/dialup.cpp b/src/unix/dialup.cpp index a46ef04b1e..2dac8544b8 100644 --- a/src/unix/dialup.cpp +++ b/src/unix/dialup.cpp @@ -32,6 +32,7 @@ #include "wx/process.h" #include "wx/intl.h" #include "wx/app.h" +#include "wx/wxchar.h" #include @@ -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()