1
/* condition.c generated by valac 0.22.1, the Vala compiler
1
/* condition.c generated by valac 0.16.1, the Vala compiler
2
2
* generated from condition.vala, do not modify */
131
131
FmFileActionCondition* fm_file_action_condition_new (GKeyFile* kf, const gchar* group) {
132
132
FmFileActionCondition* self;
133
GKeyFile* _tmp0_ = NULL;
134
const gchar* _tmp1_ = NULL;
136
136
gchar** _tmp3_ = NULL;
137
GKeyFile* _tmp4_ = NULL;
138
const gchar* _tmp5_ = NULL;
140
140
gchar** _tmp7_ = NULL;
141
GKeyFile* _tmp8_ = NULL;
142
const gchar* _tmp9_ = NULL;
143
143
gchar* _tmp10_ = NULL;
144
GKeyFile* _tmp11_ = NULL;
145
const gchar* _tmp12_ = NULL;
145
const gchar* _tmp12_;
146
146
gchar* _tmp13_ = NULL;
147
GKeyFile* _tmp14_ = NULL;
148
const gchar* _tmp15_ = NULL;
148
const gchar* _tmp15_;
149
149
gchar* _tmp16_ = NULL;
150
GKeyFile* _tmp17_ = NULL;
151
const gchar* _tmp18_ = NULL;
151
const gchar* _tmp18_;
152
152
gchar* _tmp19_ = NULL;
153
GKeyFile* _tmp20_ = NULL;
154
const gchar* _tmp21_ = NULL;
154
const gchar* _tmp21_;
155
155
gint _tmp22_ = 0;
156
156
gchar** _tmp23_ = NULL;
157
GKeyFile* _tmp24_ = NULL;
158
const gchar* _tmp25_ = NULL;
158
const gchar* _tmp25_;
159
159
gint _tmp26_ = 0;
160
160
gchar** _tmp27_ = NULL;
161
GKeyFile* _tmp28_ = NULL;
162
const gchar* _tmp29_ = NULL;
162
const gchar* _tmp29_;
163
163
gboolean _tmp30_ = FALSE;
164
gchar* selection_count_str = NULL;
165
GKeyFile* _tmp31_ = NULL;
166
const gchar* _tmp32_ = NULL;
165
const gchar* _tmp32_;
167
166
gchar* _tmp33_ = NULL;
168
const gchar* _tmp34_ = NULL;
169
GKeyFile* _tmp40_ = NULL;
170
const gchar* _tmp41_ = NULL;
167
gchar* selection_count_str;
168
const gchar* _tmp34_;
170
const gchar* _tmp41_;
171
171
gint _tmp42_ = 0;
172
172
gchar** _tmp43_ = NULL;
173
GKeyFile* _tmp44_ = NULL;
174
const gchar* _tmp45_ = NULL;
174
const gchar* _tmp45_;
175
175
gint _tmp46_ = 0;
176
176
gchar** _tmp47_ = NULL;
178
GKeyFile* _tmp48_ = NULL;
179
const gchar* _tmp49_ = NULL;
178
const gchar* _tmp49_;
180
179
gint _tmp50_ = 0;
181
180
gchar** _tmp51_ = NULL;
182
gint caps_length1 = 0;
183
gint _caps_size_ = 0;
184
gchar** _tmp52_ = NULL;
185
gint _tmp52__length1 = 0;
185
gint _tmp52__length1;
186
186
g_return_val_if_fail (kf != NULL, NULL);
187
187
g_return_val_if_fail (group != NULL, NULL);
188
188
self = g_slice_new0 (FmFileActionCondition);
241
241
selection_count_str = _tmp33_;
242
242
_tmp34_ = selection_count_str;
243
243
if (_tmp34_ != NULL) {
244
const gchar* _tmp35_ = NULL;
244
const gchar* _tmp35_;
245
245
gchar _tmp36_ = '\0';
246
246
_tmp35_ = selection_count_str;
247
247
_tmp36_ = string_get (_tmp35_, (glong) 0);
253
const gchar* _tmp37_ = NULL;
253
const gchar* _tmp37_;
254
254
gchar _tmp38_ = '\0';
256
256
static const char s[] = "%c%d";
257
const gchar* _tmp39_ = NULL;
257
const gchar* _tmp39_;
258
258
_tmp37_ = selection_count_str;
259
259
_tmp38_ = string_get (_tmp37_, (glong) 0);
260
260
self->selection_count_cmp = _tmp38_;
322
322
static inline gboolean fm_file_action_condition_match_try_exec (FmFileActionCondition* self, GList* files) {
323
323
gboolean result = FALSE;
324
const gchar* _tmp0_ = NULL;
325
325
g_return_val_if_fail (self != NULL, FALSE);
326
326
_tmp0_ = self->try_exec;
327
327
if (_tmp0_ != NULL) {
328
gchar* exec_path = NULL;
329
const gchar* _tmp1_ = NULL;
330
GList* _tmp2_ = NULL;
331
330
gchar* _tmp3_ = NULL;
332
gchar* _tmp4_ = NULL;
333
332
gchar* _tmp5_ = NULL;
334
gchar* _tmp6_ = NULL;
335
const gchar* _tmp7_ = NULL;
336
336
gboolean _tmp8_ = FALSE;
337
337
_tmp1_ = self->try_exec;
359
359
static inline gboolean fm_file_action_condition_match_show_if_registered (FmFileActionCondition* self, GList* files) {
360
360
gboolean result = FALSE;
361
const gchar* _tmp0_ = NULL;
362
362
GError * _inner_error_ = NULL;
363
363
g_return_val_if_fail (self != NULL, FALSE);
364
364
_tmp0_ = self->show_if_registered;
365
365
if (_tmp0_ != NULL) {
366
gchar* service = NULL;
367
const gchar* _tmp1_ = NULL;
368
GList* _tmp2_ = NULL;
369
368
gchar* _tmp3_ = NULL;
370
370
_tmp1_ = self->show_if_registered;
372
372
_tmp3_ = fm_file_action_parameters_expand (_tmp1_, _tmp2_, FALSE, NULL);
373
373
service = _tmp3_;
375
GDBusConnection* con = NULL;
376
375
GDBusConnection* _tmp4_ = NULL;
377
GVariant* _result_ = NULL;
378
GDBusConnection* _tmp5_ = NULL;
379
const gchar* _tmp6_ = NULL;
380
GVariant* _tmp7_ = NULL;
381
GVariant* _tmp8_ = NULL;
382
GVariantType* _tmp9_ = NULL;
383
GVariantType* _tmp10_ = NULL;
376
GDBusConnection* con;
377
GDBusConnection* _tmp5_;
381
GVariantType* _tmp9_;
382
GVariantType* _tmp10_;
384
383
GVariant* _tmp11_ = NULL;
385
GVariant* _tmp12_ = NULL;
386
386
gboolean name_has_owner = FALSE;
387
GVariant* _tmp13_ = NULL;
388
gboolean _tmp14_ = FALSE;
389
389
_tmp4_ = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &_inner_error_);
391
391
if (_inner_error_ != NULL) {
401
401
_tmp6_ = service;
402
402
_tmp7_ = g_variant_new ("(s)", _tmp6_, NULL);
403
g_variant_ref_sink (_tmp7_);
403
_tmp8_ = g_variant_ref_sink (_tmp7_);
405
404
_tmp9_ = g_variant_type_new ("(b)");
406
405
_tmp10_ = _tmp9_;
407
406
_tmp11_ = g_dbus_connection_call_sync (_tmp5_, "org.freedesktop.DBus", "/org/freedesktop/DBus", "org.freedesktop.DBus", "NameHasOwner", _tmp8_, _tmp10_, G_DBUS_CALL_FLAGS_NONE, -1, NULL, &_inner_error_);
457
456
static inline gboolean fm_file_action_condition_match_show_if_true (FmFileActionCondition* self, GList* files) {
458
457
gboolean result = FALSE;
459
const gchar* _tmp0_ = NULL;
460
459
g_return_val_if_fail (self != NULL, FALSE);
461
460
_tmp0_ = self->show_if_true;
462
461
if (_tmp0_ != NULL) {
464
const gchar* _tmp1_ = NULL;
465
GList* _tmp2_ = NULL;
466
464
gchar* _tmp3_ = NULL;
467
466
gint exit_status = 0;
468
const gchar* _tmp4_ = NULL;
471
470
_tmp1_ = self->show_if_true;
473
472
_tmp3_ = fm_file_action_parameters_expand (_tmp1_, _tmp2_, FALSE, NULL);
499
498
static inline gboolean fm_file_action_condition_match_show_if_running (FmFileActionCondition* self, GList* files) {
500
499
gboolean result = FALSE;
501
const gchar* _tmp0_ = NULL;
502
501
GError * _inner_error_ = NULL;
503
502
g_return_val_if_fail (self != NULL, FALSE);
504
503
_tmp0_ = self->show_if_running;
505
504
if (_tmp0_ != NULL) {
506
gchar* process_name = NULL;
507
const gchar* _tmp1_ = NULL;
508
GList* _tmp2_ = NULL;
509
507
gchar* _tmp3_ = NULL;
511
509
gchar* _tmp4_ = NULL;
512
gboolean running = FALSE;
513
const gchar* _tmp5_ = NULL;
514
gboolean _tmp17_ = FALSE;
515
514
_tmp1_ = self->show_if_running;
517
516
_tmp3_ = fm_file_action_parameters_expand (_tmp1_, _tmp2_, FALSE, NULL);
523
522
if (_tmp5_ != NULL) {
524
523
gint exit_status = 0;
525
gboolean _tmp6_ = FALSE;
526
525
const gchar* _tmp7_ = NULL;
527
const gchar* _tmp8_ = NULL;
528
527
const gchar* _tmp9_ = NULL;
529
const gchar* _tmp10_ = NULL;
530
gchar* _tmp11_ = NULL;
531
gchar* _tmp12_ = NULL;
533
gboolean _tmp14_ = FALSE;
534
gboolean _tmp15_ = FALSE;
536
_tmp8_ = string_to_string (_tmp7_);
537
_tmp9_ = process_name;
538
_tmp10_ = string_to_string (_tmp9_);
539
_tmp11_ = g_strconcat (_tmp8_, " -x '", _tmp10_, "'", NULL);
541
_tmp14_ = g_spawn_command_line_sync (_tmp12_, NULL, NULL, &_tmp13_, &_inner_error_);
542
exit_status = _tmp13_;
528
gchar* _tmp10_ = NULL;
531
gboolean _tmp13_ = FALSE;
535
_tmp7_ = string_to_string (_tmp6_);
536
_tmp8_ = process_name;
537
_tmp9_ = string_to_string (_tmp8_);
538
_tmp10_ = g_strconcat (_tmp7_, " -x '", _tmp9_, "'", NULL);
540
_tmp13_ = g_spawn_command_line_sync (_tmp11_, NULL, NULL, &_tmp12_, &_inner_error_);
541
exit_status = _tmp12_;
543
544
_tmp15_ = _tmp14_;
546
545
if (_inner_error_ != NULL) {
547
546
_g_free0 (pgrep);
548
547
_g_free0 (process_name);
576
575
static gchar* string_slice (const gchar* self, glong start, glong end) {
577
576
gchar* result = NULL;
578
glong string_length = 0L;
583
582
gboolean _tmp8_ = FALSE;
585
gboolean _tmp12_ = FALSE;
586
585
gboolean _tmp13_ = FALSE;
588
gboolean _tmp17_ = FALSE;
594
593
gchar* _tmp23_ = NULL;
595
594
g_return_val_if_fail (self != NULL, NULL);
596
595
_tmp0_ = strlen (self);
598
597
string_length = (glong) _tmp1_;
600
599
if (_tmp2_ < ((glong) 0)) {
603
602
_tmp3_ = string_length;
605
604
start = _tmp3_ + _tmp4_;
608
607
if (_tmp5_ < ((glong) 0)) {
611
610
_tmp6_ = string_length;
613
612
end = _tmp6_ + _tmp7_;
616
615
if (_tmp9_ >= ((glong) 0)) {
620
619
_tmp11_ = string_length;
621
620
_tmp8_ = _tmp10_ <= _tmp11_;
651
650
static inline gboolean fm_file_action_condition_match_mime_type (FmFileActionCondition* self, GList* files, const gchar* type, gboolean negated) {
652
651
gboolean result = FALSE;
653
652
gboolean _tmp0_ = FALSE;
654
const gchar* _tmp1_ = NULL;
655
gboolean _tmp3_ = FALSE;
656
655
g_return_val_if_fail (self != NULL, FALSE);
657
656
g_return_val_if_fail (type != NULL, FALSE);
659
658
if (g_strcmp0 (_tmp1_, "all/all") == 0) {
662
const gchar* _tmp2_ = NULL;
664
663
_tmp0_ = g_strcmp0 (_tmp2_, "*") == 0;
668
667
gboolean _tmp4_ = FALSE;
669
gboolean _tmp5_ = FALSE;
670
gboolean _tmp6_ = FALSE;
671
670
_tmp5_ = negated;
732
const gchar* _tmp15_ = NULL;
731
const gchar* _tmp15_;
733
732
gboolean _tmp16_ = FALSE;
735
734
_tmp16_ = g_str_has_suffix (_tmp15_, "/*");
737
gchar* prefix = NULL;
738
const gchar* _tmp17_ = NULL;
736
const gchar* _tmp17_;
739
737
gchar* _tmp18_ = NULL;
740
gboolean _tmp19_ = FALSE;
742
741
_tmp18_ = string_slice (_tmp17_, (glong) 0, (glong) (-1));
743
742
prefix = _tmp18_;
744
743
_tmp19_ = negated;
746
GList* _tmp20_ = NULL;
749
748
GList* fi_collection = NULL;
753
752
FmFileInfo* fi = NULL;
754
753
fi = (FmFileInfo*) fi_it->data;
756
FmFileInfo* _tmp21_ = NULL;
757
756
FmMimeType* _tmp22_ = NULL;
758
757
const gchar* _tmp23_ = NULL;
759
const gchar* _tmp24_ = NULL;
758
const gchar* _tmp24_;
760
759
gboolean _tmp25_ = FALSE;
762
761
_tmp22_ = fm_file_info_get_mime_type (_tmp21_);
782
781
FmFileInfo* fi = NULL;
783
782
fi = (FmFileInfo*) fi_it->data;
785
FmFileInfo* _tmp27_ = NULL;
786
785
FmMimeType* _tmp28_ = NULL;
787
786
const gchar* _tmp29_ = NULL;
788
const gchar* _tmp30_ = NULL;
787
const gchar* _tmp30_;
789
788
gboolean _tmp31_ = FALSE;
791
790
_tmp28_ = fm_file_info_get_mime_type (_tmp27_);
816
815
FmFileInfo* fi = NULL;
817
816
fi = (FmFileInfo*) fi_it->data;
819
FmFileInfo* _tmp34_ = NULL;
820
819
FmMimeType* _tmp35_ = NULL;
821
820
const gchar* _tmp36_ = NULL;
822
const gchar* _tmp37_ = NULL;
821
const gchar* _tmp37_;
824
823
_tmp35_ = fm_file_info_get_mime_type (_tmp34_);
825
824
_tmp36_ = fm_mime_type_get_type (_tmp35_);
842
841
FmFileInfo* fi = NULL;
843
842
fi = (FmFileInfo*) fi_it->data;
845
FmFileInfo* _tmp39_ = NULL;
846
845
FmMimeType* _tmp40_ = NULL;
847
846
const gchar* _tmp41_ = NULL;
848
const gchar* _tmp42_ = NULL;
847
const gchar* _tmp42_;
850
849
_tmp40_ = fm_file_info_get_mime_type (_tmp39_);
851
850
_tmp41_ = fm_mime_type_get_type (_tmp40_);
869
868
static inline gboolean fm_file_action_condition_match_mime_types (FmFileActionCondition* self, GList* files) {
870
869
gboolean result = FALSE;
871
gchar** _tmp0_ = NULL;
872
gint _tmp0__length1 = 0;
873
872
g_return_val_if_fail (self != NULL, FALSE);
874
873
_tmp0_ = self->mime_types;
875
874
_tmp0__length1 = self->mime_types_length1;
876
875
if (_tmp0_ != NULL) {
877
gboolean allowed = FALSE;
878
gchar** _tmp1_ = NULL;
879
gint _tmp1__length1 = 0;
881
880
_tmp1_ = self->mime_types;
882
881
_tmp1__length1 = self->mime_types_length1;
894
893
const gchar* type = NULL;
895
894
gboolean negated = FALSE;
896
const gchar* _tmp2_ = NULL;
897
896
gchar _tmp3_ = '\0';
898
gboolean _tmp6_ = FALSE;
899
898
_tmp2_ = allowed_type;
900
899
_tmp3_ = string_get (_tmp2_, (glong) 0);
901
900
if (_tmp3_ == '!') {
902
const gchar* _tmp4_ = NULL;
903
902
_tmp4_ = allowed_type;
904
903
type = (const gchar*) (((guint8*) _tmp4_) + 1);
907
const gchar* _tmp5_ = NULL;
908
907
_tmp5_ = allowed_type;
912
911
_tmp6_ = negated;
914
gboolean type_is_allowed = FALSE;
915
GList* _tmp7_ = NULL;
916
const gchar* _tmp8_ = NULL;
917
gboolean _tmp9_ = FALSE;
918
916
gboolean _tmp10_ = FALSE;
919
gboolean _tmp11_ = FALSE;
917
gboolean type_is_allowed;
922
921
_tmp9_ = negated;
954
953
static inline gboolean fm_file_action_condition_match_base_name (FmFileActionCondition* self, GList* files, const gchar* base_name, gboolean negated) {
955
954
gboolean result = FALSE;
956
955
GPatternSpec* pattern = NULL;
957
gboolean _tmp0_ = FALSE;
958
GList* _tmp7_ = NULL;
959
958
g_return_val_if_fail (self != NULL, FALSE);
960
959
g_return_val_if_fail (base_name != NULL, FALSE);
961
960
_tmp0_ = self->match_case;
963
const gchar* _tmp1_ = NULL;
964
GPatternSpec* _tmp2_ = NULL;
963
GPatternSpec* _tmp2_;
965
964
_tmp1_ = base_name;
966
965
_tmp2_ = g_pattern_spec_new (_tmp1_);
967
966
_g_pattern_spec_free0 (pattern);
968
967
pattern = _tmp2_;
970
const gchar* _tmp3_ = NULL;
971
970
gchar* _tmp4_ = NULL;
972
gchar* _tmp5_ = NULL;
973
GPatternSpec* _tmp6_ = NULL;
972
GPatternSpec* _tmp6_;
974
973
_tmp3_ = base_name;
975
974
_tmp4_ = g_utf8_casefold (_tmp3_, (gssize) (-1));
988
987
FmFileInfo* fi = NULL;
989
988
fi = (FmFileInfo*) fi_it->data;
992
FmFileInfo* _tmp8_ = NULL;
993
991
const gchar* _tmp9_ = NULL;
994
gchar* _tmp10_ = NULL;
995
gboolean _tmp11_ = FALSE;
997
996
_tmp9_ = fm_file_info_get_name (_tmp8_);
998
997
_tmp10_ = g_strdup (_tmp9_);
1000
999
_tmp11_ = self->match_case;
1002
GPatternSpec* _tmp12_ = NULL;
1003
const gchar* _tmp13_ = NULL;
1001
GPatternSpec* _tmp12_;
1002
const gchar* _tmp13_;
1004
1003
gboolean _tmp14_ = FALSE;
1005
1004
_tmp12_ = pattern;
1006
1005
_tmp13_ = name;
1007
1006
_tmp14_ = g_pattern_match_string (_tmp12_, _tmp13_);
1009
gboolean _tmp15_ = FALSE;
1010
1009
_tmp15_ = negated;
1012
1011
result = FALSE;
1028
GPatternSpec* _tmp17_ = NULL;
1029
const gchar* _tmp18_ = NULL;
1027
GPatternSpec* _tmp17_;
1028
const gchar* _tmp18_;
1030
1029
gchar* _tmp19_ = NULL;
1031
gchar* _tmp20_ = NULL;
1032
1031
gboolean _tmp21_ = FALSE;
1033
gboolean _tmp22_ = FALSE;
1034
1033
_tmp17_ = pattern;
1035
1034
_tmp18_ = name;
1036
1035
_tmp19_ = g_utf8_casefold (_tmp18_, (gssize) (-1));
1071
1070
static inline gboolean fm_file_action_condition_match_base_names (FmFileActionCondition* self, GList* files) {
1072
1071
gboolean result = FALSE;
1073
gchar** _tmp0_ = NULL;
1074
gint _tmp0__length1 = 0;
1073
gint _tmp0__length1;
1075
1074
g_return_val_if_fail (self != NULL, FALSE);
1076
1075
_tmp0_ = self->base_names;
1077
1076
_tmp0__length1 = self->base_names_length1;
1078
1077
if (_tmp0_ != NULL) {
1079
gboolean allowed = FALSE;
1080
gchar** _tmp1_ = NULL;
1081
gint _tmp1__length1 = 0;
1080
gint _tmp1__length1;
1082
1081
allowed = FALSE;
1083
1082
_tmp1_ = self->base_names;
1084
1083
_tmp1__length1 = self->base_names_length1;
1096
1095
const gchar* name = NULL;
1097
1096
gboolean negated = FALSE;
1098
const gchar* _tmp2_ = NULL;
1097
const gchar* _tmp2_;
1099
1098
gchar _tmp3_ = '\0';
1100
gboolean _tmp6_ = FALSE;
1101
1100
_tmp2_ = allowed_name;
1102
1101
_tmp3_ = string_get (_tmp2_, (glong) 0);
1103
1102
if (_tmp3_ == '!') {
1104
const gchar* _tmp4_ = NULL;
1103
const gchar* _tmp4_;
1105
1104
_tmp4_ = allowed_name;
1106
1105
name = (const gchar*) (((guint8*) _tmp4_) + 1);
1107
1106
negated = TRUE;
1109
const gchar* _tmp5_ = NULL;
1108
const gchar* _tmp5_;
1110
1109
_tmp5_ = allowed_name;
1112
1111
negated = FALSE;
1114
1113
_tmp6_ = negated;
1116
gboolean name_is_allowed = FALSE;
1117
GList* _tmp7_ = NULL;
1118
const gchar* _tmp8_ = NULL;
1119
gboolean _tmp9_ = FALSE;
1116
const gchar* _tmp8_;
1120
1118
gboolean _tmp10_ = FALSE;
1121
gboolean _tmp11_ = FALSE;
1119
gboolean name_is_allowed;
1122
1121
_tmp7_ = files;
1124
1123
_tmp9_ = negated;
1166
1165
FmFileInfo* fi = NULL;
1167
1166
fi = (FmFileInfo*) fi_it->data;
1170
FmFileInfo* _tmp1_ = NULL;
1171
1169
FmPath* _tmp2_ = NULL;
1172
1170
gchar* _tmp3_ = NULL;
1173
const gchar* _tmp4_ = NULL;
1172
const gchar* _tmp4_;
1174
1173
gchar* _tmp5_ = NULL;
1175
gchar* _tmp6_ = NULL;
1176
const gchar* _tmp7_ = NULL;
1177
gboolean _tmp8_ = FALSE;
1175
const gchar* _tmp7_;
1179
1178
_tmp2_ = fm_file_info_get_path (_tmp1_);
1180
1179
_tmp3_ = fm_path_to_uri (_tmp2_);
1214
1213
static inline gboolean fm_file_action_condition_match_schemes (FmFileActionCondition* self, GList* files) {
1215
1214
gboolean result = FALSE;
1216
gchar** _tmp0_ = NULL;
1217
gint _tmp0__length1 = 0;
1216
gint _tmp0__length1;
1218
1217
g_return_val_if_fail (self != NULL, FALSE);
1219
1218
_tmp0_ = self->schemes;
1220
1219
_tmp0__length1 = self->schemes_length1;
1221
1220
if (_tmp0_ != NULL) {
1222
gboolean allowed = FALSE;
1223
gchar** _tmp1_ = NULL;
1224
gint _tmp1__length1 = 0;
1223
gint _tmp1__length1;
1225
1224
allowed = FALSE;
1226
1225
_tmp1_ = self->schemes;
1227
1226
_tmp1__length1 = self->schemes_length1;
1239
1238
const gchar* scheme = NULL;
1240
1239
gboolean negated = FALSE;
1241
const gchar* _tmp2_ = NULL;
1240
const gchar* _tmp2_;
1242
1241
gchar _tmp3_ = '\0';
1243
gboolean _tmp6_ = FALSE;
1244
1243
_tmp2_ = allowed_scheme;
1245
1244
_tmp3_ = string_get (_tmp2_, (glong) 0);
1246
1245
if (_tmp3_ == '!') {
1247
const gchar* _tmp4_ = NULL;
1246
const gchar* _tmp4_;
1248
1247
_tmp4_ = allowed_scheme;
1249
1248
scheme = (const gchar*) (((guint8*) _tmp4_) + 1);
1250
1249
negated = TRUE;
1252
const gchar* _tmp5_ = NULL;
1251
const gchar* _tmp5_;
1253
1252
_tmp5_ = allowed_scheme;
1254
1253
scheme = _tmp5_;
1255
1254
negated = FALSE;
1257
1256
_tmp6_ = negated;
1259
gboolean scheme_is_allowed = FALSE;
1260
GList* _tmp7_ = NULL;
1261
const gchar* _tmp8_ = NULL;
1262
gboolean _tmp9_ = FALSE;
1259
const gchar* _tmp8_;
1263
1261
gboolean _tmp10_ = FALSE;
1264
gboolean _tmp11_ = FALSE;
1262
gboolean scheme_is_allowed;
1265
1264
_tmp7_ = files;
1266
1265
_tmp8_ = scheme;
1267
1266
_tmp9_ = negated;
1299
1298
static gboolean fm_file_action_condition_match_folder (GList* files, const gchar* folder, gboolean negated) {
1300
1299
gboolean result = FALSE;
1301
1300
GPatternSpec* pattern = NULL;
1302
const gchar* _tmp0_ = NULL;
1301
const gchar* _tmp0_;
1303
1302
gboolean _tmp1_ = FALSE;
1304
GList* _tmp9_ = NULL;
1305
1304
g_return_val_if_fail (folder != NULL, FALSE);
1306
1305
_tmp0_ = folder;
1307
1306
_tmp1_ = g_str_has_suffix (_tmp0_, "/*");
1309
const gchar* _tmp2_ = NULL;
1310
GPatternSpec* _tmp3_ = NULL;
1308
const gchar* _tmp2_;
1309
GPatternSpec* _tmp3_;
1311
1310
_tmp2_ = folder;
1312
1311
_tmp3_ = g_pattern_spec_new (_tmp2_);
1313
1312
_g_pattern_spec_free0 (pattern);
1314
1313
pattern = _tmp3_;
1316
const gchar* _tmp4_ = NULL;
1315
const gchar* _tmp4_;
1317
1316
const gchar* _tmp5_ = NULL;
1318
1317
gchar* _tmp6_ = NULL;
1319
gchar* _tmp7_ = NULL;
1320
GPatternSpec* _tmp8_ = NULL;
1319
GPatternSpec* _tmp8_;
1321
1320
_tmp4_ = folder;
1322
1321
_tmp5_ = string_to_string (_tmp4_);
1323
1322
_tmp6_ = g_strconcat (_tmp5_, "/*", NULL);
1336
1335
FmFileInfo* fi = NULL;
1337
1336
fi = (FmFileInfo*) fi_it->data;
1339
gchar* dirname = NULL;
1340
FmFileInfo* _tmp10_ = NULL;
1338
FmFileInfo* _tmp10_;
1341
1339
FmPath* _tmp11_ = NULL;
1342
1340
FmPath* _tmp12_ = NULL;
1343
1341
gchar* _tmp13_ = NULL;
1344
GPatternSpec* _tmp14_ = NULL;
1345
const gchar* _tmp15_ = NULL;
1343
GPatternSpec* _tmp14_;
1344
const gchar* _tmp15_;
1346
1345
gboolean _tmp16_ = FALSE;
1348
1347
_tmp11_ = fm_file_info_get_path (_tmp10_);
1384
1383
static inline gboolean fm_file_action_condition_match_folders (FmFileActionCondition* self, GList* files) {
1385
1384
gboolean result = FALSE;
1386
gchar** _tmp0_ = NULL;
1387
gint _tmp0__length1 = 0;
1386
gint _tmp0__length1;
1388
1387
g_return_val_if_fail (self != NULL, FALSE);
1389
1388
_tmp0_ = self->folders;
1390
1389
_tmp0__length1 = self->folders_length1;
1391
1390
if (_tmp0_ != NULL) {
1392
gboolean allowed = FALSE;
1393
gchar** _tmp1_ = NULL;
1394
gint _tmp1__length1 = 0;
1393
gint _tmp1__length1;
1395
1394
allowed = FALSE;
1396
1395
_tmp1_ = self->folders;
1397
1396
_tmp1__length1 = self->folders_length1;
1409
1408
const gchar* folder = NULL;
1410
1409
gboolean negated = FALSE;
1411
const gchar* _tmp2_ = NULL;
1410
const gchar* _tmp2_;
1412
1411
gchar _tmp3_ = '\0';
1413
gboolean _tmp6_ = FALSE;
1414
1413
_tmp2_ = allowed_folder;
1415
1414
_tmp3_ = string_get (_tmp2_, (glong) 0);
1416
1415
if (_tmp3_ == '!') {
1417
const gchar* _tmp4_ = NULL;
1416
const gchar* _tmp4_;
1418
1417
_tmp4_ = allowed_folder;
1419
1418
folder = (const gchar*) (((guint8*) _tmp4_) + 1);
1420
1419
negated = TRUE;
1422
const gchar* _tmp5_ = NULL;
1421
const gchar* _tmp5_;
1423
1422
_tmp5_ = allowed_folder;
1424
1423
folder = _tmp5_;
1425
1424
negated = FALSE;
1427
1426
_tmp6_ = negated;
1429
gboolean folder_is_allowed = FALSE;
1430
GList* _tmp7_ = NULL;
1431
const gchar* _tmp8_ = NULL;
1432
gboolean _tmp9_ = FALSE;
1429
const gchar* _tmp8_;
1433
1431
gboolean _tmp10_ = FALSE;
1434
gboolean _tmp11_ = FALSE;
1432
gboolean folder_is_allowed;
1435
1434
_tmp7_ = files;
1436
1435
_tmp8_ = folder;
1437
1436
_tmp9_ = negated;
1533
1532
gboolean fm_file_action_condition_match (FmFileActionCondition* self, GList* files) {
1534
1533
gboolean result = FALSE;
1535
GList* _tmp0_ = NULL;
1536
1535
gboolean _tmp1_ = FALSE;
1537
GList* _tmp2_ = NULL;
1538
1537
gboolean _tmp3_ = FALSE;
1539
GList* _tmp4_ = NULL;
1540
1539
gboolean _tmp5_ = FALSE;
1541
GList* _tmp6_ = NULL;
1542
1541
gboolean _tmp7_ = FALSE;
1543
GList* _tmp8_ = NULL;
1544
1543
gboolean _tmp9_ = FALSE;
1545
GList* _tmp10_ = NULL;
1546
1545
gboolean _tmp11_ = FALSE;
1547
GList* _tmp12_ = NULL;
1548
1547
gboolean _tmp13_ = FALSE;
1549
GList* _tmp14_ = NULL;
1550
1549
gboolean _tmp15_ = FALSE;
1551
GList* _tmp16_ = NULL;
1552
1551
gboolean _tmp17_ = FALSE;
1553
GList* _tmp18_ = NULL;
1554
1553
gboolean _tmp19_ = FALSE;
1555
1554
g_return_val_if_fail (self != NULL, FALSE);
1556
1555
_tmp0_ = files;