75
75
(defun paw-header ()
76
76
" Header function for *paw* buffer."
77
77
(format " %s%s "
78
- (format " %s Total: %s Page: %s /%s %s %s %s "
79
- (if (string-equal system-type " android" ) " "
80
- (format " Annotations: %s " (propertize paw-db-file 'face 'font-lock-keyword-face ) ))
78
+ (format " %s Total: %s Page: %s /%s [%s %s %s %s ]"
79
+ paw-logo-icon
80
+ ; ; (if (string-equal system-type "android") ""
81
+ ; ; (format "Annotations: %s " (propertize paw-db-file 'face 'font-lock-keyword-face) ))
81
82
(propertize (number-to-string paw-search-entries-length) 'face 'font-lock-type-face )
82
83
(propertize (number-to-string paw-search-current-page) 'face 'font-lock-type-face )
83
84
(propertize (number-to-string paw-search-pages) 'face 'font-lock-type-face )
84
85
(paw-auto-audio-play-button)
85
86
(paw-auto-translate-button)
86
- (paw-auto-ai-translate-button))
87
- (format " %s "
87
+ (paw-auto-ai-translate-button)
88
+ (paw-one-click-query-button))
89
+ (format " %s "
88
90
(if (equal paw-search-filter " " )
89
91
" "
90
92
(concat
@@ -634,7 +636,9 @@ It is fast but has drawbacks:
634
636
(message " Disable auto play audio " ))
635
637
(setq paw-say-word-p t )
636
638
(message " Enable auto play audio " )) ))
637
- (paw-make-text-button-text (if paw-say-word-p " 📢" " 🔇" )
639
+ (paw-make-text-button-text (if paw-say-word-p
640
+ (propertize " Voice" 'face 'bold )
641
+ (propertize " Voice" 'face 'shadow ))
638
642
map 'highlight (format " Auto Play Audio? Now it is %s . " (if paw-say-word-p " Enable" " Disable" )))))
639
643
640
644
(defun paw-auto-translate-button ()
@@ -649,7 +653,9 @@ It is fast but has drawbacks:
649
653
(setq paw-translate-p t )
650
654
(setq paw-translate-context-p nil )
651
655
(message " Enable auto translate " )) ))
652
- (paw-make-text-button-text (if paw-translate-p " 📖" " 📚" )
656
+ (paw-make-text-button-text (if paw-translate-p
657
+ (propertize " Translate" 'face 'bold )
658
+ (propertize " Translate" 'face 'shadow ))
653
659
map 'highlight (format " Auto Translate? Now it is %s . " (if paw-translate-p " Enable" " Disable" )))))
654
660
655
661
(defun paw-auto-ai-translate-button ()
@@ -664,7 +670,18 @@ It is fast but has drawbacks:
664
670
(setq paw-ai-translate-p t )
665
671
(setq paw-ai-translate-context-p nil )
666
672
(message " Enable auto ai translate " )) ))
667
- (paw-make-text-button-text (if paw-ai-translate-p " 🕮" " 📘" )
673
+ (paw-make-text-button-text (if paw-ai-translate-p
674
+ (propertize " AI" 'face 'bold )
675
+ (propertize " AI" 'face 'shadow ))
668
676
map 'highlight (format " Auto AI Translate? Now it is %s . " (if paw-ai-translate-p " Enable" " Disable" )))))
669
677
678
+
679
+ (defun paw-one-click-query-button ()
680
+ (let ((map (make-sparse-keymap )))
681
+ (define-key map (kbd " <header-line> <mouse-1>" ) 'paw-view-note-click-enable-toggle )
682
+ (paw-make-text-button-text (if paw-view-note-click-enable
683
+ (propertize " Click" 'face 'bold )
684
+ (propertize " Click" 'face 'shadow ))
685
+ map 'highlight (format " One-Click? Now it is %s . " (if paw-view-note-click-enable " Enable" " Disable" )))))
686
+
670
687
(provide 'paw )
0 commit comments