diff -ur gtk/gtkfilechoosernativequartz.c gtk/gtkfilechoosernativequartz.c
|
|
|
67 | 67 | GFile *current_file; |
68 | 68 | char *current_name; |
69 | 69 | |
70 | | NSMutableArray<NSArray<NSString *> *> *filters; |
71 | | NSMutableArray<NSString *> *filter_names; |
| 70 | NSMutableArray *filters; |
| 71 | NSMutableArray *filter_names; |
72 | 72 | NSComboBox *filter_combo_box; |
73 | 73 | |
74 | 74 | GSList *files; |
… |
… |
|
94 | 94 | - (void)comboBoxSelectionDidChange:(NSNotification *)notification |
95 | 95 | { |
96 | 96 | NSInteger selected_index = [data->filter_combo_box indexOfSelectedItem]; |
97 | | NSArray<NSString *> *filter = [data->filters objectAtIndex:selected_index]; |
| 97 | NSArray *filter = [data->filters objectAtIndex:selected_index]; |
98 | 98 | // check for empty strings in filter -> indicates all filetypes should be allowed! |
99 | 99 | if ([filter containsObject:@""]) |
100 | 100 | [data->panel setAllowedFileTypes:nil]; |
… |
… |
|
400 | 400 | |
401 | 401 | static gboolean |
402 | 402 | file_filter_to_quartz (GtkFileFilter *file_filter, |
403 | | NSMutableArray<NSArray<NSString *> *> *filters, |
404 | | NSMutableArray<NSString *> *filter_names) |
| 403 | NSMutableArray *filters, |
| 404 | NSMutableArray *filter_names) |
405 | 405 | { |
406 | 406 | const char *name; |
407 | | NSArray<NSString *> *pattern_nsstrings; |
| 407 | NSArray *pattern_nsstrings; |
408 | 408 | |
409 | 409 | pattern_nsstrings = _gtk_file_filter_get_as_pattern_nsstrings (file_filter); |
410 | 410 | if (pattern_nsstrings == NULL) |
… |
… |
|
462 | 462 | n_filters = g_slist_length (filters); |
463 | 463 | if (n_filters > 0) |
464 | 464 | { |
465 | | data->filters = [NSMutableArray<NSArray<NSString *> *> arrayWithCapacity:n_filters]; |
| 465 | data->filters = [NSMutableArray arrayWithCapacity:n_filters]; |
466 | 466 | [data->filters retain]; |
467 | | data->filter_names = [NSMutableArray<NSString *> arrayWithCapacity:n_filters]; |
| 467 | data->filter_names = [NSMutableArray arrayWithCapacity:n_filters]; |
468 | 468 | [data->filter_names retain]; |
469 | 469 | |
470 | 470 | for (l = filters, i = 0; l != NULL; l = l->next, i++) |
diff -ur gtk/gtkfilefilter.c gtk/gtkfilefilter.c
|
|
|
596 | 596 | |
597 | 597 | #import <Foundation/Foundation.h> |
598 | 598 | |
599 | | NSArray<NSString *> * _gtk_file_filter_get_as_pattern_nsstrings (GtkFileFilter *filter) |
| 599 | NSArray * _gtk_file_filter_get_as_pattern_nsstrings (GtkFileFilter *filter) |
600 | 600 | { |
601 | | NSMutableArray<NSString *> *array = [[NSMutableArray alloc] init]; |
| 601 | NSMutableArray *array = [[NSMutableArray alloc] init]; |
602 | 602 | GSList *tmp_list; |
603 | 603 | |
604 | 604 | for (tmp_list = filter->rules; tmp_list; tmp_list = tmp_list->next) |
diff -ur gtk/gtkfilefilterprivate.h gtk/gtkfilefilterprivate.h
|
|
|
31 | 31 | char ** _gtk_file_filter_get_as_patterns (GtkFileFilter *filter); |
32 | 32 | |
33 | 33 | #ifdef GDK_WINDOWING_QUARTZ |
34 | | NSArray<NSString *> * _gtk_file_filter_get_as_pattern_nsstrings (GtkFileFilter *filter); |
| 34 | NSArray * _gtk_file_filter_get_as_pattern_nsstrings (GtkFileFilter *filter); |
35 | 35 | #endif |
36 | 36 | |
37 | 37 | |