Skip to content

Commit 65ccce6

Browse files
author
Eric Sersale
committed
* Version 0.8.5.
* GWorkspace/Desktop/GWDesktopManager.[hm]: Add a "desktopView" ivar used instead of the GWDeskopWindow "-desktopView" method. * GWorkspace/FileViewer/GWViewer.m (-windowShouldClose:): * GWorkspace/FileViewer/GWSpatialViewer.m (-windowShouldClose:): Send a -updateDesktop to GWDesktopManager to update the desktop icons. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gworkspace/trunk@24686 72102866-910b-0410-8b05-ffd578937521
1 parent d5554c7 commit 65ccce6

File tree

6 files changed

+50
-31
lines changed

6 files changed

+50
-31
lines changed

GWorkspace/Desktop/GWDesktopManager.h

+2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ typedef enum DockPosition {
4444
id win;
4545
BOOL usexbundle;
4646

47+
GWDesktopView *desktopView;
48+
4749
Dock *dock;
4850
BOOL hidedock;
4951
DockPosition dockPosition;

GWorkspace/Desktop/GWDesktopManager.m

+25-30
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ - (id)init
6767
id defentry;
6868
NSString *path;
6969
id window = nil;
70-
GWDesktopView *desktopView;
7170

7271
fm = [NSFileManager defaultManager];
7372
nc = [NSNotificationCenter defaultCenter];
@@ -150,12 +149,12 @@ - (id)init
150149
- (void)activateDesktop
151150
{
152151
[win activate];
153-
[[win desktopView] showMountedVolumes];
154-
[[win desktopView] showContentsOfNode: dskNode];
152+
[desktopView showMountedVolumes];
153+
[desktopView showContentsOfNode: dskNode];
155154
[self addWatcherForPath: [dskNode path]];
156155

157156
if ((hidedock == NO) && ([dock superview] == nil)) {
158-
[[win desktopView] addSubview: dock];
157+
[desktopView addSubview: dock];
159158
[dock tile];
160159
}
161160

@@ -210,7 +209,6 @@ - (void)setUsesXBundle:(BOOL)value
210209
usexbundle = value;
211210

212211
if ([self isActive]) {
213-
GWDesktopView *desktopView = [win desktopView];
214212
id window = nil;
215213
BOOL changed = NO;
216214

@@ -275,7 +273,7 @@ - (BOOL)hasWindow:(id)awindow
275273

276274
- (id)desktopView
277275
{
278-
return [win desktopView];
276+
return desktopView;
279277
}
280278

281279
- (Dock *)dock
@@ -293,7 +291,7 @@ - (void)setDockPosition:(DockPosition)pos
293291
dockPosition = pos;
294292
[dock setPosition: pos];
295293
[self setReservedFrames];
296-
[[win desktopView] dockPositionDidChange];
294+
[desktopView dockPositionDidChange];
297295
}
298296

299297
- (void)setDockActive:(BOOL)value
@@ -302,12 +300,12 @@ - (void)setDockActive:(BOOL)value
302300

303301
if (hidedock && [dock superview]) {
304302
[dock removeFromSuperview];
305-
[[win desktopView] setNeedsDisplayInRect: dockReservedFrame];
303+
[desktopView setNeedsDisplayInRect: dockReservedFrame];
306304

307305
} else if ([dock superview] == nil) {
308-
[[win desktopView] addSubview: dock];
306+
[desktopView addSubview: dock];
309307
[dock tile];
310-
[[win desktopView] setNeedsDisplayInRect: dockReservedFrame];
308+
[desktopView setNeedsDisplayInRect: dockReservedFrame];
311309
}
312310
}
313311

@@ -366,7 +364,7 @@ - (NSRect)tshelfActivateFrame
366364

367365
- (NSImage *)tabbedShelfBackground
368366
{
369-
return [[win desktopView] tshelfBackground];
367+
return [desktopView tshelfBackground];
370368
}
371369

372370
- (void)mouseEnteredTShelfActivateFrame
@@ -381,11 +379,9 @@ - (void)mouseExitedTShelfActiveFrame
381379

382380
- (void)deselectAllIcons
383381
{
384-
GWDesktopView *view = [win desktopView];
385-
386-
[view unselectOtherReps: nil];
387-
[view selectionDidChange];
388-
[view stopRepNameEditing];
382+
[desktopView unselectOtherReps: nil];
383+
[desktopView selectionDidChange];
384+
[desktopView stopRepNameEditing];
389385
}
390386

391387
- (void)deselectInSpatialViewers
@@ -565,7 +561,7 @@ - (void)updateDefaults
565561
[defaults setBool: hidedock forKey: @"hidedock"];
566562

567563
[dock updateDefaults];
568-
[[win desktopView] updateDefaults];
564+
[desktopView updateDefaults];
569565
}
570566

571567
- (void)setContextHelp
@@ -597,7 +593,6 @@ - (BOOL)validateItem:(id)menuItem
597593
{
598594
if ([self isActive]) {
599595
SEL action = [menuItem action];
600-
GWDesktopView *desktopView = [win desktopView];
601596

602597
if (sel_eq(action, @selector(duplicateFiles:))
603598
|| sel_eq(action, @selector(recycleFiles:))
@@ -650,7 +645,7 @@ - (BOOL)validateItem:(id)menuItem
650645

651646
- (void)openSelectionInNewViewer:(BOOL)newv
652647
{
653-
NSArray *selreps = [[win desktopView] selectedReps];
648+
NSArray *selreps = [desktopView selectedReps];
654649
int i;
655650

656651
for (i = 0; i < [selreps count]; i++) {
@@ -697,7 +692,7 @@ - (void)openSelectionInNewViewer:(BOOL)newv
697692

698693
- (void)openSelectionAsFolder
699694
{
700-
NSArray *selnodes = [[win desktopView] selectedNodes];
695+
NSArray *selnodes = [desktopView selectedNodes];
701696
int i;
702697

703698
for (i = 0; i < [selnodes count]; i++) {
@@ -728,14 +723,14 @@ - (void)newFile
728723

729724
- (void)duplicateFiles
730725
{
731-
if ([[[win desktopView] selectedNodes] count]) {
726+
if ([[desktopView selectedNodes] count]) {
732727
[gworkspace duplicateFiles];
733728
}
734729
}
735730

736731
- (void)recycleFiles
737732
{
738-
if ([[[win desktopView] selectedNodes] count]) {
733+
if ([[desktopView selectedNodes] count]) {
739734
[gworkspace moveToTrash];
740735
}
741736
}
@@ -747,7 +742,7 @@ - (void)emptyTrash
747742

748743
- (void)deleteFiles
749744
{
750-
if ([[[win desktopView] selectedNodes] count]) {
745+
if ([[desktopView selectedNodes] count]) {
751746
[gworkspace deleteFiles];
752747
}
753748
}
@@ -771,38 +766,38 @@ - (void)setShownType:(id)sender
771766
type = FSNInfoNameType;
772767
}
773768

774-
[(id <FSNodeRepContainer>)[win desktopView] setShowType: type];
769+
[desktopView setShowType: type];
775770
}
776771

777772
- (void)setExtendedShownType:(id)sender
778773
{
779-
[(id <FSNodeRepContainer>)[win desktopView] setExtendedShowType: [sender title]];
774+
[desktopView setExtendedShowType: [sender title]];
780775
}
781776

782777
- (void)setIconsSize:(id)sender
783778
{
784-
[(id <FSNodeRepContainer>)[win desktopView] setIconSize: [[sender title] intValue]];
779+
[desktopView setIconSize: [[sender title] intValue]];
785780
}
786781

787782
- (void)setIconsPosition:(id)sender
788783
{
789784
NSString *title = [sender title];
790785

791786
if ([title isEqual: NSLocalizedString(@"Left", @"")]) {
792-
[(id <FSNodeRepContainer>)[win desktopView] setIconPosition: NSImageLeft];
787+
[desktopView setIconPosition: NSImageLeft];
793788
} else {
794-
[(id <FSNodeRepContainer>)[win desktopView] setIconPosition: NSImageAbove];
789+
[desktopView setIconPosition: NSImageAbove];
795790
}
796791
}
797792

798793
- (void)setLabelSize:(id)sender
799794
{
800-
[[win desktopView] setLabelTextSize: [[sender title] intValue]];
795+
[desktopView setLabelTextSize: [[sender title] intValue]];
801796
}
802797

803798
- (void)selectAllInViewer
804799
{
805-
[[win desktopView] selectAll];
800+
[desktopView selectAll];
806801
}
807802

808803
- (void)showTerminal

GWorkspace/FileViewer/GWSpatialViewer.m

+1
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,7 @@ - (void)windowDidBecomeKey:(NSNotification *)aNotification
766766

767767
- (BOOL)windowShouldClose:(id)sender
768768
{
769+
[manager updateDesktop];
769770
return YES;
770771
}
771772

GWorkspace/FileViewer/GWViewer.m

+1
Original file line numberDiff line numberDiff line change
@@ -995,6 +995,7 @@ - (void)windowDidResize:(NSNotification *)aNotification
995995

996996
- (BOOL)windowShouldClose:(id)sender
997997
{
998+
[manager updateDesktop];
998999
return YES;
9991000
}
10001001

INSTALL

+17-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,25 @@ Installing GWorkspace
22
=========================
33

44
GWorkspace requires GNUstep to be installed. Make sure that you have an
5-
up to date version on your system installed!
5+
up to date version installed on your system!
66

77
./configure
88
make install
99

10+
If you are on Linux and want to use the new inotify-based fswatcher, you can pass --with-inotify to configure.
11+
12+
To enable the new metadata indexing and searching system, cd into the GWMetadata directory and:
13+
14+
./configure
15+
make
16+
make install
17+
18+
To enable all the GWorkspace features you need also:
19+
20+
* The PDFKit framework (version >= 0.9) downloadable from the GWorkspace home page.
21+
PDFKit is needed to build the pdf contents inspector and to extract metadata from pdf files.
22+
23+
* System Preferences available from the GNUstep SVN repository.
24+
svn co http://svn.gna.org/svn/gnustep/apps/systempreferences/trunk
25+
If you install the GWMetadata system, SystemPreferences is needed to configure it.
1026

Tools/fswatcher/fswatcher-inotify.m

+4
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,8 @@ - (oneway void)client:(id <FSWClientProtocol>)client
504504
}
505505
}
506506
}
507+
508+
GWDebugLog(@"watchers: %i", NSCountMapTable(watchers));
507509
}
508510

509511
- (oneway void)client:(id <FSWClientProtocol>)client
@@ -528,6 +530,8 @@ - (oneway void)client:(id <FSWClientProtocol>)client
528530
[info removeWatchedPath: path];
529531
[watcher removeListener];
530532
}
533+
534+
GWDebugLog(@"watchers: %i", NSCountMapTable(watchers));
531535
}
532536

533537
- (Watcher *)watcherForPath:(NSString *)path

0 commit comments

Comments
 (0)