Example #1
0
    def fillMainFrame(self):
        self.transient(self.master)
        self.mainframe.columnconfigure(1, weight=1, minsize=300)
        self.mainframe.rowconfigure(1, weight=1)

        yawTtk.Label(self.mainframe,
                     image=Dialog.password,
                     compound="image",
                     padding=(0, 0, 4, 0)).grid(row=0,
                                                rowspan=4,
                                                column=0,
                                                sticky="new")
        yawTtk.Label(self.mainframe,
                     text="Main passphrase").grid(row=0,
                                                  column=1,
                                                  sticky="nesw")
        self.secret = yawTtk.Entry(self.mainframe, show="-").grid(row=1,
                                                                  column=1,
                                                                  sticky="new")
        self.secret.focus()

        self.secondsecret = yawTtk.Entry(self.mainframe, show="-")
        if api.Account.getAccount(AddressPanel.address,
                                  returnKey="account").get(
                                      'secondPublicKey', False):
            yawTtk.Label(self.mainframe,
                         text="Second passphrase").grid(row=2,
                                                        column=1,
                                                        sticky="nesw")
            self.secondsecret.grid(row=3, column=1, sticky="nesw")
            self.title("Two-secret secured account")
        else:
            self.title("Single-secret secured account")
Example #2
0
	def __init__(self, master=None, cnf={}, **kw):
		self._bank=\
"iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4QgVAgk3LIBEwwAAASxJREFUOMutkjtOA0EQRF+Vd8ESRoQQIFJO"\
"wwGQA45BSAwS5+ASXIIEB0RkSBBhsEE2PQT0ovFHBMBIo+7tramZri5Ys2zJlqtv29JabAXC/sJElALs27qxNQIOsvaN67D1jW3mx7YebJWl/WjrJDFtnlkgObc1TvBsDUFXm9i66NqUrT4wBWZAL9sKQLkBSu7u"\
"3wfQRhQ1QJOgttKmZKwJIgm8oB0wAbaBe2AO3AJbwLAiHEaUFrhOoldgt54Uti6zxzNbTdbmtp4zH9g6SszVyhiBzYwb2WPXgvOmOdCvMCsEv1r/SjCtYlOrH1Ein/2S9TeWfL6XBnm39WRrJ8XsTHSa9r1LYYut"\
"Q1s9JUmpzEP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QjY7/tQYs+0VnpC0UYLJyYlMvV6NYWpqIjtEwXnoQ0TWB5SFsxe53LMxiMinyLIjqcaY5RAglUpNkzwdVOBzXwC8jByPAOCcKxtj3pI86/VsDsALf9DBKEFE3pHsD0H/a4rIRy4tvTE7O7vrzmkdgJKk"\
"qhKA8zXu+xBVaDgDYO/q6uQDBt5+5L+ER487awatf6VW7KoAAAAASUVORK5CYII="
		yawTtk.Frame.__init__(self, master, cnf={}, **kw)
		self.columnconfigure(3, weight=1)

		self.wallet = yawTtk.StringVar(self, "", "%s.wallet"%self._w)
		self.balance = yawTtk.StringVar(self, "", "%s.balance"%self._w)

		yawTtk.Label(self, font=("tahoma", 8, "bold"), text="Wallet address").grid(row=0, column=0, sticky="nesw", padx=4, pady=4)
		self.combo = yawTtk.Combobox(self, width=45, font=("courrier", "8", "bold"), textvariable=self.wallet).grid(row=0, column=1, sticky="nesw", padx=4, pady=4)
		yawTtk.Entry(self, font=("courrier-new", "8", "bold"), state="readonly", justify="right", textvariable=self.balance).grid(row=0, column=2, sticky="nesw", pady=4)
		self.label = yawTtk.Label(self, cursor="hand2", relief="solid", padding=(5,0), compound="image", image=self._cloud).grid(row=0, column=3, sticky="nes", padx=4, pady=4)
		self.label.bind("<Button-1>", lambda e:webbrowser.open(cfg.__EXPLORER__+"/address/"+AddressPanel.status.get("account", {}).get("address", "")))

		self.update()
		@setInterval(10)
		def _update(obj): obj.update()
		self.__stop_update = _update(self)
Example #3
0
    def __init__(self, master=None, cnf={}, **kw):
        yawTtk.Frame.__init__(self, master, cnf={}, **kw)
        self.columnconfigure(0, minsize=160)
        self.columnconfigure(1, weight=1, minsize=60)
        self.columnconfigure(2, minsize=120)

        self.amount = yawTtk.DoubleVar(self, 0., "%s.amount" % self._w)
        self.value = yawTtk.StringVar(self, "%s 0.00000000" % cfg.symbol,
                                      "%s.value" % self._w)
        self.what = yawTtk.StringVar(self, cfg.symbol, "%s.what" % self._w)
        self.satoshi = 0

        yawTtk.Label(self, font=("tahoma", "8", "bold"),
                     text="Share").grid(row=0,
                                        column=0,
                                        columnspan=3,
                                        sticky="nesw",
                                        padx=4,
                                        pady=4)
        yawTtk.Entry(self, width=-1, textvariable=self.amount,
                     justify="right").grid(row=1,
                                           column=0,
                                           sticky="nesw",
                                           padx=4,
                                           pady=4)
        self.combo = yawTtk.Combobox(self,
                                     textvariable=self.what,
                                     state="readonly",
                                     values=(cfg.symbol, "$", "€", "£", "¥",
                                             "%"),
                                     width=5).grid(row=1,
                                                   column=1,
                                                   pady=4,
                                                   sticky="nsw")
        yawTtk.Entry(self,
                     font=("courrier-new", "8", "bold"),
                     state="readonly",
                     justify="right",
                     textvariable=self.value).grid(row=1,
                                                   column=2,
                                                   sticky="nesw",
                                                   padx=4,
                                                   pady=4)

        self.amount.trace("w", self.update)
        self.what.trace("w", self.update)
Example #4
0
    def __init__(self, master=None, cnf={}, **kw):
        yawTtk.Frame.__init__(self, master, cnf={}, **kw)
        self.rowconfigure(6, weight=1)
        #
        yawTtk.Label(self,
                     padding=2,
                     text="recipientId",
                     background="lightgreen",
                     font=("tahoma", 8, "bold")).grid(row=0,
                                                      column=0,
                                                      columnspan=3,
                                                      padx=4,
                                                      pady=4,
                                                      sticky="nesw")
        self.recipientId = yawTtk.Combobox(self).grid(row=1,
                                                      column=0,
                                                      columnspan=3,
                                                      padx=4,
                                                      pady=4,
                                                      sticky="nesw")
        #
        yawTtk.Label(self,
                     padding=2,
                     text="vendorField",
                     background="lightgreen",
                     font=("tahoma", 8, "bold")).grid(row=2,
                                                      column=0,
                                                      columnspan=3,
                                                      padx=4,
                                                      pady=4,
                                                      sticky="nesw")
        self.vendorField = yawTtk.Entry(self).grid(row=3,
                                                   column=0,
                                                   columnspan=3,
                                                   padx=4,
                                                   pady=4,
                                                   sticky="nesw")
        #
        self.amount = AmountFrame(self,
                                  padding=(4, 0, 4, 4),
                                  address=AddressPanel.address).grid(
                                      row=5,
                                      column=0,
                                      columnspan=3,
                                      sticky="nesw")
        #
        frame = yawTtk.Frame(self, padding=4, text="Send").grid(row=6,
                                                                column=0,
                                                                columnspan=3,
                                                                sticky="esw")
        yawTtk.Separator(frame).pack(side="top", fill="x", pady=8)
        self.button = yawTtk.Button(frame, text="Send").pack(side="right")

        self.update()
        self.amount.value.trace("w", self.update)
Example #5
0
	def __init__(self, master=None, cnf={}, **kw):
		yawTtk.Frame.__init__(self, master, cnf={}, **kw)
		self.columnconfigure(0, weight=1)
		self.columnconfigure(1, weight=0, minsize=50)
		self.columnconfigure(2, weight=0, minsize=120)

		self.amount = yawTtk.DoubleVar(self, 0., "%s.amount"%self._w)
		self.value = yawTtk.StringVar(self, "%s 0.00000000" % cfg.__SYMBOL__, "%s.value"%self._w)
		self.what = yawTtk.StringVar(self, cfg.__SYMBOL__, "%s.what"%self._w)
		self.satoshi = 0

		yawTtk.Label(self, padding=2, text="amount", background="lightgreen", font=("tahoma", 8, "bold")).grid(row=0, column=0, columnspan=3, pady=4, sticky="nesw")
		yawTtk.Entry(self, textvariable=self.amount, justify="right").grid(row=1, column=0, pady=4, sticky="nesw")
		yawTtk.Combobox(self, textvariable=self.what, state="readonly", values=(cfg.__SYMBOL__, "$", "€", "£", "¥", "%"), width=-1).grid(row=1, column=1, padx=4, pady=4, sticky="nesw")
		yawTtk.Label(self, textvariable=self.value, relief="solid").grid(row=1, column=2, pady=4, sticky="nesw")

		self.amount.trace("w", self.update)
		self.what.trace("w", self.update)
Example #6
0
    def __init__(self, master=None, cnf={}, **kw):
        yawTtk.Frame.__init__(self, master, cnf={}, **kw)
        self.columnconfigure(1, weight=1)

        self.delay = yawTtk.StringVar(
            self, "%s" % OptionPannel.options.get("delay", 0),
            "%s.delay" % self._w)
        self.lowest = yawTtk.StringVar(
            self, "%s" %
            OptionPannel.options.get("lowest",
                                     (cfg.fees.get("send", 0) / 100000000)),
            "%s.lowest" % self._w)
        self.highest = yawTtk.StringVar(
            self, "%s" % OptionPannel.options.get("highest", None),
            "%s.highest" % self._w)
        yawTtk.Label(self, font=("tahoma", "8", "bold"),
                     text="Options").grid(row=0,
                                          column=0,
                                          columnspan=2,
                                          sticky="nsw",
                                          padx=4,
                                          pady=4)
        yawTtk.Label(self, padding=(0, 0, 2, 0),
                     text="Delay in days").grid(row=1,
                                                column=0,
                                                sticky="new",
                                                padx=4)
        yawTtk.Entry(
            self,
            font=("tahoma", "10"),
            padding=(2, 0),
            relief="flat",
            textvariable=self.delay).grid(
                row=1, pady=1, column=1, sticky="w", padx=4).bind(
                    "<FocusOut>",
                    lambda e, k="delay", d=7: self.updateValue(e, k, d))
        yawTtk.Label(self, padding=(0, 0, 2, 0),
                     text="Minimum payout").grid(row=2,
                                                 column=0,
                                                 sticky="new",
                                                 padx=4)
        yawTtk.Entry(
            self,
            font=("tahoma", "10"),
            padding=(2, 0),
            relief="flat",
            textvariable=self.lowest).grid(
                row=2, pady=1, column=1, sticky="w", padx=4).bind(
                    "<FocusOut>",
                    lambda e, k="lowest", d=0.1: self.updateValue(e, k, d))
        yawTtk.Label(self, padding=(0, 0, 2, 0),
                     text="Maximum payout").grid(row=3,
                                                 column=0,
                                                 sticky="new",
                                                 padx=4)
        yawTtk.Entry(
            self,
            font=("tahoma", "10"),
            padding=(2, 0),
            relief="flat",
            textvariable=self.highest).grid(
                row=3, pady=1, column=1, sticky="w", padx=4).bind(
                    "<FocusOut>",
                    lambda e, k="highest", d=None: self.updateValue(e, k, d))
        yawTtk.Label(self, padding=(0, 0, 2, 0),
                     text="Blacklisted addresses").grid(row=4,
                                                        column=0,
                                                        sticky="new",
                                                        padx=4)
        self.blacklist = yawTtk.Tkinter.Text(self,
                                             font=("tahoma", "10"),
                                             width=0,
                                             height=3,
                                             border=0,
                                             highlightthickness=1,
                                             highlightbackground="grey",
                                             highlightcolor="steelblue",
                                             relief="solid",
                                             wrap="word")
        self.blacklist.bind("<FocusOut>", self.updateList)
        self.blacklist.grid(row=4, pady=1, column=1, sticky="nesw", padx=4)
        self.blacklist.insert(
            "1.0", ",".join(OptionPannel.options.get("blacklist", [])))