Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Few changes (qt4) #4

Merged
1 commit merged into from
Dec 15, 2010
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions amsn2/ui/front_ends/qt4/chatWindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<widget class="QWidget" name="layoutWidget">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label">
<widget class="QLabel" name="remoteDP">
<property name="maximumSize">
<size>
<width>96</width>
Expand Down Expand Up @@ -222,7 +222,7 @@
</spacer>
</item>
<item>
<widget class="QLabel" name="label_2">
<widget class="QLabel" name="localDP">
<property name="maximumSize">
<size>
<width>96</width>
Expand Down
15 changes: 10 additions & 5 deletions amsn2/ui/front_ends/qt4/chat_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ def __init__(self, amsn_core, parent=None):

def add_chat_widget(self, chat_widget):
self.addTab(chat_widget, "test")

def set_title(self, text):
self.setWindowTitle(text)


class aMSNChatWidget(QtGui.QWidget, base.aMSNChatWidget):
Expand Down Expand Up @@ -79,6 +82,7 @@ def __init__(self, amsn_conversation, parent, contacts_uid):
QtCore.QObject.connect(self.ui.actionInsert_Emoticon, QtCore.SIGNAL("triggered()"), self.showEmoticonList)
QtCore.QObject.connect(self.ui.actionFont, QtCore.SIGNAL("triggered()"), self.chooseFont)
QtCore.QObject.connect(self.ui.actionColor, QtCore.SIGNAL("triggered()"), self.chooseColor)
QtCore.QObject.connect(self.ui.actionNudge, QtCore.SIGNAL("triggered()"), self.__sendNudge)


#TODO: remove this when papyon is "fixed"...
Expand Down Expand Up @@ -189,7 +193,7 @@ def __sendMessage(self):
#self.ui.textEdit.append("<b>/me says:</b><br>"+unicode(msg)+"")

def __sendNudge(self):
self._amsn_conversation.sendNudge()
self._amsn_conversation.send_nudge()
self.ui.textEdit.append("<b>/me sent a nudge</b>")

def __typingNotification(self):
Expand All @@ -199,14 +203,14 @@ def appendTextAtCursor(self, text):
self.ui.inputWidget.textCursor().insertHtml(unicode(text))

def appendImageAtCursor(self, image):
self.ui.inputWidget.textCursor().insertHtml(QString("<img src=\"" + str(image) + "\" />"))
self.ui.inputWidget.textCursor().insertHtml(QtCore.QString("<img src=\"" + str(image) + "\" />"))

def on_user_joined(self, contact):
self.ui.textEdit.append(unicode("<b>"+QString.fromUtf8(contact.to_HTML_string())+" "+self.tr("has joined the conversation")+("</b>")))
self.ui.textEdit.append(unicode("<b>"+QtCore.QString.fromUtf8(contact.to_HTML_string())+" "+self.tr("has joined the conversation")+("</b>")))
pass

def on_user_left(self, contact):
self.ui.textEdit.append(unicode("<b>"+QString.fromUtf8(contact.to_HTML_string())+" "+self.tr("has left the conversation")+("</b>")))
self.ui.textEdit.append(unicode("<b>"+QtCore.QString.fromUtf8(contact.to_HTML_string())+" "+self.tr("has left the conversation")+("</b>")))
pass

def on_user_typing(self, contact):
Expand Down Expand Up @@ -252,8 +256,9 @@ def on_message_received(self, messageview, formatting=None):

self.ui.textEdit.append(QtCore.QString.fromUtf8(html))
self.last_sender = sender

self._statusBar.clearMessage()

def on_nudge_received(self, sender):
self.ui.textEdit.append(unicode("<b>"+QtCore.QString.fromUtf8(sender.to_HTML_string())+" "+self.tr("sent you a nudge!")+("</b>")))
pass

4 changes: 2 additions & 2 deletions amsn2/ui/front_ends/qt4/choosers.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ def __call__(self, callback, backend_manager, title ="aMSN - Choose a Display Pi
self.iconview.setViewMode(1)
self.iconview.setResizeMode(1)
self.iconview.setMovement(0)
self.iconview.setIconSize(QSize(96,96))
self.iconview.setIconSize(QtCore.QSize(96,96))
self.iconview.setWordWrap( True )
self.iconview.setGridSize(QSize(106,121))
self.iconview.setGridSize(QtCore.QSize(106,121))
QtCore.QObject.connect(self.iconview, QtCore.SIGNAL("itemDoubleClicked(QListWidgetItem)"), self._on_dp_dblclick)
self.buttonOk= QtGui.QPushButton("Ok")
QtCore.QObject.connect(self.buttonOk, QtCore.SIGNAL("clicked()"), self._on_ok_clicked)
Expand Down