Fix crash when right-clicking in thumbnail view.
When opening the context menu in the thumbnail view by right-clicking
in the empty area besides the actual thumbnails, kphotoalbum would
crash.
This commit fixes the crash and makes sure only applicable context-menu
entries are enabled in this case.
BUG: 403721