17 |
* along with WinPT; if not, write to the Free Software Foundation, |
* along with WinPT; if not, write to the Free Software Foundation, |
18 |
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
19 |
*/ |
*/ |
|
|
|
20 |
#ifdef HAVE_CONFIG_H |
#ifdef HAVE_CONFIG_H |
21 |
#include <config.h> |
#include <config.h> |
22 |
#endif |
#endif |
309 |
{ |
{ |
310 |
struct stat statbuf; |
struct stat statbuf; |
311 |
|
|
312 |
if( stat( dir, &statbuf ) == -1 ) |
if (stat (dir, &statbuf) == -1) |
313 |
return WPTERR_GENERAL; |
return WPTERR_GENERAL; |
314 |
if( statbuf.st_mode & _S_IFDIR ) |
if (statbuf.st_mode & _S_IFDIR) |
315 |
return 0; |
return 0; |
316 |
return WPTERR_GENERAL; |
return WPTERR_GENERAL; |
317 |
} |
} |
370 |
/* Start a dialog with the exception that before it is checked that the |
/* Start a dialog with the exception that before it is checked that the |
371 |
dialog is not already openened. */ |
dialog is not already openened. */ |
372 |
int |
int |
373 |
dialog_box_param( HINSTANCE hinst, LPCTSTR name, HWND parent, DLGPROC fnc, |
dialog_box_param (HINSTANCE hinst, LPCTSTR name, HWND parent, DLGPROC fnc, |
374 |
LPARAM param, LPCTSTR title, int title_id ) |
LPARAM param, LPCTSTR title, int title_id) |
375 |
{ |
{ |
376 |
#ifndef LANG_DE |
if (FindWindowEx (GetDesktopWindow (), NULL, NULL, title)) |
|
if( FindWindowEx( GetDesktopWindow(), NULL, NULL, title ) ) |
|
|
return -1; |
|
|
#else |
|
|
char strdesc[256]; |
|
|
LoadString( glob_hinst, title_id, strdesc, sizeof (strdesc) -1 ); |
|
|
if( FindWindowEx( GetDesktopWindow(), NULL, NULL, strdesc ) ) |
|
377 |
return -1; |
return -1; |
378 |
#endif |
return DialogBoxParam (hinst, name, parent, fnc, param); |
379 |
|
} |
|
return DialogBoxParam( hinst, name, parent, fnc, param ); |
|
|
} /* dialog_box_param */ |
|
380 |
|
|
381 |
|
|
382 |
/* Wrapper for message box which forces the message box into the |
/* Wrapper for message box which forces the message box into the |