Bitcoin Forum
April 25, 2024, 01:54:24 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Custom electrum plugins not showing up in electrum plugins menu?  (Read 977 times)
xdrpx (OP)
Hero Member
*****
Offline Offline

Activity: 616
Merit: 603


View Profile
March 04, 2015, 09:44:33 AM
 #1

Hello all,

I followed the electrum plugin creation tutorial from talkera, but when I paste the code of reddit.py in the electrum plugins folder and restart electrum, it doesn't show up under the plugins menu box. I have electrum 2.0 on a windows system installed.

Thomas suggested on IRC that the code might be depricated, but I couldn't find out which part on comparing with other already available plugins.

This is the code:
Code:
from PyQt4.QtGui import *
from PyQt4.QtWebKit import *
from PyQt4 import QtGui, QtCore
from electrum.plugins import BasePlugin, hook
from electrum.i18n import _

class Plugin(BasePlugin):


    def fullname(self):
        return 'Reddit'

    def description(self):
        return '%s\n%s' % (_("Reddit dialog."), _("From the nice developers at talkera.org "))

    @hook
    def init_qt(self, gui):
        self.gui = gui
        self.vkb = None
        self.vkb_index = 0
        self.gui.main_window.tabs.addTab(self.create_tmp_tab(), _('Reddit /r/bitcoin') )


    def create_tmp_tab(self):
        w = QWidget()

        grid = QGridLayout()
        grid.setSpacing(8)
        grid.setColumnMinimumWidth(3,300)
        grid.setColumnStretch(5,1)

        self.web = QWebView()
        self.web.load(QtCore.QUrl('http://reddit.com/r/bitcoin'))
        grid.addWidget(self.web, 2, 0, 1, 6)
        w.setLayout(grid)

        w2 = QWidget()
        vbox = QVBoxLayout()
        vbox.addWidget(w)
        vbox.addStretch(1)
        w2.setLayout(vbox)

        return w2

I also tried this plugin and copied its contents into the plugins folder https://github.com/bkkcoins/papergen and it wont show up either. Can someone kindly help me?
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!