201
201
(when paths
202
202
(cond
203
203
; empty collection, adding images and load the first in the list
204
- [(equal? (first (pfs)) root-path)
204
+ [(equal? (first (pfs)) + root-path+ )
205
205
(define img-path (first paths))
206
206
(define-values (base name dir?) (split-path img-path))
207
207
(image-dir base)
267
267
(unless (empty? paths)
268
268
(cond
269
269
; empty collection, adding images and load the first in the list
270
- [(equal? (first (pfs)) root-path)
270
+ [(equal? (first (pfs)) + root-path+ )
271
271
(define img-path (first paths))
272
272
(define-values (base name dir?) (split-path img-path))
273
273
(image-dir base)
310
310
(flif-destroy-decoder! (decoder))
311
311
(decoder #f ))
312
312
(image-dir (find-system-path 'home-dir ))
313
- (pfs (list root-path))
314
- (image-path root-path)
313
+ (pfs (list + root-path+ ))
314
+ (image-path + root-path+ )
315
315
(send (ivy-canvas) set-on-paint!
316
316
(λ (canvas dc)
317
317
(send canvas set-canvas-background color-black)))
448
448
[checked (want-animation?)]
449
449
[callback (λ (i e)
450
450
(want-animation? (send i is-checked?))
451
- (when (and (not (equal? (image-path) root-path))
451
+ (when (and (not (equal? (image-path) + root-path+ ))
452
452
(or (and (gif? (image-path))
453
453
(gif-animated? (image-path)))
454
454
(and (flif? (image-path))
484
484
[parent ivy-menu-bar-view-zoom-to]
485
485
[label (format "~a% " n)]
486
486
[callback (λ (i e)
487
- (unless (equal? (image-path) root-path)
487
+ (unless (equal? (image-path) + root-path+ )
488
488
(collect-garbage 'incremental )
489
489
(if (empty? image-lst-master)
490
490
(load-image (bitmap image-bmp-master) n)
496
496
[label "Rotate left " ]
497
497
[help-string "Rotate the image left. " ]
498
498
[callback (λ (i e)
499
- (unless (equal? (image-path) root-path)
499
+ (unless (equal? (image-path) + root-path+ )
500
500
(collect-garbage 'incremental )
501
501
(load-image (rotate image-pict (/ pi 2 )) 'same )))]))
502
502
506
506
[label "Rotate right " ]
507
507
[help-string "Rotate the image right. " ]
508
508
[callback (λ (i e)
509
- (unless (equal? (image-path) root-path)
509
+ (unless (equal? (image-path) + root-path+ )
510
510
(collect-garbage 'incremental )
511
511
(load-image (rotate image-pict (- (/ pi 2 ))) 'same )))]))
512
512
516
516
[label "Flip horizontal " ]
517
517
[help-string "Flip the image horizontally. " ]
518
518
[callback (λ (i e)
519
- (unless (equal? (image-path) root-path)
519
+ (unless (equal? (image-path) + root-path+ )
520
520
(define flo
521
521
(flomap-flip-horizontal (bitmap->flomap (pict->bitmap image-pict))))
522
522
(collect-garbage 'incremental )
528
528
[label "Flip vertical " ]
529
529
[help-string "Flip the image vertically. " ]
530
530
[callback (λ (i e)
531
- (unless (equal? (image-path) root-path)
531
+ (unless (equal? (image-path) + root-path+ )
532
532
(define flo
533
533
(flomap-flip-vertical (bitmap->flomap (pict->bitmap image-pict))))
534
534
(collect-garbage 'incremental )
540
540
[label "Sort Alphabetically " ]
541
541
[help-string "Sort the current collection alphabetically. " ]
542
542
[callback (λ (i e)
543
- (unless (equal? (image-path) root-path)
543
+ (unless (equal? (image-path) + root-path+ )
544
544
(define new-pfs (sort (pfs) path<?))
545
545
(pfs new-pfs)
546
546
(send (status-bar-position)
555
555
[label "Sort by High Rating " ]
556
556
[help-string "Sort the current collection by highest Rating. " ]
557
557
[callback (λ (i e)
558
- (unless (equal? (image-path) root-path)
558
+ (unless (equal? (image-path) + root-path+ )
559
559
; read the database entries for ratings
560
560
(define ratings
561
561
(for/list ([img (in-list (map path->string (pfs)))])
580
580
[label "Sort by Low Rating " ]
581
581
[help-string "Sort the current collection by lowest Rating. " ]
582
582
[callback (λ (i e)
583
- (unless (equal? (image-path) root-path)
583
+ (unless (equal? (image-path) + root-path+ )
584
584
; read the database entries for ratings
585
585
(define ratings
586
586
(for/list ([img (in-list (map path->string (pfs)))])
@@ -687,7 +687,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>."
687
687
[label (pict->bitmap (hc-append -12 (circle 15 ) (text "+ " )))]
688
688
[callback (λ (button event)
689
689
; do nothing if we've pressed ctrl+n
690
- (unless (equal? (image-path) root-path)
690
+ (unless (equal? (image-path) + root-path+ )
691
691
(collect-garbage 'incremental )
692
692
(if (and image-pict
693
693
(empty? image-lst))
@@ -700,7 +700,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>."
700
700
[label (pict->bitmap (hc-append -10 (circle 15 ) (text "- " )))]
701
701
[callback (λ (button event)
702
702
; do nothing if we've pressed ctrl+n
703
- (unless (equal? (image-path) root-path)
703
+ (unless (equal? (image-path) + root-path+ )
704
704
(collect-garbage 'incremental )
705
705
(if (and image-pict
706
706
(empty? image-lst))
@@ -713,7 +713,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>."
713
713
[label (pict->bitmap (rectangle 15 15 ))]
714
714
[callback (λ (button event)
715
715
; do nothing if we've pressed ctrl+n
716
- (unless (equal? (image-path) root-path)
716
+ (unless (equal? (image-path) + root-path+ )
717
717
(collect-garbage 'incremental )
718
718
(if (empty? image-lst)
719
719
(load-image image-bmp-master 'none )
@@ -725,7 +725,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>."
725
725
[label (pict->bitmap (hc-append -3 (frame (circle 15 )) (text " " )))]
726
726
[callback (λ (button event)
727
727
; do nothing if we've pressed ctrl+n
728
- (unless (equal? (image-path) root-path)
728
+ (unless (equal? (image-path) + root-path+ )
729
729
(collect-garbage 'incremental )
730
730
(if (empty? image-lst)
731
731
(load-image image-bmp-master)
@@ -744,7 +744,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>."
744
744
[callback (λ (choice evt)
745
745
; do nothing if we've pressed ctrl+n or if the
746
746
; image cannot embed metadata
747
- (unless (or (equal? (image-path) root-path)
747
+ (unless (or (equal? (image-path) + root-path+ )
748
748
(not (embed-support? (image-path))))
749
749
(define img (image-path))
750
750
@@ -794,7 +794,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>."
794
794
(thread set-xmp:rating!))])))]))
795
795
796
796
(define (on-escape-key tfield)
797
- (unless (equal? (image-path) root-path)
797
+ (unless (equal? (image-path) + root-path+ )
798
798
(send tfield set-field-background color-white)
799
799
(define-values (base name-path must-be-dir?) (split-path (image-path)))
800
800
(if (string=? (send tfield get-value) (incoming-tags))
@@ -822,7 +822,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>."
822
822
[stretchable-height #f ]
823
823
[callback
824
824
(λ (tf evt)
825
- (unless (equal? (image-path) root-path)
825
+ (unless (equal? (image-path) + root-path+ )
826
826
(define img (image-path))
827
827
(define img-str (path->string img))
828
828
(define-values (base name-path must-be-dir?) (split-path img))
@@ -870,7 +870,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>."
870
870
[label "Set " ]
871
871
[callback
872
872
(λ (button event)
873
- (unless (equal? (image-path) root-path)
873
+ (unless (equal? (image-path) + root-path+ )
874
874
(define img (image-path))
875
875
(define img-str (path->string img))
876
876
(define-values (base name-path must-be-dir?) (split-path (image-path)))
@@ -937,7 +937,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>."
937
937
(cond
938
938
; empty collection, adding 1 image
939
939
; like file-open, but only open the single image
940
- [(equal? (first (pfs)) root-path)
940
+ [(equal? (first (pfs)) + root-path+ )
941
941
(define-values (base name dir?) (split-path pathname))
942
942
(image-dir base)
943
943
(pfs (list pathname))
@@ -968,15 +968,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>."
968
968
(case type
969
969
[(wheel-down)
970
970
; do nothing if we've pressed ctrl+n
971
- (unless (equal? (image-path) root-path)
971
+ (unless (equal? (image-path) + root-path+ )
972
972
(collect-garbage 'incremental )
973
973
(if (and image-pict
974
974
(empty? image-lst))
975
975
(load-image image-pict 'wheel-smaller )
976
976
(load-image image-lst 'wheel-smaller )))]
977
977
[(wheel-up)
978
978
; do nothing if we've pressed ctrl+n
979
- (unless (equal? (image-path) root-path)
979
+ (unless (equal? (image-path) + root-path+ )
980
980
(collect-garbage 'incremental )
981
981
(if (and image-pict
982
982
(empty? image-lst))
0 commit comments