I will have my first question here regarding Shelve/Unshelve context menu. The problem that we found out was a situation, when we try to Unshelve when nothing is shelved. Right now, if you do it, after clicking Unshelve, nothing will happen. We thought about two solutions:
1. If nothing is shelved in a directory, just hide Unshelve,
2. Handle this situation in unshelve dialog (like show MessageBox("Sorry, nothing shelved")).
3. Is there something like ITEMIS_MULTIPLESELECTION?
First solution is quite problematic in a way it requires us to check in CShellExt::Initialize_Wrap if we have anything shelved. We did it by adding a method to SVN class -> HasShelvedItems, which would call SVN::ShelvesList and check if a list of shelved items is empty or not. However, we run into circular #includes -> we cannot include <SVN.h> in ContextMenu.cpp, as we're getting compiler errors. This also requires us to new ITEMIS #define -> ITEMIS_SHELVED, so kind of modifying "core" of Tortoise.
Do you have any suggestions which way would be best to do it? Like, we go with number 2. solution, and handle it in dialog, or we try to hide Unshelve menu when nothing is Shelved?
As for 3., currently we want to disable Shelve, when either one or many items are selected - it gives confusing result. We want to do it by hiding Shelve menu when you have something selected. Detection of selection is easy, in CShellExt::Initialize_Wrap, there is pDataObj which is != NULL when we have selection. However, we must add states to itemStates telling that something got selected and later use this state in ShellMenuShelve/ShellMenuUnshelve. Is there such a flag (telling that something was selected by mouse) defined somewhere or we have to add it (ITEMIS_SELECTED)?
Thank you for help!