izdubar avatar izdubar committed 3a95d38

when creating a new VMC, the gEnableRenameDelete option should not be applied

Comments (0)

Files changed (2)

 	{UI_SPLITTER},
 	{UI_BUTTON, VMC_BUTTON_CREATE, 1, -1, {.label = {NULL, -1}}},
 
-	{UI_SPLITTER},
+	{UI_SPLITTER}, // UIItem #22
 	{UI_BUTTON, VMC_BUTTON_DELETE, 1, -1, {.label = {NULL, _STR_DELETE}}},
 
 	// end of dialog
 
 
 	if (size != -1) {
-		diaVMC[22].type = UI_SPLITTER;
 		diaSetLabel(diaVMC, VMC_BUTTON_CREATE, _l(_STR_MODIFY));
 		diaSetLabel(diaVMC, VMC_STATUS, _l(_STR_VMC_FILE_EXISTS));
 
 			diaSetInt(diaVMC, VMC_SIZE, 0);
 			diaSetLabel(diaVMC, VMC_STATUS, _l(_STR_VMC_FILE_ERROR));
 		}
+
+		if (gEnableDandR) {
+			diaSetEnabled(diaVMC, VMC_SIZE, 1);
+			diaVMC[22].type = UI_SPLITTER;
+		}
+		else {
+			diaSetEnabled(diaVMC, VMC_SIZE, 0);
+			diaVMC[22].type = UI_TERMINATOR;
+		}
 	}
 	else {
-		diaVMC[22].type = UI_TERMINATOR;
 		diaSetLabel(diaVMC, VMC_BUTTON_CREATE, _l(_STR_CREATE));
 		diaSetLabel(diaVMC, VMC_STATUS, _l(_STR_VMC_FILE_NEW));
+
 		diaSetInt(diaVMC, VMC_SIZE, 0);
-	}
-
-	if (gEnableDandR)
 		diaSetEnabled(diaVMC, VMC_SIZE, 1);
-	else {
-		diaSetEnabled(diaVMC, VMC_SIZE, 0);
 		diaVMC[22].type = UI_TERMINATOR;
 	}
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.