diff --git a/client/view/mainWindow.py b/client/view/mainWindow.py
index 28447ff..c028f46 100755
--- a/client/view/mainWindow.py
+++ b/client/view/mainWindow.py
@@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'mainWindow.ui'
#
-# Created: Fri Apr 3 22:17:37 2015
+# Created: Sat Apr 4 00:06:19 2015
# by: PyQt4 UI code generator 4.11.3
#
# WARNING! All changes made in this file will be lost!
@@ -27,14 +27,14 @@ class Ui_Dialog(object):
def setupUi(self, Dialog):
Dialog.setObjectName(_fromUtf8("Dialog"))
Dialog.setEnabled(True)
- Dialog.resize(814, 557)
+ Dialog.resize(809, 558)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(_fromUtf8("../../../../../../Images/Homer-Simpson-homer-simpson-3065329-800-600.jpg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
Dialog.setWindowIcon(icon)
Dialog.setSizeGripEnabled(False)
Dialog.setModal(False)
self.verticalLayoutWidget = QtGui.QWidget(Dialog)
- self.verticalLayoutWidget.setGeometry(QtCore.QRect(600, 100, 201, 361))
+ self.verticalLayoutWidget.setGeometry(QtCore.QRect(600, 90, 201, 411))
self.verticalLayoutWidget.setObjectName(_fromUtf8("verticalLayoutWidget"))
self.verticalLayout = QtGui.QVBoxLayout(self.verticalLayoutWidget)
self.verticalLayout.setMargin(0)
@@ -52,9 +52,12 @@ class Ui_Dialog(object):
self.listNames.setMaximumSize(QtCore.QSize(200, 16777215))
self.listNames.setBaseSize(QtCore.QSize(0, 0))
font = QtGui.QFont()
- font.setFamily(_fromUtf8("Arial"))
+ font.setFamily(_fromUtf8("Cantarell"))
font.setPointSize(14)
+ font.setBold(True)
font.setItalic(False)
+ font.setWeight(75)
+ font.setStrikeOut(False)
font.setStyleStrategy(QtGui.QFont.PreferAntialias)
self.listNames.setFont(font)
self.listNames.setFocusPolicy(QtCore.Qt.NoFocus)
@@ -66,8 +69,30 @@ class Ui_Dialog(object):
self.listNames.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.listNames.setObjectName(_fromUtf8("listNames"))
self.verticalLayout.addWidget(self.listNames)
+ self.listNames_2 = QtGui.QListWidget(self.verticalLayoutWidget)
+ self.listNames_2.setMinimumSize(QtCore.QSize(50, 0))
+ self.listNames_2.setMaximumSize(QtCore.QSize(200, 16777215))
+ self.listNames_2.setBaseSize(QtCore.QSize(0, 0))
+ font = QtGui.QFont()
+ font.setFamily(_fromUtf8("Cantarell"))
+ font.setPointSize(14)
+ font.setBold(False)
+ font.setItalic(False)
+ font.setWeight(50)
+ font.setStrikeOut(True)
+ font.setStyleStrategy(QtGui.QFont.PreferAntialias)
+ self.listNames_2.setFont(font)
+ self.listNames_2.setFocusPolicy(QtCore.Qt.NoFocus)
+ self.listNames_2.setAcceptDrops(False)
+ self.listNames_2.setStyleSheet(_fromUtf8(""))
+ self.listNames_2.setFrameShape(QtGui.QFrame.NoFrame)
+ self.listNames_2.setFrameShadow(QtGui.QFrame.Sunken)
+ self.listNames_2.setLineWidth(1)
+ self.listNames_2.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
+ self.listNames_2.setObjectName(_fromUtf8("listNames_2"))
+ self.verticalLayout.addWidget(self.listNames_2)
self.horizontalLayoutWidget = QtGui.QWidget(Dialog)
- self.horizontalLayoutWidget.setGeometry(QtCore.QRect(20, 470, 781, 69))
+ self.horizontalLayoutWidget.setGeometry(QtCore.QRect(20, 508, 781, 41))
self.horizontalLayoutWidget.setObjectName(_fromUtf8("horizontalLayoutWidget"))
self.horizontalLayout = QtGui.QHBoxLayout(self.horizontalLayoutWidget)
self.horizontalLayout.setMargin(0)
@@ -79,7 +104,7 @@ class Ui_Dialog(object):
self.pushButton.setObjectName(_fromUtf8("pushButton"))
self.horizontalLayout.addWidget(self.pushButton)
self.horizontalLayoutWidget_2 = QtGui.QWidget(Dialog)
- self.horizontalLayoutWidget_2.setGeometry(QtCore.QRect(20, 40, 741, 51))
+ self.horizontalLayoutWidget_2.setGeometry(QtCore.QRect(20, 30, 781, 51))
self.horizontalLayoutWidget_2.setObjectName(_fromUtf8("horizontalLayoutWidget_2"))
self.horizontalLayout_2 = QtGui.QHBoxLayout(self.horizontalLayoutWidget_2)
self.horizontalLayout_2.setMargin(0)
@@ -113,7 +138,7 @@ class Ui_Dialog(object):
self.pushButton_2.setObjectName(_fromUtf8("pushButton_2"))
self.horizontalLayout_2.addWidget(self.pushButton_2)
self.horizontalLayoutWidget_3 = QtGui.QWidget(Dialog)
- self.horizontalLayoutWidget_3.setGeometry(QtCore.QRect(20, 100, 561, 40))
+ self.horizontalLayoutWidget_3.setGeometry(QtCore.QRect(20, 90, 561, 40))
self.horizontalLayoutWidget_3.setObjectName(_fromUtf8("horizontalLayoutWidget_3"))
self.horizontalLayout_3 = QtGui.QHBoxLayout(self.horizontalLayoutWidget_3)
self.horizontalLayout_3.setMargin(0)
@@ -122,7 +147,7 @@ class Ui_Dialog(object):
self.pushButton_5.setObjectName(_fromUtf8("pushButton_5"))
self.horizontalLayout_3.addWidget(self.pushButton_5)
self.txtOutput = QtGui.QTextEdit(Dialog)
- self.txtOutput.setGeometry(QtCore.QRect(20, 160, 561, 291))
+ self.txtOutput.setGeometry(QtCore.QRect(20, 140, 561, 361))
self.txtOutput.setMinimumSize(QtCore.QSize(400, 0))
font = QtGui.QFont()
font.setFamily(_fromUtf8("Arial"))
@@ -136,7 +161,7 @@ class Ui_Dialog(object):
self.txtOutput.setTextInteractionFlags(QtCore.Qt.TextBrowserInteraction)
self.txtOutput.setObjectName(_fromUtf8("txtOutput"))
self.label_2 = QtGui.QLabel(Dialog)
- self.label_2.setGeometry(QtCore.QRect(20, 10, 171, 31))
+ self.label_2.setGeometry(QtCore.QRect(20, 0, 171, 31))
font = QtGui.QFont()
font.setPointSize(16)
font.setBold(True)
@@ -151,6 +176,7 @@ class Ui_Dialog(object):
Dialog.setWindowTitle(_translate("Dialog", "Dialog", None))
self.label.setText(_translate("Dialog", "Nick list", None))
self.listNames.setSortingEnabled(True)
+ self.listNames_2.setSortingEnabled(True)
self.pushButton.setText(_translate("Dialog", "Send message", None))
self.label_3.setText(_translate("Dialog", "IP : ", None))
self.lineEdit_4.setText(_translate("Dialog", "127.0.0.1", None))
diff --git a/client/view/mainWindow.ui b/client/view/mainWindow.ui
index f88c5a0..4716c01 100755
--- a/client/view/mainWindow.ui
+++ b/client/view/mainWindow.ui
@@ -9,8 +9,8 @@
0
0
- 814
- 557
+ 809
+ 558
@@ -30,9 +30,9 @@
600
- 100
+ 90
201
- 361
+ 411
@@ -72,9 +72,69 @@
- Arial
+ Cantarell
14
+ 75
false
+ true
+ false
+ PreferAntialias
+
+
+
+ Qt::NoFocus
+
+
+ false
+
+
+
+
+
+ QFrame::NoFrame
+
+
+ QFrame::Sunken
+
+
+ 1
+
+
+ Qt::ScrollBarAlwaysOff
+
+
+ true
+
+
+
+ -
+
+
+
+ 50
+ 0
+
+
+
+
+ 200
+ 16777215
+
+
+
+
+ 0
+ 0
+
+
+
+
+ Cantarell
+ 14
+ 50
+ false
+ false
+ true
PreferAntialias
@@ -110,9 +170,9 @@
20
- 470
+ 508
781
- 69
+ 41
@@ -132,8 +192,8 @@
20
- 40
- 741
+ 30
+ 781
51
@@ -210,7 +270,7 @@
20
- 100
+ 90
561
40
@@ -229,9 +289,9 @@
20
- 160
+ 140
561
- 291
+ 361
@@ -274,7 +334,7 @@ p, li { white-space: pre-wrap; }
20
- 10
+ 0
171
31
diff --git a/client/view/start.py b/client/view/start.py
index c0b221b..b56f6d8 100755
--- a/client/view/start.py
+++ b/client/view/start.py
@@ -91,10 +91,17 @@ class start(QtGui.QDialog):
self.ShowMessageOK("Sucessful logout !")
if txt.split(" ")[0] == "SUCC_DISABLED" :
- self.ShowMessageOK("You are AFK !")
+ self.ShowMessageOK("You are AFK !")
+ self.ui.listNames.clear()
+ self.s.send("/userlistaway".encode())
+ #listNames_2
if txt.split(" ")[0] == "SUCC_ENABLED" :
- self.ShowMessageOK("You are back !")
+ self.ShowMessageOK("You are back !")
+ self.ui.listNames.clear()
+ self.ui.listNames_2.clear()
+ self.s.send("/userlist".encode())
+ self.s.send("/userlistaway".encode())
if txt.split(" ")[0] == "SUCC_VALID_NICKNAME" :
@@ -115,10 +122,7 @@ class start(QtGui.QDialog):
self.ShowMessageHasLeft(txt.split(" ")[1])
self.ui.listNames.clear()
self.s.send("/userlist".encode())
-
- #self.ui.listNames.removeItemWidget(1)
- #self.ui.listNames.addItem(txt.split(" ")[1])
-
+
if txt.split(" ")[0] == "SUCC_CHANNEL_JOINED" or txt.split(" ")[0] == "SUCC_CHANNEL_JOINEDUSERLIST" :
self.ShowMessageHasJoin(self.pseudo)
@@ -130,6 +134,12 @@ class start(QtGui.QDialog):
self.ui.listNames.addItem(str(txt.split(" ")[i]))
print(str(txt.split(" ")[1:]))
+ if re.compile('USERAWAY').search(txt.split(" ")[0] ) :
+ n = len(txt.split(" ")[1:]) +1
+ for i in range(1,n) :
+ self.ui.listNames_2.addItem(str(txt.split(" ")[i]))
+ print(str(txt.split(" ")[1:]))
+
if txt.split(" ")[0] == "NEW_MSG" :