Skip to content

Commit

Permalink
Add icon for user tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
davidebeatrici committed Jul 16, 2018
1 parent 3765e54 commit da40883
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/mumble/LogTabs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ LogTabWidget::LogTabWidget(QWidget *parent) : QTabWidget(parent) {

tabBar()->setContextMenuPolicy(Qt::CustomContextMenu);

qiUser.addFile(QLatin1String("skin:default_avatar.svg"));

createTab(QString::fromUtf8("general"), tr("General"), true);
setTabText(0, tr("General"));
setTabToolTip(0, tr("General"));
Expand All @@ -74,6 +76,10 @@ int LogTabWidget::createTab(QString qsHash, QString qsName, bool isChannel) {

setTabToolTip(count() -1 , lt->m_name);

if (!isChannel) {
setTabIcon(count() - 1, qiUser);
}

connect(lt, SIGNAL(anchorClicked(const QUrl &)), this, SIGNAL(anchorClick(const QUrl &)));
connect(lt, SIGNAL(customContextMenuRequested(const QPoint &)), this, SIGNAL(customContextMenuRequest(const QPoint &)));

Expand Down
1 change: 1 addition & 0 deletions src/mumble/LogTabs.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public slots:
void customContextMenuRequest(const QPoint &);
void highlighted(const QUrl &);
private:
QIcon qiUser;
HashMap m_hashMap;
int m_maxBlockCount;
void updateHashMap();
Expand Down

0 comments on commit da40883

Please sign in to comment.