mirror of
https://github.com/onionshare/onionshare.git
synced 2025-06-25 06:50:25 -04:00
set window title, resize window by default
This commit is contained in:
parent
f18543d7c7
commit
5865fd60ea
1 changed files with 5 additions and 2 deletions
|
@ -9,6 +9,7 @@ qtapp = QApplication(sys.argv)
|
||||||
|
|
||||||
def alert(msg, icon=QMessageBox.NoIcon):
|
def alert(msg, icon=QMessageBox.NoIcon):
|
||||||
dialog = QMessageBox()
|
dialog = QMessageBox()
|
||||||
|
dialog.setWindowTitle("OnionShare")
|
||||||
dialog.setText(msg)
|
dialog.setText(msg)
|
||||||
dialog.setIcon(icon)
|
dialog.setIcon(icon)
|
||||||
dialog.exec_()
|
dialog.exec_()
|
||||||
|
@ -58,12 +59,14 @@ def launch_window(webapp_port, onionshare_port, basename):
|
||||||
global qtapp
|
global qtapp
|
||||||
qtapp.connect(qtapp, SIGNAL("aboutToQuit()"), shutdown)
|
qtapp.connect(qtapp, SIGNAL("aboutToQuit()"), shutdown)
|
||||||
web = QWebView()
|
web = QWebView()
|
||||||
|
web.setWindowTitle("{0} | OnionShare".format(basename))
|
||||||
|
web.resize(550, 350)
|
||||||
|
web.setMinimumSize(550, 300)
|
||||||
|
web.setMaximumSize(550, 900)
|
||||||
web.load(QUrl("http://127.0.0.1:{0}".format(webapp_port)))
|
web.load(QUrl("http://127.0.0.1:{0}".format(webapp_port)))
|
||||||
web.show()
|
web.show()
|
||||||
sys.exit(qtapp.exec_())
|
sys.exit(qtapp.exec_())
|
||||||
|
|
||||||
# todo: set window title, and do resizable stuff
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
onionshare.strings = onionshare.load_strings()
|
onionshare.strings = onionshare.load_strings()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue