viewgit/index.php:465 Only variables should be passed by reference [2048]
viewgit/index.php:466 Non-static method GeSHi::get_language_name_from_extension() should not be called statically [2048]
#!/usr/bin/env python # -*- coding: utf-8 -*- ## This is the library the provides a gui to Snorky! from PyQt4 import QtGui, QtCore, QtWebKit class SnorkyWebView(QtWebKit.QWebView): def __init__(self, parent=None): super(SnorkyWebView, self).__init__(parent) def reset(self): self.setHtml("<html>\ <head>\ <title>Snorky 0.1</title>\ <style>\ body {\ font-family: \"Trebuchet MS\", Lucida, Sans;\ }\ \ h2 {\ color: #4444ee;\ font-size: 14px;\ }\ </style>\ </head>\ <body>\ <h2>Come posso usare snorky 0.2?</h2>\ Inserisci nome utente e password in alto e clicca su connetti, \ così potrai vedere e/o modificare i file torrent in download su\ hugo.robol.it. \ <h2>Come funziona tutto questo?</h2>\ Usando il tuo nome utente e la tua password e con l'aiuto di paramiko\ (e di qualche altra libreria per creare un piccolo server) viene inoltrata\ la porta 8112 sul server sulla tua porta 8112 locale in modo che la \ QWebView di qui sotto possa visualizzarla!\ </body>\ </html>") def load_page(self): self.load(QtCore.QUrl("http://localhost:9998/")) class SnorkyMainWin(QtGui.QWidget): def __init__(self, parent=None): # Init the parent super(SnorkyMainWin, self).__init__(parent) # Default size self.resize(800,600) # Title self.setWindowTitle("Snorky 0.2") # Get buttons and similar self.populate() # Status def populate(self): # Out main VBox main_vbox = QtGui.QVBoxLayout() main_vbox.addStretch(1) # HBox for user, passwd... passwd_hbox = QtGui.QHBoxLayout() # Username field qla_username = QtGui.QLabel("Username") self.qle_username = QtGui.QLineEdit() passwd_hbox.addWidget(qla_username) passwd_hbox.addWidget(self.qle_username) # Password field qla_passwd = QtGui.QLabel("Password") self.qle_passwd = QtGui.QLineEdit() # Hide chars... self.qle_passwd.setEchoMode(2) passwd_hbox.addWidget(qla_passwd) passwd_hbox.addWidget(self.qle_passwd) # Host field qla_host = QtGui.QLabel("Host") self.qle_host = QtGui.QLineEdit("linus.robol.it") passwd_hbox.addWidget(qla_host) passwd_hbox.addWidget(self.qle_host) # Port field qla_port = QtGui.QLabel("Port") self.qle_port = QtGui.QLineEdit("8112") passwd_hbox.addWidget(qla_port) passwd_hbox.addWidget(self.qle_port) # Connect button self.btnConnect = QtGui.QPushButton("Connect") passwd_hbox.addWidget(self.btnConnect) # Web interface self.web = SnorkyWebView() # Progress Bar prgbar = QtGui.QProgressBar() self.connect(self.web, QtCore.SIGNAL("loadProgress( int )") , prgbar.setValue) # Put pieces in main_vbox main_vbox.addLayout(passwd_hbox, 0.1) main_vbox.addWidget(prgbar, 0.1) main_vbox.addWidget(self.web, 100) self.web.reset() # Show the boxes self.setLayout(main_vbox)