Skip to content

Commit 9e0fa16

Browse files
authored
Merge pull request #16 from gnustep/TShelf_cleanup
Tabbed Shelf Icon cleanup - split with proper inheritance, cleanup of now common code and cleanup of the View. Uniform drag-drop operations.
2 parents 852a2c9 + ec771e6 commit 9e0fa16

10 files changed

+1555
-1263
lines changed

GWorkspace/Desktop/Dock/DockIcon.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ - (void)mouseDown:(NSEvent *)theEvent
312312
NSLeftMouseUpMask | NSLeftMouseDraggedMask];
313313

314314
if ([nextEvent type] == NSLeftMouseUp) {
315-
[[self window] postEvent: nextEvent atStart: NO];
315+
[[self window] postEvent: nextEvent atStart: YES];
316316
[self unselect];
317317
break;
318318

GWorkspace/Desktop/GWDesktopIcon.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ - (void)mouseDown:(NSEvent *)theEvent
120120
NSLeftMouseUpMask | NSLeftMouseDraggedMask];
121121

122122
if ([nextEvent type] == NSLeftMouseUp) {
123-
[win postEvent: nextEvent atStart: NO];
123+
[win postEvent: nextEvent atStart: YES];
124124
break;
125125

126126
} else if (([nextEvent type] == NSLeftMouseDragged)

GWorkspace/GNUmakefile.in

+2-1
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,10 @@ Finder/LiveSearch/LSFEditor.m \
9595
TShelf/TShelfWin.m \
9696
TShelf/TShelfView.m \
9797
TShelf/TShelfViewItem.m \
98-
TShelf/TShelfIconsView.m \
9998
TShelf/TShelfIcon.m \
99+
TShelf/TShelfFileIcon.m \
100100
TShelf/TShelfPBIcon.m \
101+
TShelf/TShelfIconsView.m \
101102
Preferences/PrefController.m \
102103
Preferences/DefEditorPref.m \
103104
Preferences/XTermPref.m \

GWorkspace/TShelf/TShelfFileIcon.h

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/* TShelfIcon.h
2+
*
3+
* Copyright (C) 2003-2021 Free Software Foundation, Inc.
4+
*
5+
* Authors: Enrico Sersale <[email protected]>
6+
* Riccardo Mottola <[email protected]>
7+
* Date: November 2021
8+
*
9+
* This file is part of the GNUstep GWorkspace application
10+
*
11+
* This program is free software; you can redistribute it and/or modify
12+
* it under the terms of the GNU General Public License as published by
13+
* the Free Software Foundation; either version 2 of the License, or
14+
* (at your option) any later version.
15+
*
16+
* This program is distributed in the hope that it will be useful,
17+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19+
* GNU General Public License for more details.
20+
*
21+
* You should have received a copy of the GNU General Public License
22+
* along with this program; if not, write to the Free Software
23+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
24+
*/
25+
26+
#ifndef TSHELF_FILEICON_H
27+
#define TSHELF_FILEICON_H
28+
29+
#import "TShelfIcon.h"
30+
31+
@class FSNode;
32+
@class FSNodeRep;
33+
@class GWorkspace;
34+
35+
@interface TShelfFileIcon : TShelfIcon
36+
{
37+
NSMutableArray *paths;
38+
NSString *hostname;
39+
FSNode *node;
40+
BOOL singlepath;
41+
BOOL isRootIcon;
42+
FSNodeRep *fsnodeRep;
43+
NSFileManager *fm;
44+
GWorkspace *gw;
45+
46+
BOOL forceCopy;
47+
}
48+
49+
- (id)initForPaths:(NSArray *)fpaths
50+
inIconsView:(TShelfIconsView *)aview;
51+
52+
- (id)initForPaths:(NSArray *)fpaths
53+
atPosition:(NSPoint)pos
54+
inIconsView:(TShelfIconsView *)aview;
55+
56+
- (id)initForPaths:(NSArray *)fpaths
57+
gridIndex:(NSUInteger)index
58+
inIconsView:(TShelfIconsView *)aview;
59+
60+
- (void)setPaths:(NSArray *)fpaths;
61+
62+
- (NSArray *)paths;
63+
64+
- (BOOL)isSinglePath;
65+
66+
@end
67+
68+
#endif // TSHELF_FILEICON_H

0 commit comments

Comments
 (0)