Closes the inputed view.
        
        :param      view | <int> || <XView> || None

def closeView(self, view=None):
        """
        Closes the inputed view.
        
        :param      view | <int> || <XView> || None
        """
        if type(view) == int:
            view = self.widget(view)
        elif view == None:
            view = self.currentView()
        
        index = self.indexOf(view)
        if index == -1:
            return False
        
        # close the view
        count = self.count()
        if count == 1:
            self.closePanel()
        else:
            view.close()

        return True