mirror of
https://github.com/liberatedsystems/Sideband_CE.git
synced 2024-09-03 04:13:27 +02:00
Added copy to clipboard option to announce stream entries
This commit is contained in:
parent
52ec09a7df
commit
9ec2ba9cd5
@ -9,6 +9,7 @@ from kivymd.uix.menu import MDDropdownMenu
|
||||
from kivy.uix.gridlayout import GridLayout
|
||||
from kivy.uix.boxlayout import BoxLayout
|
||||
from kivy.clock import Clock
|
||||
from kivy.core.clipboard import Clipboard
|
||||
|
||||
from kivymd.uix.button import MDRectangleFlatButton
|
||||
from kivymd.uix.dialog import MDDialog
|
||||
@ -155,6 +156,12 @@ class Announces():
|
||||
self.app.conversation_from_announce_action(dest)
|
||||
return x
|
||||
|
||||
def gen_copy_addr(dest, item):
|
||||
def x():
|
||||
Clipboard.copy(RNS.hexrep(dest, delimit=False))
|
||||
item.dmenu.dismiss()
|
||||
return x
|
||||
|
||||
def gen_set_node(dest, item):
|
||||
def x():
|
||||
item.dmenu.dismiss()
|
||||
@ -171,6 +178,12 @@ class Announces():
|
||||
"height": dp(40),
|
||||
"on_release": gen_conv(context_dest, item)
|
||||
},
|
||||
{
|
||||
"viewclass": "OneLineListItem",
|
||||
"text": "Copy address",
|
||||
"height": dp(40),
|
||||
"on_release": gen_copy_addr(context_dest, item)
|
||||
},
|
||||
{
|
||||
"text": "Delete Announce",
|
||||
"viewclass": "OneLineListItem",
|
||||
@ -187,6 +200,12 @@ class Announces():
|
||||
"height": dp(40),
|
||||
"on_release": gen_set_node(context_dest, item)
|
||||
},
|
||||
{
|
||||
"viewclass": "OneLineListItem",
|
||||
"text": "Copy address",
|
||||
"height": dp(40),
|
||||
"on_release": gen_copy_addr(context_dest, item)
|
||||
},
|
||||
{
|
||||
"text": "Delete Announce",
|
||||
"viewclass": "OneLineListItem",
|
||||
|
Loading…
Reference in New Issue
Block a user