diff options
Diffstat (limited to 'src/lib/ecore_cocoa/ecore_cocoa_cnp.m')
-rw-r--r-- | src/lib/ecore_cocoa/ecore_cocoa_cnp.m | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/lib/ecore_cocoa/ecore_cocoa_cnp.m b/src/lib/ecore_cocoa/ecore_cocoa_cnp.m index 605bfa9299..efe3cbdbef 100644 --- a/src/lib/ecore_cocoa/ecore_cocoa_cnp.m +++ b/src/lib/ecore_cocoa/ecore_cocoa_cnp.m | |||
@@ -14,13 +14,11 @@ ecore_cocoa_selection_clipboard_set(const void *data, | |||
14 | int size, | 14 | int size, |
15 | Ecore_Cocoa_Cnp_Type type) | 15 | Ecore_Cocoa_Cnp_Type type) |
16 | { | 16 | { |
17 | static NSMutableArray *objects = nil; | 17 | NSMutableArray *objects; |
18 | NSString *str = nil; | 18 | NSString *str = nil; |
19 | BOOL ok = YES; | 19 | BOOL ok = YES; |
20 | 20 | ||
21 | if (!objects) | 21 | objects = [[NSMutableArray alloc] init]; |
22 | objects = [[NSMutableArray alloc] init]; | ||
23 | |||
24 | if (type & ECORE_COCOA_CNP_TYPE_STRING) | 22 | if (type & ECORE_COCOA_CNP_TYPE_STRING) |
25 | { | 23 | { |
26 | str = [[NSString alloc] initWithBytes: data | 24 | str = [[NSString alloc] initWithBytes: data |
@@ -68,7 +66,7 @@ ecore_cocoa_selection_clipboard_get(int *size, | |||
68 | Ecore_Cocoa_Cnp_Type type, | 66 | Ecore_Cocoa_Cnp_Type type, |
69 | Ecore_Cocoa_Cnp_Type *retrieved_types) | 67 | Ecore_Cocoa_Cnp_Type *retrieved_types) |
70 | { | 68 | { |
71 | static NSMutableArray *classes = nil; | 69 | NSMutableArray *classes; |
72 | void *data; | 70 | void *data; |
73 | NSDictionary *options; | 71 | NSDictionary *options; |
74 | NSPasteboard *pb; | 72 | NSPasteboard *pb; |
@@ -77,8 +75,7 @@ ecore_cocoa_selection_clipboard_get(int *size, | |||
77 | BOOL string_class = NO; | 75 | BOOL string_class = NO; |
78 | Ecore_Cocoa_Cnp_Type types = 0; | 76 | Ecore_Cocoa_Cnp_Type types = 0; |
79 | 77 | ||
80 | if (!classes) | 78 | classes = [[NSMutableArray alloc] init]; |
81 | classes = [[NSMutableArray alloc] init]; | ||
82 | 79 | ||
83 | if ((type & ECORE_COCOA_CNP_TYPE_STRING) || | 80 | if ((type & ECORE_COCOA_CNP_TYPE_STRING) || |
84 | (type & ECORE_COCOA_CNP_TYPE_MARKUP)) | 81 | (type & ECORE_COCOA_CNP_TYPE_MARKUP)) |