mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-03-18 08:33:06 +00:00
Added files PCAddFilesPanel.[hm]. Fixed bug #11478
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@20515 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
9cab0f9822
commit
7ece56461a
12 changed files with 185 additions and 141 deletions
|
@ -17,6 +17,9 @@
|
|||
* Library/PCProjectBrowser.m:
|
||||
(doubleClick:): Don't try to open libraries.
|
||||
|
||||
* Modules/ApplicationProject/Resources/Main.gorm: Connect delegate to
|
||||
AppController (bug #11478).
|
||||
|
||||
2004-12-24 Serg Stoyan <stoyan255@ukr.net>
|
||||
|
||||
* "Build Tool" setting from Project Inspector was moved to PC
|
||||
|
|
54
Library/PCAddFilesPanel.h
Normal file
54
Library/PCAddFilesPanel.h
Normal file
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.gnustep.org
|
||||
|
||||
Copyright (C) 2004 Free Software Foundation
|
||||
|
||||
Authors: Serg Stoyan
|
||||
|
||||
This file is part of GNUstep.
|
||||
|
||||
This application is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This application is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
|
||||
*/
|
||||
|
||||
#ifndef _PCAddFilesPanel_h
|
||||
#define _PCAddFilesPanel_h
|
||||
|
||||
#include <Foundation/Foundation.h>
|
||||
#include <AppKit/AppKit.h>
|
||||
|
||||
@interface PCAddFilesPanel : NSOpenPanel
|
||||
{
|
||||
NSBox *fileTypeAccessaryView;
|
||||
NSPopUpButton *fileTypePopup;
|
||||
}
|
||||
|
||||
+ (PCAddFilesPanel *)addFilesPanel;
|
||||
|
||||
- (void)setCategories:(NSArray *)categories;
|
||||
- (void)selectCategory:(NSString *)category;
|
||||
- (NSString *)selectedCategory;
|
||||
- (void)setFileTypes:(NSArray *)fileTypes;
|
||||
|
||||
- (void)filesForAddPopupClicked:(id)sender;
|
||||
|
||||
@end
|
||||
|
||||
@interface NSObject (PCAddFilesPanelDelegate)
|
||||
|
||||
- (void)categoryChangedTo:(NSString *)category;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
114
Library/PCAddFilesPanel.m
Normal file
114
Library/PCAddFilesPanel.m
Normal file
|
@ -0,0 +1,114 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.gnustep.org
|
||||
|
||||
Copyright (C) 2004 Free Software Foundation
|
||||
|
||||
Authors: Serg Stoyan
|
||||
|
||||
This file is part of GNUstep.
|
||||
|
||||
This application is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This application is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
|
||||
*/
|
||||
|
||||
#include "PCLogController.h"
|
||||
#include "PCAddFilesPanel.h"
|
||||
|
||||
static PCAddFilesPanel *addFilesPanel = nil;
|
||||
|
||||
@implementation PCAddFilesPanel
|
||||
|
||||
+ (PCAddFilesPanel *)addFilesPanel
|
||||
{
|
||||
if (addFilesPanel == nil)
|
||||
{
|
||||
addFilesPanel = [[self alloc] init];
|
||||
}
|
||||
|
||||
return addFilesPanel;
|
||||
}
|
||||
|
||||
// --- "Add Files..." panel
|
||||
- (id)init
|
||||
{
|
||||
NSRect fr;
|
||||
|
||||
self = [super init];
|
||||
|
||||
fr = NSMakeRect(20,30,160,21);
|
||||
|
||||
// File type popup
|
||||
fileTypePopup = [[NSPopUpButton alloc] initWithFrame:fr pullsDown:NO];
|
||||
[fileTypePopup setRefusesFirstResponder:YES];
|
||||
[fileTypePopup setAutoenablesItems:NO];
|
||||
[fileTypePopup setTarget:self];
|
||||
[fileTypePopup setAction:@selector(filesForAddPopupClicked:)];
|
||||
[fileTypePopup selectItemAtIndex:0];
|
||||
|
||||
fileTypeAccessaryView = [[NSBox alloc] init];
|
||||
[fileTypeAccessaryView setTitle:@"File Types"];
|
||||
[fileTypeAccessaryView setTitlePosition:NSAtTop];
|
||||
[fileTypeAccessaryView setBorderType:NSGrooveBorder];
|
||||
[fileTypeAccessaryView addSubview:fileTypePopup];
|
||||
[fileTypeAccessaryView sizeToFit];
|
||||
[fileTypeAccessaryView setAutoresizingMask:NSViewMinXMargin
|
||||
| NSViewMaxXMargin];
|
||||
|
||||
// Panel
|
||||
[self setAllowsMultipleSelection:YES];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)setCategories:(NSArray *)categories
|
||||
{
|
||||
[fileTypePopup addItemsWithTitles:categories];
|
||||
}
|
||||
|
||||
- (void)selectCategory:(NSString *)category
|
||||
{
|
||||
[self setAccessoryView:fileTypeAccessaryView];
|
||||
[fileTypePopup selectItemWithTitle:category];
|
||||
[self filesForAddPopupClicked:self];
|
||||
}
|
||||
|
||||
- (NSString *)selectedCategory
|
||||
{
|
||||
return [fileTypePopup titleOfSelectedItem];
|
||||
}
|
||||
|
||||
- (void)setFileTypes:(NSArray *)fileTypes
|
||||
{
|
||||
NSString *path = nil;
|
||||
|
||||
ASSIGN(_fileTypes, fileTypes);
|
||||
|
||||
path = [_browser path];
|
||||
[self validateVisibleColumns];
|
||||
[_browser setPath:path];
|
||||
|
||||
[self display];
|
||||
}
|
||||
|
||||
- (void)filesForAddPopupClicked:(id)sender
|
||||
{
|
||||
NSString *category = [fileTypePopup titleOfSelectedItem];
|
||||
|
||||
if ([_delegate respondsToSelector:@selector(categoryChangedTo:)])
|
||||
{
|
||||
[_delegate categoryChangedTo:category];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,141 +1,74 @@
|
|||
{
|
||||
"## Comment" = "Do NOT change this file, Gorm maintains it";
|
||||
FirstResponder = {
|
||||
Actions = (
|
||||
"activateContextHelpMode:",
|
||||
"alignCenter:",
|
||||
"alignJustified:",
|
||||
"alignLeft:",
|
||||
"alignRight:",
|
||||
"arrangeInFront:",
|
||||
"cancel:",
|
||||
"capitalizeWord:",
|
||||
"changeColor:",
|
||||
"checkSpelling:",
|
||||
"close:",
|
||||
"complete:",
|
||||
"copy:",
|
||||
"copyFont:",
|
||||
"copyRuler:",
|
||||
"cut:",
|
||||
"delete:",
|
||||
"deleteBackward:",
|
||||
"deleteForward:",
|
||||
"deleteToBeginningOfLine:",
|
||||
"deleteToBeginningOfParagraph:",
|
||||
"deleteToEndOfLine:",
|
||||
"deleteToEndOfParagraph:",
|
||||
"deleteToMark:",
|
||||
"deleteWordBackward:",
|
||||
"deleteWordForward:",
|
||||
"deminiaturize:",
|
||||
"deselectAll:",
|
||||
"fax:",
|
||||
"hide:",
|
||||
"hideOtherApplications:",
|
||||
"indent:",
|
||||
"loosenKerning:",
|
||||
"lowerBaseline:",
|
||||
"lowercaseWord:",
|
||||
"makeKeyAndOrderFront:",
|
||||
"miniaturize:",
|
||||
"miniaturizeAll:",
|
||||
"moveBackward:",
|
||||
"moveBackwardAndModifySelection:",
|
||||
"moveDown:",
|
||||
"moveDownAndModifySelection:",
|
||||
"moveForward:",
|
||||
"moveForwardAndModifySelection:",
|
||||
"moveLeft:",
|
||||
"moveRight:",
|
||||
"moveToBeginningOfDocument:",
|
||||
"moveToBeginningOfLine:",
|
||||
"moveToBeginningOfParagraph:",
|
||||
"moveToEndOfDocument:",
|
||||
"moveToEndOfLine:",
|
||||
"moveToEndOfParagraph:",
|
||||
"moveUp:",
|
||||
"moveUpAndModifySelection:",
|
||||
"moveWordBackward:",
|
||||
"moveWordBackwardAndModifySelection:",
|
||||
"moveWordForward:",
|
||||
"moveWordForwardAndModifySelection:",
|
||||
"newDocument:",
|
||||
"ok:",
|
||||
"open:",
|
||||
"openDocument:",
|
||||
"orderBack:",
|
||||
"orderFront:",
|
||||
"orderFrontColorPanel:",
|
||||
"orderFrontDataLinkPanel:",
|
||||
"orderFrontHelpPanel:",
|
||||
"orderFrontStandardAboutPanel:",
|
||||
"orderFrontStandardInfoPanel:",
|
||||
"orderOut:",
|
||||
"pageDown:",
|
||||
"pageUp:",
|
||||
"paste:",
|
||||
"pasteAsPlainText:",
|
||||
"pasteAsRichText:",
|
||||
"pasteFont:",
|
||||
"pasteRuler:",
|
||||
"performClose:",
|
||||
"performMiniaturize:",
|
||||
"performZoom:",
|
||||
"print:",
|
||||
"raiseBaseline:",
|
||||
"revertDocumentToSaved:",
|
||||
"runPageLayout:",
|
||||
"runToolbarCustomizationPalette:",
|
||||
"saveAllDocuments:",
|
||||
"saveDocument:",
|
||||
"saveDocumentAs:",
|
||||
"saveDocumentTo:",
|
||||
"scrollLineDown:",
|
||||
"scrollLineUp:",
|
||||
"scrollPageDown:",
|
||||
"scrollPageUp:",
|
||||
"scrollViaScroller:",
|
||||
"selectAll:",
|
||||
"selectLine:",
|
||||
"selectNextKeyView:",
|
||||
"selectParagraph:",
|
||||
"selectPreviousKeyView:",
|
||||
"selectText:",
|
||||
"selectToMark:",
|
||||
"selectWord:",
|
||||
"showContextHelp:",
|
||||
"showGuessPanel:",
|
||||
"showHelp:",
|
||||
"showWindow:",
|
||||
"stop:",
|
||||
"subscript:",
|
||||
"superscript:",
|
||||
"swapWithMark:",
|
||||
"takeDoubleValueFrom:",
|
||||
"takeFloatValueFrom:",
|
||||
"takeIntValueFrom:",
|
||||
"takeObjectValueFrom:",
|
||||
"takeStringValueFrom:",
|
||||
"terminate:",
|
||||
"tightenKerning:",
|
||||
"toggle:",
|
||||
"toggleContinuousSpellChecking:",
|
||||
"toggleRuler:",
|
||||
"toggleToolbarShown:",
|
||||
"toggleTraditionalCharacterShape:",
|
||||
"transpose:",
|
||||
"transposeWords:",
|
||||
"turnOffKerning:",
|
||||
"turnOffLigatures:",
|
||||
"underline:",
|
||||
"unhide:",
|
||||
"unhideAllApplications:",
|
||||
"unscript:",
|
||||
"uppercaseWord:",
|
||||
"useAllLigatures:",
|
||||
"useStandardKerning:",
|
||||
"useStandardLigatures:",
|
||||
"yank:",
|
||||
"zoom:",
|
||||
"closeNewFilePanel:",
|
||||
"createFile:",
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -324,6 +324,13 @@ NSString *PCITextFieldGetFocus = @"PCITextFieldGetFocusNotification";
|
|||
[docClassField setTextColor:[NSColor blackColor]];
|
||||
[docClassField setEditable:YES];
|
||||
|
||||
[nameColumn setIdentifier:@"NSHumanReadableName"];
|
||||
[[nameColumn headerCell] setStringValue:@"Name"];
|
||||
[docTypesList addTableColumn:roleColumn];
|
||||
[docTypesList addTableColumn:classColumn];
|
||||
RELEASE(roleColumn);
|
||||
RELEASE(classColumn);
|
||||
|
||||
if (![docBased isEqualToString:@"YES"])
|
||||
{
|
||||
[self setProjectDictObject:@"YES"
|
||||
|
@ -354,7 +361,11 @@ NSString *PCITextFieldGetFocus = @"PCITextFieldGetFocusNotification";
|
|||
[docClassField setEditable:NO];
|
||||
|
||||
// Columns
|
||||
[docTypesList removeTableColumn:nameColumn];
|
||||
// [docTypesList removeTableColumn:nameColumn];
|
||||
[nameColumn setIdentifier:@"NSIcon"];
|
||||
[[nameColumn headerCell] setStringValue:@"Icon"];
|
||||
RETAIN(roleColumn);
|
||||
RETAIN(classColumn);
|
||||
[docTypesList removeTableColumn:roleColumn];
|
||||
[docTypesList removeTableColumn:classColumn];
|
||||
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
"## Comment" = "Do NOT change this file, Gorm maintains it";
|
||||
FirstResponder = {
|
||||
Actions = (
|
||||
"indent:",
|
||||
"orderFront:",
|
||||
"selectLine:",
|
||||
"unhide:",
|
||||
"setAppClass:",
|
||||
"setFile:",
|
||||
|
|
Binary file not shown.
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"## Comment" = "Do NOT change this file, Gorm maintains it";
|
||||
AppController = {
|
||||
Actions = (
|
||||
"showPrefPanel:"
|
||||
|
@ -9,143 +10,74 @@
|
|||
};
|
||||
FirstResponder = {
|
||||
Actions = (
|
||||
"activateContextHelpMode:",
|
||||
"alignCenter:",
|
||||
"alignJustified:",
|
||||
"alignLeft:",
|
||||
"alignRight:",
|
||||
"arrangeInFront:",
|
||||
"cancel:",
|
||||
"capitalizeWord:",
|
||||
"changeColor:",
|
||||
"changeFont:",
|
||||
"checkSpelling:",
|
||||
"close:",
|
||||
"complete:",
|
||||
"copy:",
|
||||
"copyFont:",
|
||||
"copyRuler:",
|
||||
"cut:",
|
||||
"delete:",
|
||||
"deleteBackward:",
|
||||
"deleteForward:",
|
||||
"deleteToBeginningOfLine:",
|
||||
"deleteToBeginningOfParagraph:",
|
||||
"deleteToEndOfLine:",
|
||||
"deleteToEndOfParagraph:",
|
||||
"deleteToMark:",
|
||||
"deleteWordBackward:",
|
||||
"deleteWordForward:",
|
||||
"deminiaturize:",
|
||||
"deselectAll:",
|
||||
"fax:",
|
||||
"hide:",
|
||||
"hideOtherApplications:",
|
||||
"indent:",
|
||||
"loosenKerning:",
|
||||
"lowerBaseline:",
|
||||
"lowercaseWord:",
|
||||
"makeKeyAndOrderFront:",
|
||||
"miniaturize:",
|
||||
"miniaturizeAll:",
|
||||
"moveBackward:",
|
||||
"moveBackwardAndModifySelection:",
|
||||
"moveDown:",
|
||||
"moveDownAndModifySelection:",
|
||||
"moveForward:",
|
||||
"moveForwardAndModifySelection:",
|
||||
"moveLeft:",
|
||||
"moveRight:",
|
||||
"moveToBeginningOfDocument:",
|
||||
"moveToBeginningOfLine:",
|
||||
"moveToBeginningOfParagraph:",
|
||||
"moveToEndOfDocument:",
|
||||
"moveToEndOfLine:",
|
||||
"moveToEndOfParagraph:",
|
||||
"moveUp:",
|
||||
"moveUpAndModifySelection:",
|
||||
"moveWordBackward:",
|
||||
"moveWordBackwardAndModifySelection:",
|
||||
"moveWordForward:",
|
||||
"moveWordForwardAndModifySelection:",
|
||||
"newDocument:",
|
||||
"ok:",
|
||||
"openDocument:",
|
||||
"orderBack:",
|
||||
"orderFront:",
|
||||
"orderFrontColorPanel:",
|
||||
"orderFrontDataLinkPanel:",
|
||||
"orderFrontFontPanel:",
|
||||
"orderFrontHelpPanel:",
|
||||
"orderFrontStandardAboutPanel:",
|
||||
"orderFrontStandardInfoPanel:",
|
||||
"orderOut:",
|
||||
"pageDown:",
|
||||
"pageUp:",
|
||||
"paste:",
|
||||
"pasteAsPlainText:",
|
||||
"pasteAsRichText:",
|
||||
"pasteFont:",
|
||||
"pasteRuler:",
|
||||
"performClose:",
|
||||
"performMiniaturize:",
|
||||
"performZoom:",
|
||||
"print:",
|
||||
"raiseBaseline:",
|
||||
"revertDocumentToSaved:",
|
||||
"runPageLayout:",
|
||||
"runToolbarCustomizationPalette:",
|
||||
"saveAllDocuments:",
|
||||
"saveDocument:",
|
||||
"saveDocumentAs:",
|
||||
"saveDocumentTo:",
|
||||
"scrollLineDown:",
|
||||
"scrollLineUp:",
|
||||
"scrollPageDown:",
|
||||
"scrollPageUp:",
|
||||
"scrollViaScroller:",
|
||||
"selectAll:",
|
||||
"selectLine:",
|
||||
"selectNextKeyView:",
|
||||
"selectParagraph:",
|
||||
"selectPreviousKeyView:",
|
||||
"selectText:",
|
||||
"selectText:",
|
||||
"selectToMark:",
|
||||
"selectWord:",
|
||||
"showContextHelp:",
|
||||
"showGuessPanel:",
|
||||
"showHelp:",
|
||||
"showWindow:",
|
||||
"stop:",
|
||||
"subscript:",
|
||||
"superscript:",
|
||||
"swapWithMark:",
|
||||
"takeDoubleValueFrom:",
|
||||
"takeFloatValueFrom:",
|
||||
"takeIntValueFrom:",
|
||||
"takeObjectValueFrom:",
|
||||
"takeStringValueFrom:",
|
||||
"terminate:",
|
||||
"tightenKerning:",
|
||||
"toggle:",
|
||||
"toggleContinuousSpellChecking:",
|
||||
"toggleRuler:",
|
||||
"toggleToolbarShown:",
|
||||
"toggleTraditionalCharacterShape:",
|
||||
"transpose:",
|
||||
"transposeWords:",
|
||||
"turnOffKerning:",
|
||||
"turnOffLigatures:",
|
||||
"underline:",
|
||||
"unhide:",
|
||||
"unhideAllApplications:",
|
||||
"unscript:",
|
||||
"uppercaseWord:",
|
||||
"useAllLigatures:",
|
||||
"useStandardKerning:",
|
||||
"useStandardLigatures:",
|
||||
"yank:",
|
||||
"zoom:",
|
||||
"showPrefPanel:"
|
||||
);
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue