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:
parent
c76f6a7e73
commit
0ae0d01a61
|
@ -443,8 +443,3 @@ void ChatForm::onFileTansBtnClicked(QString widgetName, QString buttonName)
|
|||
else
|
||||
qDebug() << "no filetransferwidget: " << id;
|
||||
}
|
||||
|
||||
void ChatForm::focusInput()
|
||||
{
|
||||
msgEdit->setFocus();
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -201,3 +201,8 @@ void GenericChatForm::onEmoteInsertRequested(QString str)
|
|||
|
||||
msgEdit->setFocus(); // refocus so that we can continue typing
|
||||
}
|
||||
|
||||
void GenericChatForm::focusInput()
|
||||
{
|
||||
msgEdit->setFocus();
|
||||
}
|
||||
|
|
|
@ -51,6 +51,7 @@ signals:
|
|||
void sendMessage(int, QString);
|
||||
|
||||
public slots:
|
||||
void focusInput();
|
||||
|
||||
protected slots:
|
||||
void onChatContextMenuRequested(QPoint pos);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user