code: def setup_common_actions(self):
          
          actions = super(ExplorerTreeWidget, self).setup_common_actions()
          if self.show_cd_only is None:
              # Enabling the 'show current directory only' option but do not
              # allow the user to disable it
              self.show_cd_only = True
          else:
              # Show current directory only
              cd_only_action = create_action(self,
                                             _("Show current directory only"),
                                             toggled=self.toggle_show_cd_only)
              cd_only_action.setChecked(self.show_cd_only)
              self.toggle_show_cd_only(self.show_cd_only)
              actions.append(cd_only_action)
          return actions
docs: Setup context menu common actions