AmendHub

Download:

jcs

/

amend

/

amendments

/

23

browser: Only enable repo menu actions when committer is not showing


jcs made amendment 23 over 3 years ago
--- browser.c Mon Oct 18 13:09:06 2021 +++ browser.c Fri Oct 29 14:35:22 2021 @@ -432,11 +432,13 @@ browser_update_menu(struct browser *browser) HiliteControl(browser->diff_button, 255); else HiliteControl(browser->diff_button, 0); - - EnableItem(repo_menu, REPO_MENU_ADD_FILE_ID); - EnableItem(repo_menu, REPO_MENU_REVERT_FILE_ID); - EnableItem(repo_menu, REPO_MENU_APPLY_PATCH_ID); + if (!browser->committer) { + EnableItem(repo_menu, REPO_MENU_ADD_FILE_ID); + EnableItem(repo_menu, REPO_MENU_REVERT_FILE_ID); + EnableItem(repo_menu, REPO_MENU_APPLY_PATCH_ID); + } + if (LGetSelect(true, &cell, browser->commit_list)) EnableItem(commit_menu, COMMIT_MENU_EXPORT_ID); else