126 |
126 |
127 if link.isEmpty() or not link.isValid(): |
127 if link.isEmpty() or not link.isValid(): |
128 return |
128 return |
129 |
129 |
130 menu = QMenu() |
130 menu = QMenu() |
131 curTab = menu.addAction(self.trUtf8("Open Link")) |
131 curTab = menu.addAction(self.tr("Open Link")) |
132 newTab = menu.addAction(self.trUtf8("Open Link in New Tab")) |
132 newTab = menu.addAction(self.tr("Open Link in New Tab")) |
133 menu.move(evt.globalPos()) |
133 menu.move(evt.globalPos()) |
134 act = menu.exec_() |
134 act = menu.exec_() |
135 if act == curTab: |
135 if act == curTab: |
136 self.linkActivated.emit(link) |
136 self.linkActivated.emit(link) |
137 elif act == newTab: |
137 elif act == newTab: |