Author: pschweitzer
Date: Mon Dec 24 22:24:38 2007
New Revision: 31423
URL:
http://svn.reactos.org/svn/reactos?rev=31423&view=rev
Log:
If entered directory doesn't exist, create it on user demand
Modified:
trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/de-DE.rc
trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/en-US.rc
trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/fr-FR.rc
trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/ru-RU.rc
trunk/tools/RosBE/RosBE-Windows/Tools/config/options.c
trunk/tools/RosBE/RosBE-Windows/Tools/config/resources.h
Modified: trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Tools/co…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/de-DE.rc (original)
+++ trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/de-DE.rc Mon Dec 24 22:24:38 2007
@@ -50,7 +50,7 @@
CLR15, "Weiß"
MSG_NOGCCFOUND, "Kein MinGW/GCC Compiler gefunden! Bitte überprüfen sie ihren
Pfad."
MSG_FILEFAILED, "rosbe-options.cmd konnte nicht erstellt werden!"
- MSG_DIREFAILED, "Log directory konnte nicht erstellt werden!"
+ MSG_DIREFAILED, "Directory konnte nicht erstellt werden!"
MSG_SETLOADSUC, "Vorherige Einstellungen erfolgreich geladen."
MSG_FINDLOGDIR, "Bitte wählen Sie einen Ordner, in dem die Logs gespeichert werden
sollen:"
MSG_FINDMGWDIR, "Bitte wählen Sie den Ordner, in dem MinGW/GCC liegt:"
@@ -58,6 +58,7 @@
MSG_FINDOUTDIR, "Bitte wählen Sie den Ordner, in den Sie die OUT Daten speichern
wollen:"
MSG_WARNINGBOX, "Warnung"
MSG_EXITCHANGE, "Sind Sie sicher, dass das Programm beenden wollen ohne zu
speichern?"
+ MSG_INVALIDDIR, "The directory you entered doesn't exist. Do you want to
create it?"
/* Help Strings */
HLP_BACKCOLORC, "Auswählen der Hintergrundfarbe des RosBE DOS Fensters."
HLP_FONTCOLORC, "Auswählen der Schriftfarbe des RosBE DOS Fensters."
Modified: trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Tools/co…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/en-US.rc (original)
+++ trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/en-US.rc Mon Dec 24 22:24:38 2007
@@ -50,7 +50,7 @@
CLR15, "Bright White"
MSG_NOGCCFOUND, "No MinGW/GCC found! Please check your directory."
MSG_FILEFAILED, "Failed to create rosbe-options.cmd!"
- MSG_DIREFAILED, "Failed to create log directory!"
+ MSG_DIREFAILED, "Failed to create directory!"
MSG_SETLOADSUC, "Previous settings loaded successfully."
MSG_FINDLOGDIR, "Please choose a directory where the the logs should be
stored:"
MSG_FINDMGWDIR, "Please choose the directory where MinGW/GCC is located:"
@@ -58,6 +58,7 @@
MSG_FINDOUTDIR, "Please choose the directory where you want to save OUT Files
to:"
MSG_WARNINGBOX, "Warning"
MSG_EXITCHANGE, "Are you sure you want to exit without saving?"
+ MSG_INVALIDDIR, "The directory you entered doesn't exist. Do you want to
create it?"
/* Help Strings */
HLP_BACKCOLORC, "Choose background color for RosBE DOS windows."
HLP_FONTCOLORC, "Choose font color for RosBE DOS windows."
Modified: trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/fr-FR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Tools/co…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/fr-FR.rc (original)
+++ trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/fr-FR.rc Mon Dec 24 22:24:38 2007
@@ -50,7 +50,7 @@
CLR15, "Blanc Brillant"
MSG_NOGCCFOUND, "Impossible de trouver MinGW/GCC ! Veuillez vérifier votre
répertoire."
MSG_FILEFAILED, "Impossible de créer rosbe-options.cmd !"
- MSG_DIREFAILED, "Impossible de créer le répertoire pour le journal !"
+ MSG_DIREFAILED, "Impossible de créer le répertoire !"
MSG_SETLOADSUC, "Paramètres précédents chargés avec succès."
MSG_FINDLOGDIR, "Veuillez choisir le répertoire où seront stockés les journaux
:"
MSG_FINDMGWDIR, "Veuillez sélectionner le répertoire où se situe MingW/GCC
:"
@@ -58,6 +58,7 @@
MSG_FINDOUTDIR, "Veuillez choisir le répertoire où vous désirez sauver les
fichiers OUT :"
MSG_WARNINGBOX, "Attention"
MSG_EXITCHANGE, "Êtes-vous sûr de vouloir quitter sans sauvegarder ?"
+ MSG_INVALIDDIR, "The directory you entered doesn't exist. Do you want to
create it?"
/* Help Strings */
HLP_BACKCOLORC, "Choisissez la couleur de fond pour les fenêtres DOS du
RosBE."
HLP_FONTCOLORC, "Choisissez la couleur du texte pour les fenêtres DOS du
RosBE."
Modified: trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/ru-RU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Tools/co…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/ru-RU.rc (original)
+++ trunk/tools/RosBE/RosBE-Windows/Tools/config/lang/ru-RU.rc Mon Dec 24 22:24:38 2007
@@ -52,7 +52,7 @@
CLR15, "ßðêî-áåëûé"
MSG_NOGCCFOUND, "Êîìïèëÿòîð GCC íå íàéäåí! Ïðîâåðüòå ïðàâèëüíîñòü
óñòàíîâêè."
MSG_FILEFAILED, "Íåâîçìîæíî ñîçäàòü ôàéë rosbe-options.cmd"
- MSG_DIREFAILED, "Íåâîçìîæíî ñîçäàòü ïàïêó äëÿ ëîãîâ!"
+ MSG_DIREFAILED, "Failed to create directory!"
MSG_SETLOADSUC, "Ðàíåå ñîõðàíåííûå íàñòðîéêè çàãðóæåíû."
MSG_FINDLOGDIR, "Óêàæèòå êàòàëîã ñîõðàíåíèÿ ëîã-ôàéëîâ:"
MSG_FINDMGWDIR, "Óêàæèòå êàòàëîã ðàñïîëîæåíèÿ êîìïèëÿòîðà MinGW:"
@@ -60,6 +60,7 @@
MSG_FINDOUTDIR, "Óêàæèòå êàòàëîã ñîõðàíåíèÿ êîìïèëèðîâàííûõ ôàéëîâ:"
MSG_WARNINGBOX, "Âíèìàíèå!"
MSG_EXITCHANGE, "Âû çàêðûâàåòå ïðîãðàììó íå ñîõðàíèâ íàñòðîéêè?"
+ MSG_INVALIDDIR, "The directory you entered doesn't exist. Do you want to
create it?"
/* Help Strings */
HLP_BACKCOLORC, "Âûáåðèòå öâåò ôîíà â îêíå êîíñîëè RosBE"
HLP_FONTCOLORC, "Âûáåðèòå öâåò øðèôòà â îêíå êîíñîëè RosBE"
Modified: trunk/tools/RosBE/RosBE-Windows/Tools/config/options.c
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Tools/co…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Tools/config/options.c (original)
+++ trunk/tools/RosBE/RosBE-Windows/Tools/config/options.c Mon Dec 24 22:24:38 2007
@@ -37,7 +37,7 @@
if (writelog && (logdir[0] != 0))
if (0 > (LONG)GetFileAttributes(logdir))
- if (CreateDirectoryW(logdir, NULL) == 0)
+ if (CreateDirectory(logdir, NULL) == 0)
{
LoadString(hInstance, MSG_DIREFAILED, msgerror, 256);
MessageBox(hwnd, msgerror, NULL, MB_ICONERROR);
@@ -257,6 +257,26 @@
INT CALLBACK
BrowseProc(HWND Dlg, UINT Msg, WPARAM wParam, LPARAM lParam)
{
+ if ((Msg == BFFM_VALIDATEFAILED) && (lParam != ID_MGWDIR))
+ {
+ WCHAR BoxMsg[256], BoxTitle[128];
+ HWND hwndParent;
+ hwndParent = GetWindow(Dlg, GW_OWNER);
+ LoadString(hInstance, MSG_WARNINGBOX, BoxTitle, 128);
+ LoadString(hInstance, MSG_INVALIDDIR, BoxMsg, 256);
+ if (MessageBox(Dlg, BoxMsg, BoxTitle, MB_ICONWARNING | MB_YESNO) == IDYES)
+ {
+ if (CreateDirectory((LPWSTR)wParam, NULL) == 0)
+ {
+ LoadString(hInstance, MSG_DIREFAILED, BoxMsg, 256);
+ MessageBox(Dlg, BoxMsg, NULL, MB_ICONERROR);
+ }
+ else
+ {
+ SetDlgItemText(hwndParent, lParam, (LPWSTR)wParam);
+ }
+ }
+ }
return FALSE;
}
@@ -348,6 +368,7 @@
PathInfo.hwndOwner = Dlg;
PathInfo.ulFlags = BIF_EDITBOX | BIF_VALIDATE;
PathInfo.lpfn = (BFFCALLBACK)BrowseProc;
+ PathInfo.lParam = ID_LOGDIR;
#if 0
SHGetSpecialFolderLocation(NULL, CSIDL_PROGRAM_FILES,
&pidl);
PathInfo.pidlRoot = pidl;
@@ -370,6 +391,7 @@
Control = ID_OUTDIR;
IDText = MSG_FINDOUTDIR;
}
+ PathInfo.lParam = Control;
#if 0
hDLL = LoadLibrary(L"shell32.dll");
if (hDLL)
Modified: trunk/tools/RosBE/RosBE-Windows/Tools/config/resources.h
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Tools/co…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Tools/config/resources.h (original)
+++ trunk/tools/RosBE/RosBE-Windows/Tools/config/resources.h Mon Dec 24 22:24:38 2007
@@ -61,18 +61,19 @@
#define MSG_FINDOUTDIR 0x2e
#define MSG_WARNINGBOX 0x2f
#define MSG_EXITCHANGE 0x30
+#define MSG_INVALIDDIR 0x31
/* Help Strings */
-#define HLP_BACKCOLORC 0x31
-#define HLP_FONTCOLORC 0x32
-#define HLP_SBUILDTIME 0x33
-#define HLP_CCACHEUSED 0x34
-#define HLP_STRIPEDEXE 0x35
-#define HLP_FINDMGWDIR 0x36
-#define HLP_FINDLOGDIR 0x37
-#define HLP_FINDOBJDIR 0x38
-#define HLP_FINDOUTDIR 0x39
-#define HLP_SAVEBUTTON 0x3a
-#define HLP_QUITBUTTON 0x3b
-#define HLP_DEFAULTMSG 0x3c
+#define HLP_BACKCOLORC 0x32
+#define HLP_FONTCOLORC 0x33
+#define HLP_SBUILDTIME 0x34
+#define HLP_CCACHEUSED 0x35
+#define HLP_STRIPEDEXE 0x36
+#define HLP_FINDMGWDIR 0x37
+#define HLP_FINDLOGDIR 0x38
+#define HLP_FINDOBJDIR 0x39
+#define HLP_FINDOUTDIR 0x3a
+#define HLP_SAVEBUTTON 0x3b
+#define HLP_QUITBUTTON 0x3c
+#define HLP_DEFAULTMSG 0x3d