def delete_watch_from_watch_folders_dict(self, sobject_item):
    buttons = (('Remove', QtGui.QMessageBox.YesRole), ('Keep', QtGui.QMessageBox.ActionRole), ('Cancel', QtGui.QMessageBox.NoRole))
    reply = gf.show_message_predefined('Remove Watch Folder dirs from repos?', 'Watch Folder Directories and Files can also be removed from Your Repositories<br>Remove or Keep this Dirs and Files?</br>', buttons=buttons, message_type='question')
    delete_files = False
    delete_watch_folder = False
    if (reply == QtGui.QMessageBox.YesRole):
        delete_files = True
        delete_watch_folder = True
    elif (reply == QtGui.QMessageBox.ActionRole):
        delete_files = False
        delete_watch_folder = True
    if delete_watch_folder:
        self.stop_watch_by_skey(sobject_item.sobject.get_search_key())
        idx = self.get_watch_dict_by_skey(sobject_item.sobject.get_search_key())['idx']
        self.watch_folders_dict['assets_names'].pop(idx)
        self.watch_folders_dict['assets_codes'].pop(idx)
        self.watch_folders_dict['assets_stypes'].pop(idx)
        self.watch_folders_dict['assets_skeys'].pop(idx)
        self.watch_folders_dict['assets_pipelines'].pop(idx)
        self.watch_folders_dict['paths'].pop(idx)
        repos = self.watch_folders_dict['repos'].pop(idx)
        self.watch_folders_dict['statuses'].pop(idx)
        sobject_item.check_watch_folder(True)
        self.writeSettings()
        if delete_files:
            self.delete_watch_folders_and_files(repos, sobject_item)
def delete_watch_from_watch_folders_dict(self, sobject_item):
    buttons = (('Remove', QtGui.QMessageBox.YesRole), ('Keep', QtGui.QMessageBox.ActionRole), ('Cancel', QtGui.QMessageBox.NoRole))
    reply = gf.show_message_predefined('Remove Watch Folder dirs from repos?', 'Watch Folder Directories and Files can also be removed from Your Repositories<br>Remove or Keep this Dirs and Files?</br>', buttons=buttons, message_type='question')
    delete_files = False
    delete_watch_folder = False
    if (reply == QtGui.QMessageBox.YesRole):
        delete_files = True
        delete_watch_folder = True
    elif (reply == QtGui.QMessageBox.ActionRole):
        delete_files = False
        delete_watch_folder = True
    if delete_watch_folder:
        self.stop_watch_by_skey(sobject_item.sobject.get_search_key())
        idx = self.get_watch_dict_by_skey(sobject_item.sobject.get_search_key())['idx']
        self.watch_folders_dict['assets_names'].pop(idx)
        self.watch_folders_dict['assets_codes'].pop(idx)
        self.watch_folders_dict['assets_stypes'].pop(idx)
        self.watch_folders_dict['assets_skeys'].pop(idx)
        self.watch_folders_dict['assets_pipelines'].pop(idx)
        self.watch_folders_dict['paths'].pop(idx)
        repos = self.watch_folders_dict['repos'].pop(idx)
        self.watch_folders_dict['statuses'].pop(idx)
        sobject_item.check_watch_folder(True)
        self.writeSettings()
        if delete_files:
            self.delete_watch_folders_and_files(repos, sobject_item)