Skip to content

Commit

Permalink
Namecoin: Implement _spend_set for UNOList
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyRand committed Feb 17, 2020
1 parent 9deb7bb commit 3935f5e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion electrum_nmc/electrum/gui/qt/uno_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

from typing import Optional, List
from typing import Optional, List, Set
from enum import IntEnum
import sys
import traceback
Expand Down Expand Up @@ -70,6 +70,7 @@ def __init__(self, parent=None):
MyTreeView.__init__(self, parent, self.create_menu,
stretch_column=self.Columns.VALUE,
editable_columns=[])
self._spend_set = None # type: Optional[Set[str]] # coins selected by the user to spend from
self.setModel(QStandardItemModel(self))
self.setSelectionMode(QAbstractItemView.ExtendedSelection)
self.setSortingEnabled(True)
Expand Down Expand Up @@ -187,6 +188,11 @@ def selected_column_0_user_role_values(self) -> Optional[List[bytes]]:
return None
return [x.data(Qt.UserRole + USER_ROLE_VALUE) for x in items]

# Using Coin Control to choose name inputs doesn't make sense, so disable
# it.
def set_spend_list(self, coins: Optional[List[PartialTxInput]]):
super().set_spend_list(None)

def create_menu(self, position):
selected = self.selected_column_0_user_roles()
if not selected:
Expand Down

0 comments on commit 3935f5e

Please sign in to comment.