mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-03-14 06:31:31 +00:00
Check for invalid filenames and in case, reset to the original file name.
This commit is contained in:
parent
1541788856
commit
76b8316b5c
2 changed files with 18 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
2021-02-03 Riccardo Mottola <rm@gnu.org>
|
||||
|
||||
* Framework/PCProjectInspector.m
|
||||
Check for invalid filenames and in case, reset to the original
|
||||
file name.
|
||||
|
||||
2021-02-03 Riccardo Mottola <rm@gnu.org>
|
||||
|
||||
* Framework/PCEditorManager.m:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
|
||||
|
||||
Copyright (C) 2000-2010 Free Software Foundation
|
||||
Copyright (C) 2000-2021 Free Software Foundation
|
||||
|
||||
Authors: Philippe C.D. Robert
|
||||
Serg Stoyan
|
||||
|
@ -977,10 +977,20 @@
|
|||
|
||||
- (void)fileNameDidChange:(id)sender
|
||||
{
|
||||
if ([fileName isEqualToString:[fileNameField stringValue]])
|
||||
NSString *newName;
|
||||
|
||||
newName = [fileNameField stringValue];
|
||||
if ([fileName isEqualToString:newName])
|
||||
{
|
||||
[fileNameField setStringValue:fileName];
|
||||
return;
|
||||
}
|
||||
if ([[newName stringByTrimmingCharactersInSet:
|
||||
[NSCharacterSet whitespaceAndNewlineCharacterSet]] length] == 0)
|
||||
{
|
||||
[fileNameField setStringValue:fileName];
|
||||
return NO;
|
||||
}
|
||||
|
||||
/* PCLogInfo(self, @"{%@} file name changed from: %@ to: %@",
|
||||
[project projectName], fileName, [fileNameField stringValue]);*/
|
||||
|
|
Loading…
Reference in a new issue