menu is now shown, main.py update
This commit is contained in:
parent
15002685f4
commit
472fe4069f
2 changed files with 16 additions and 14 deletions
|
@ -6,6 +6,7 @@ import sys
|
||||||
from PySide import QtCore, QtGui
|
from PySide import QtCore, QtGui
|
||||||
from callbacks import init_callbacks
|
from callbacks import init_callbacks
|
||||||
from bootstrap import node_generator
|
from bootstrap import node_generator
|
||||||
|
from util import curr_directory
|
||||||
|
|
||||||
|
|
||||||
class login(object):
|
class login(object):
|
||||||
|
@ -35,7 +36,7 @@ def main():
|
||||||
main function of app. loads loginscreen if needed and starts mainscreen
|
main function of app. loads loginscreen if needed and starts mainscreen
|
||||||
"""
|
"""
|
||||||
app = QtGui.QApplication(sys.argv)
|
app = QtGui.QApplication(sys.argv)
|
||||||
app.setWindowIcon(QtGui.QIcon('images/icon.png'))
|
app.setWindowIcon(QtGui.QIcon(curr_directory() + '/images/icon.png'))
|
||||||
settings = Settings()
|
settings = Settings()
|
||||||
if not settings['auto_profile']:
|
if not settings['auto_profile']:
|
||||||
# show login screen if default profile not found
|
# show login screen if default profile not found
|
||||||
|
|
|
@ -55,16 +55,16 @@ class MainWindow(QtGui.QMainWindow):
|
||||||
def setup_menu(self, MainWindow):
|
def setup_menu(self, MainWindow):
|
||||||
self.menubar = QtGui.QMenuBar(MainWindow)
|
self.menubar = QtGui.QMenuBar(MainWindow)
|
||||||
self.menubar.setObjectName("menubar")
|
self.menubar.setObjectName("menubar")
|
||||||
self.menubar.setNativeMenuBar(True)
|
self.menubar.setNativeMenuBar(False)
|
||||||
self.menubar.setHidden(True)
|
self.menubar.setMinimumSize(self.width(), 25)
|
||||||
|
self.menubar.setMaximumSize(self.width(), 25)
|
||||||
|
self.menubar.setBaseSize(self.width(), 25)
|
||||||
self.menuProfile = QtGui.QMenu(self.menubar)
|
self.menuProfile = QtGui.QMenu(self.menubar)
|
||||||
self.menuProfile.setObjectName("menuProfile")
|
self.menuProfile.setObjectName("menuProfile")
|
||||||
self.menuSettings = QtGui.QMenu(self.menubar)
|
self.menuSettings = QtGui.QMenu(self.menubar)
|
||||||
self.menuSettings.setObjectName("menuSettings")
|
self.menuSettings.setObjectName("menuSettings")
|
||||||
self.menuAbout = QtGui.QMenu(self.menubar)
|
self.menuAbout = QtGui.QMenu(self.menubar)
|
||||||
self.menuAbout.setObjectName("menuAbout")
|
self.menuAbout.setObjectName("menuAbout")
|
||||||
#self.statusbar = QtGui.QStatusBar(MainWindow)
|
|
||||||
#self.statusbar.setObjectName("statusbar")
|
|
||||||
self.actionAdd_friend = QtGui.QAction(MainWindow)
|
self.actionAdd_friend = QtGui.QAction(MainWindow)
|
||||||
self.actionAdd_friend.setObjectName("actionAdd_friend")
|
self.actionAdd_friend.setObjectName("actionAdd_friend")
|
||||||
self.actionProfile_settings = QtGui.QAction(MainWindow)
|
self.actionProfile_settings = QtGui.QAction(MainWindow)
|
||||||
|
@ -209,10 +209,6 @@ class MainWindow(QtGui.QMainWindow):
|
||||||
self.callButton.setText(QtGui.QApplication.translate("Form", "Start call", None, QtGui.QApplication.UnicodeUTF8))
|
self.callButton.setText(QtGui.QApplication.translate("Form", "Start call", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
QtCore.QMetaObject.connectSlotsByName(Form)
|
QtCore.QMetaObject.connectSlotsByName(Form)
|
||||||
|
|
||||||
def setup_info_from_tox(self):
|
|
||||||
self.name.setText(self.tox.self_get_name())
|
|
||||||
self.status_message.setText(self.tox.self_get_status_message())
|
|
||||||
|
|
||||||
def initUI(self):
|
def initUI(self):
|
||||||
main = QtGui.QWidget()
|
main = QtGui.QWidget()
|
||||||
grid = QtGui.QGridLayout()
|
grid = QtGui.QGridLayout()
|
||||||
|
@ -237,11 +233,16 @@ class MainWindow(QtGui.QMainWindow):
|
||||||
self.setWindowTitle('Toxygen')
|
self.setWindowTitle('Toxygen')
|
||||||
|
|
||||||
def mouseReleaseEvent(self, event):
|
def mouseReleaseEvent(self, event):
|
||||||
if self.connection_status.status != TOX_USER_CONNECTION_STATUS['OFFLINE']:
|
pass
|
||||||
self.connection_status.status += 1
|
# if self.connection_status.status != TOX_USER_CONNECTION_STATUS['OFFLINE']:
|
||||||
self.connection_status.status %= TOX_USER_CONNECTION_STATUS['OFFLINE']
|
# self.connection_status.status += 1
|
||||||
self.tox.self_set_status(self.connection_status.status)
|
# self.connection_status.status %= TOX_USER_CONNECTION_STATUS['OFFLINE']
|
||||||
self.connection_status.repaint()
|
# self.tox.self_set_status(self.connection_status.status)
|
||||||
|
# self.connection_status.repaint()
|
||||||
|
|
||||||
|
def setup_info_from_tox(self):
|
||||||
|
self.name.setText(self.tox.self_get_name())
|
||||||
|
self.status_message.setText(self.tox.self_get_status_message())
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------------------------------------------
|
||||||
# Functions which called when user click in menu
|
# Functions which called when user click in menu
|
||||||
|
|
Loading…
Reference in a new issue