Reorganize/rename menu items. Fixes #13

This commit is contained in:
Joshua Bell 2018-12-28 10:11:43 -08:00
parent a6b0cc0f13
commit 4b77727677
3 changed files with 83 additions and 78 deletions

View File

@ -2703,7 +2703,7 @@ label_copy_file:
label_delete_file: label_delete_file:
PASCAL_STRING "Delete a File ..." PASCAL_STRING "Delete a File ..."
label_eject: label_eject:
PASCAL_STRING "Eject" PASCAL_STRING "Eject Disk"
label_quit: label_quit:
PASCAL_STRING "Quit" PASCAL_STRING "Quit"
@ -2729,15 +2729,15 @@ label_erase_disk:
label_disk_copy: label_disk_copy:
PASCAL_STRING "Disk Copy ..." PASCAL_STRING "Disk Copy ..."
label_lock: label_lock:
PASCAL_STRING "Lock ..." PASCAL_STRING "Lock"
label_unlock: label_unlock:
PASCAL_STRING "Unlock ..." PASCAL_STRING "Unlock"
label_get_info: label_get_info:
PASCAL_STRING "Get Info ..." PASCAL_STRING "Get Info"
label_get_size: label_get_size:
PASCAL_STRING "Get Size ..." PASCAL_STRING "Get Size"
label_rename_icon: label_rename_icon:
PASCAL_STRING "Rename an Icon ..." PASCAL_STRING "Rename ..."
desktop_menu: desktop_menu:
DEFINE_MENU_BAR 6 DEFINE_MENU_BAR 6
@ -2749,7 +2749,7 @@ desktop_menu:
DEFINE_MENU_BAR_ITEM menu_id_selector, label_selector, selector_menu DEFINE_MENU_BAR_ITEM menu_id_selector, label_selector, selector_menu
file_menu: file_menu:
DEFINE_MENU 12 DEFINE_MENU 14
DEFINE_MENU_ITEM label_new_folder, 'F', 'f' DEFINE_MENU_ITEM label_new_folder, 'F', 'f'
DEFINE_MENU_SEPARATOR DEFINE_MENU_SEPARATOR
DEFINE_MENU_ITEM label_open, 'O', 'o' DEFINE_MENU_ITEM label_open, 'O', 'o'
@ -2760,18 +2760,25 @@ file_menu:
DEFINE_MENU_ITEM label_copy_file, 'Y', 'y' DEFINE_MENU_ITEM label_copy_file, 'Y', 'y'
DEFINE_MENU_ITEM label_delete_file, 'D', 'd' DEFINE_MENU_ITEM label_delete_file, 'D', 'd'
DEFINE_MENU_SEPARATOR DEFINE_MENU_SEPARATOR
DEFINE_MENU_ITEM label_eject, 'E', 'e' DEFINE_MENU_ITEM label_get_info, 'I', 'i'
DEFINE_MENU_ITEM label_rename_icon
DEFINE_MENU_SEPARATOR
DEFINE_MENU_ITEM label_quit, 'Q', 'q' DEFINE_MENU_ITEM label_quit, 'Q', 'q'
menu_item_id_new_folder := 1 menu_item_id_new_folder = 1
menu_item_id_open := 3 ;; --------------------
menu_item_id_close := 4 menu_item_id_open = 3
menu_item_id_close_all := 5 menu_item_id_close = 4
menu_item_id_select_all := 6 menu_item_id_close_all = 5
menu_item_id_copy_file := 8 menu_item_id_select_all = 6
menu_item_id_delete_file := 9 ;; --------------------
menu_item_id_eject := 11 menu_item_id_copy_file = 8
menu_item_id_quit := 12 menu_item_id_delete_file = 9
;; --------------------
menu_item_id_get_info = 11
menu_item_id_rename_icon = 12
;; --------------------
menu_item_id_quit = 14
view_menu: view_menu:
DEFINE_MENU 5 DEFINE_MENU 5
@ -2781,16 +2788,17 @@ view_menu:
DEFINE_MENU_ITEM label_by_size, 'K', 'k' DEFINE_MENU_ITEM label_by_size, 'K', 'k'
DEFINE_MENU_ITEM label_by_type, 'L', 'l' DEFINE_MENU_ITEM label_by_type, 'L', 'l'
menu_item_id_view_by_icon := 1 menu_item_id_view_by_icon = 1
menu_item_id_view_by_name := 2 menu_item_id_view_by_name = 2
menu_item_id_view_by_date := 3 menu_item_id_view_by_date = 3
menu_item_id_view_by_size := 4 menu_item_id_view_by_size = 4
menu_item_id_view_by_type := 5 menu_item_id_view_by_type = 5
special_menu: special_menu:
DEFINE_MENU 14 DEFINE_MENU 11
DEFINE_MENU_ITEM label_check_all_drives DEFINE_MENU_ITEM label_check_all_drives
DEFINE_MENU_ITEM label_check_drive DEFINE_MENU_ITEM label_check_drive
DEFINE_MENU_ITEM label_eject, 'E', 'e'
DEFINE_MENU_SEPARATOR DEFINE_MENU_SEPARATOR
DEFINE_MENU_ITEM label_format_disk, 'S', 's' DEFINE_MENU_ITEM label_format_disk, 'S', 's'
DEFINE_MENU_ITEM label_erase_disk, 'Z', 'z' DEFINE_MENU_ITEM label_erase_disk, 'Z', 'z'
@ -2798,22 +2806,19 @@ special_menu:
DEFINE_MENU_SEPARATOR DEFINE_MENU_SEPARATOR
DEFINE_MENU_ITEM label_lock DEFINE_MENU_ITEM label_lock
DEFINE_MENU_ITEM label_unlock DEFINE_MENU_ITEM label_unlock
DEFINE_MENU_SEPARATOR
DEFINE_MENU_ITEM label_get_info, 'I', 'i'
DEFINE_MENU_ITEM label_get_size DEFINE_MENU_ITEM label_get_size
DEFINE_MENU_SEPARATOR
DEFINE_MENU_ITEM label_rename_icon
menu_item_id_check_all := 1 menu_item_id_check_all = 1
menu_item_id_check_drive := 2 menu_item_id_check_drive = 2
menu_item_id_format_disk := 4 menu_item_id_eject = 3
menu_item_id_erase_disk := 5 ;; --------------------
menu_item_id_disk_copy := 6 menu_item_id_format_disk = 5
menu_item_id_lock := 8 menu_item_id_erase_disk = 6
menu_item_id_unlock := 9 menu_item_id_disk_copy = 7
menu_item_id_get_info := 11 ;; --------------------
menu_item_id_get_size := 12 menu_item_id_lock = 9
menu_item_id_rename_icon := 14 menu_item_id_unlock = 10
menu_item_id_get_size = 11
.addr $0000,$0000 .addr $0000,$0000

View File

@ -366,7 +366,9 @@ dispatch_table:
.addr cmd_copy_file .addr cmd_copy_file
.addr cmd_delete_file .addr cmd_delete_file
.addr cmd_noop ; -------- .addr cmd_noop ; --------
.addr cmd_eject .addr cmd_get_info
.addr cmd_rename_icon
.addr cmd_noop ; --------
.addr cmd_quit .addr cmd_quit
;; Selector menu (3) ;; Selector menu (3)
@ -397,6 +399,7 @@ dispatch_table:
menu5_start := * menu5_start := *
.addr cmd_check_drives .addr cmd_check_drives
.addr cmd_check_drive .addr cmd_check_drive
.addr cmd_eject
.addr cmd_noop ; -------- .addr cmd_noop ; --------
.addr cmd_format_disk .addr cmd_format_disk
.addr cmd_erase_disk .addr cmd_erase_disk
@ -404,11 +407,7 @@ dispatch_table:
.addr cmd_noop ; -------- .addr cmd_noop ; --------
.addr cmd_lock .addr cmd_lock
.addr cmd_unlock .addr cmd_unlock
.addr cmd_noop ; --------
.addr cmd_get_info
.addr cmd_get_size .addr cmd_get_size
.addr cmd_noop ; --------
.addr cmd_rename_icon
;; 6/7 unused ;; 6/7 unused
menu6_start := * menu6_start := *
@ -4660,24 +4659,25 @@ check_menu_items:
;;; Disable menu items for operating on a selected file ;;; Disable menu items for operating on a selected file
.proc disable_file_menu_items .proc disable_file_menu_items
lda #MGTK::disableitem_disable copy #MGTK::disableitem_disable, disableitem_params::disable
sta disableitem_params::disable
lda #menu_id_file ;; File
sta disableitem_params::menu_id copy #menu_id_file, disableitem_params::menu_id
lda #desktop_aux::menu_item_id_open lda #desktop_aux::menu_item_id_open
jsr disable_menu_item jsr disable_menu_item
lda #menu_id_special lda #desktop_aux::menu_item_id_get_info
sta disableitem_params::menu_id jsr disable_menu_item
lda #desktop_aux::menu_item_id_rename_icon
jsr disable_menu_item
;; Special
copy #menu_id_special, disableitem_params::menu_id
lda #desktop_aux::menu_item_id_lock lda #desktop_aux::menu_item_id_lock
jsr disable_menu_item jsr disable_menu_item
lda #desktop_aux::menu_item_id_unlock lda #desktop_aux::menu_item_id_unlock
jsr disable_menu_item jsr disable_menu_item
lda #desktop_aux::menu_item_id_get_info
jsr disable_menu_item
lda #desktop_aux::menu_item_id_get_size lda #desktop_aux::menu_item_id_get_size
jsr disable_menu_item jsr disable_menu_item
lda #desktop_aux::menu_item_id_rename_icon
jsr disable_menu_item
rts rts
disable_menu_item: disable_menu_item:
@ -4689,24 +4689,25 @@ disable_menu_item:
;;; ============================================================ ;;; ============================================================
.proc enable_file_menu_items .proc enable_file_menu_items
lda #MGTK::disableitem_enable copy #MGTK::disableitem_enable, disableitem_params::disable
sta disableitem_params::disable
lda #menu_id_file ;; File
sta disableitem_params::menu_id copy #menu_id_file, disableitem_params::menu_id
lda #desktop_aux::menu_item_id_open lda #desktop_aux::menu_item_id_open
jsr enable_menu_item jsr enable_menu_item
lda #menu_id_special lda #desktop_aux::menu_item_id_get_info
sta disableitem_params::menu_id jsr enable_menu_item
lda #desktop_aux::menu_item_id_rename_icon
jsr enable_menu_item
;; Special
copy #menu_id_special, disableitem_params::menu_id
lda #desktop_aux::menu_item_id_lock lda #desktop_aux::menu_item_id_lock
jsr enable_menu_item jsr enable_menu_item
lda #desktop_aux::menu_item_id_unlock lda #desktop_aux::menu_item_id_unlock
jsr enable_menu_item jsr enable_menu_item
lda #desktop_aux::menu_item_id_get_info
jsr enable_menu_item
lda #desktop_aux::menu_item_id_get_size lda #desktop_aux::menu_item_id_get_size
jsr enable_menu_item jsr enable_menu_item
lda #desktop_aux::menu_item_id_rename_icon
jsr enable_menu_item
rts rts
enable_menu_item: enable_menu_item:
@ -4725,7 +4726,7 @@ enable:
disable: disable:
copy #MGTK::disableitem_disable, disableitem_params::disable copy #MGTK::disableitem_disable, disableitem_params::disable
: copy #menu_id_file, disableitem_params::menu_id : copy #menu_id_special, disableitem_params::menu_id
copy #desktop_aux::menu_item_id_eject, disableitem_params::menu_item copy #desktop_aux::menu_item_id_eject, disableitem_params::menu_item
MGTK_RELAY_CALL MGTK::DisableItem, disableitem_params MGTK_RELAY_CALL MGTK::DisableItem, disableitem_params
@ -4753,11 +4754,11 @@ enable:
: lda #menu_id_selector : lda #menu_id_selector
sta disableitem_params::menu_id sta disableitem_params::menu_id
lda #2 ; > Edit lda #menu_item_id_selector_edit
jsr configure_menu_item jsr configure_menu_item
lda #3 ; > Delete lda #menu_item_id_selector_delete
jsr configure_menu_item jsr configure_menu_item
lda #4 ; > Run lda #menu_item_id_selector_run
jsr configure_menu_item jsr configure_menu_item
copy #$80, LD344 copy #$80, LD344
rts rts
@ -5505,22 +5506,16 @@ flag: .byte 0
;;; ============================================================ ;;; ============================================================
.proc enable_various_file_menu_items .proc enable_various_file_menu_items
lda #MGTK::disablemenu_enable copy #MGTK::disablemenu_enable, disablemenu_params::disable
sta disablemenu_params::disable
MGTK_RELAY_CALL MGTK::DisableMenu, disablemenu_params MGTK_RELAY_CALL MGTK::DisableMenu, disablemenu_params
lda #MGTK::disableitem_enable copy #MGTK::disableitem_enable, disableitem_params::disable
sta disableitem_params::disable copy #menu_id_file, disableitem_params::menu_id
lda #menu_id_file copy #desktop_aux::menu_item_id_new_folder, disableitem_params::menu_item
sta disableitem_params::menu_id
lda #1 ; > New Folder
sta disableitem_params::menu_item
MGTK_RELAY_CALL MGTK::DisableItem, disableitem_params MGTK_RELAY_CALL MGTK::DisableItem, disableitem_params
lda #4 ; > Close copy #desktop_aux::menu_item_id_close, disableitem_params::menu_item
sta disableitem_params::menu_item
MGTK_RELAY_CALL MGTK::DisableItem, disableitem_params MGTK_RELAY_CALL MGTK::DisableItem, disableitem_params
lda #5 ; > Close All copy #desktop_aux::menu_item_id_close_all, disableitem_params::menu_item
sta disableitem_params::menu_item
MGTK_RELAY_CALL MGTK::DisableItem, disableitem_params MGTK_RELAY_CALL MGTK::DisableItem, disableitem_params
copy #$80, menu_dispatch_flag copy #$80, menu_dispatch_flag

View File

@ -1181,6 +1181,11 @@ selector_menu:
DEFINE_MENU_ITEM run_list_entries + i * $10, .string(i+1), .string(i+1) DEFINE_MENU_ITEM run_list_entries + i * $10, .string(i+1), .string(i+1)
.endrepeat .endrepeat
menu_item_id_selector_add = 1
menu_item_id_selector_edit = 2
menu_item_id_selector_delete = 3
menu_item_id_selector_run = 4
label_add: label_add:
PASCAL_STRING "Add an Entry ..." PASCAL_STRING "Add an Entry ..."
label_edit: label_edit: