1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Generalize #275 to groupchats

This commit is contained in:
Tux3 / Mlkj / !Lev.uXFMLA 2014-09-10 23:00:45 +02:00
parent c76f6a7e73
commit 0ae0d01a61
5 changed files with 7 additions and 6 deletions

View File

@ -443,8 +443,3 @@ void ChatForm::onFileTansBtnClicked(QString widgetName, QString buttonName)
else
qDebug() << "no filetransferwidget: " << id;
}
void ChatForm::focusInput()
{
msgEdit->setFocus();
}

View File

@ -55,7 +55,6 @@ public slots:
void onAvPeerTimeout(int FriendId, int CallId);
void onAvMediaChange(int FriendId, int CallId, bool video);
void onMicMuteToggle();
void focusInput();
private slots:
void onSendTriggered();

View File

@ -201,3 +201,8 @@ void GenericChatForm::onEmoteInsertRequested(QString str)
msgEdit->setFocus(); // refocus so that we can continue typing
}
void GenericChatForm::focusInput()
{
msgEdit->setFocus();
}

View File

@ -51,6 +51,7 @@ signals:
void sendMessage(int, QString);
public slots:
void focusInput();
protected slots:
void onChatContextMenuRequested(QPoint pos);

View File

@ -663,6 +663,7 @@ Group *Widget::createGroup(int groupId)
connect(newgroup->widget, SIGNAL(chatroomWidgetClicked(GenericChatroomWidget*)), this, SLOT(onChatroomWidgetClicked(GenericChatroomWidget*)));
connect(newgroup->widget, SIGNAL(removeGroup(int)), this, SLOT(removeGroup(int)));
connect(newgroup->widget, SIGNAL(chatroomWidgetClicked(GenericChatroomWidget*)), newgroup->chatForm, SLOT(focusInput()));
connect(newgroup->chatForm, SIGNAL(sendMessage(int,QString)), core, SLOT(sendGroupMessage(int,QString)));
return newgroup;
}