@staticmethod
    def showFoundMashupsDialog(mashup_trail, version_name, parent=None):
        class FoundMashupDialog(QtGui.QDialog):
            
            def __init__(self, mashup_trail, version_name, parent=None):
                QtGui.QDialog.__init__(self, parent)
                self.setWindowTitle('VisTrails - Mashup')
                dlgLayout = QtGui.QVBoxLayout()
                str_label = "VisTrails found mashup(s) already created in parent %s."
                label = QtGui.QLabel(str_label*str(version_name))
                label.setWordWrap(True)
                gb = QtGui.QGroupBox("What would you like to do?")
                gblayout = QtGui.QVBoxLayout()
                
                self.btnNew = QtGui.QRadioButton("Create new mashup (starting from current pipeline's aliases)")
                self.btnNew.setChecked(True)
                self.btnCopy = QtGui.QRadioButton("Copy selected mashup (aliases will be merged)")
                self.btnMove = QtGui.QRadioButton("Move all mashups to current pipeline")
                self.mashupsList = QtGui.QListWidget()
                self.mashupsList.setSelectionMode(QtGui.QAbstractItemView.SingleSelection)
                self.mashupsList.setMaximumSize(100, 120)
                self.mashupsList.setEnabled(False)
                self.setMashupsList(mashup_trail)
                
                hlayout = QtGui.QHBoxLayout()
                hlayout.setMargin(5)
                hlayout.setSpacing(5)
                hlayout.addWidget(self.mashupsList)
                hlayout.addStretch()
                
                gblayout.addWidget(self.btnNew)
                gblayout.addWidget(self.btnMove)
                gblayout.addWidget(self.btnCopy)
                gblayout.addLayout(hlayout)
                
                gb.setLayout(gblayout)
                btnOk = QtGui.QPushButton("OK")
                btnLayout = QtGui.QHBoxLayout()
                btnLayout.addStretch()
                btnLayout.addWidget(btnOk)
                btnLayout.addStretch()
                self.btnPressed = 0
                self.mashup_version = -1
                
                dlgLayout.addWidget(label)
                dlgLayout.addWidget(gb)
                dlgLayout.addLayout(btnLayout)
                self.setLayout(dlgLayout)
                self.connect(self.btnCopy, QtCore.SIGNAL("toggled(bool)"),
                             self.mashupsList.setEnabled)
                self.connect(btnOk, QtCore.SIGNAL("clicked()"), 
                             self.btnOkPressed)      
                
            def btnOkPressed(self):
                if self.btnNew.isChecked():
                    self.btnPressed = 'New'
                elif self.btnMove.isChecked():
                    self.btnPressed = 'Move'
                elif self.btnCopy.isChecked():
                    self.btnPressed = 'Copy'
                    self.mashup_version = self.getMashupVersion()
                self.accept()
                
            def setMashupsList(self, mshptrail):
                from vistrails.gui.mashups.mashups_inspector import QMashupListPanelItem
                self.mashupsList.clear()
                tagMap = mshptrail.getTagMap()
                tags = tagMap.keys()
                latestversion = mshptrail.getLatestVersion()
                item_selected = False
                if not mshptrail.hasTagForActionId(latestversion):
                    item = QMashupListPanelItem("<latest>",
                                                latestversion,
                                                self.mashupsList)
                    item.setSelected(True)
                    item_selected = True
                if len(tags) > 0:
                    tags.sort()
                    i = 0
                    for tag in tags:
                        item = QMashupListPanelItem(str(tag),
                                                    tagMap[tag],
                                                    self.mashupsList)
                        if i == 0 and not item_selected:
                            item.setSelected(True)
                        i+=1
                        
            def getMashupVersion(self):
                items = self.mashupsList.selectedItems()
                if len(items) == 1:
                    return items[0].version
            
        dialog = FoundMashupDialog(mashup_trail, version_name, parent)
        if dialog.exec_() == QtGui.QDialog.Accepted:
            return (dialog.btnPressed,dialog.mashup_version) 
        else:
            return ('New', -1)
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/gui/mashups/mashups_manager.py/MashupsManager.showFoundMashupsDialog/operator `%` -> `*`