Browse Source

Merge pull request #15170 from Chocobo1/tooltip

Add tooltip for various columns
adaptive-webui-19844
Chocobo1 4 years ago committed by GitHub
parent
commit
ee696e6f36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/gui/macutilities.mm
  2. 2
      src/gui/properties/trackerlistwidget.cpp
  3. 8
      src/webui/www/private/scripts/dynamicTable.js

4
src/gui/macutilities.mm

@ -68,14 +68,14 @@ namespace MacUtils
if (class_getInstanceMethod(delClass, shouldHandle)) if (class_getInstanceMethod(delClass, shouldHandle))
{ {
if (class_replaceMethod(delClass, shouldHandle, (IMP)dockClickHandler, "B@:")) if (class_replaceMethod(delClass, shouldHandle, reinterpret_cast<IMP>(dockClickHandler), "B@:"))
qDebug("Registered dock click handler (replaced original method)"); qDebug("Registered dock click handler (replaced original method)");
else else
qWarning("Failed to replace method for dock click handler"); qWarning("Failed to replace method for dock click handler");
} }
else else
{ {
if (class_addMethod(delClass, shouldHandle, (IMP)dockClickHandler, "B@:")) if (class_addMethod(delClass, shouldHandle, reinterpret_cast<IMP>(dockClickHandler), "B@:"))
qDebug("Registered dock click handler"); qDebug("Registered dock click handler");
else else
qWarning("Failed to register dock click handler"); qWarning("Failed to register dock click handler");

2
src/gui/properties/trackerlistwidget.cpp

@ -373,6 +373,7 @@ void TrackerListWidget::loadTrackers()
{ {
item = new QTreeWidgetItem(); item = new QTreeWidgetItem();
item->setText(COL_URL, trackerURL); item->setText(COL_URL, trackerURL);
item->setToolTip(COL_URL, trackerURL);
addTopLevelItem(item); addTopLevelItem(item);
m_trackerItems[trackerURL] = item; m_trackerItems[trackerURL] = item;
} }
@ -400,6 +401,7 @@ void TrackerListWidget::loadTrackers()
} }
item->setText(COL_MSG, entry.message); item->setText(COL_MSG, entry.message);
item->setToolTip(COL_MSG, entry.message);
item->setText(COL_PEERS, ((entry.numPeers > -1) item->setText(COL_PEERS, ((entry.numPeers > -1)
? QString::number(entry.numPeers) ? QString::number(entry.numPeers)
: tr("N/A"))); : tr("N/A")));

8
src/webui/www/private/scripts/dynamicTable.js

@ -621,16 +621,16 @@ window.qBittorrent.DynamicTable = (function() {
let row; let row;
if (!this.rows.has(rowId)) { if (!this.rows.has(rowId)) {
row = {}; row = {
'full_data': {},
'rowId': rowId
};
this.rows.set(rowId, row); this.rows.set(rowId, row);
row['full_data'] = {};
row['rowId'] = rowId;
} }
else else
row = this.rows.get(rowId); row = this.rows.get(rowId);
row['data'] = data; row['data'] = data;
for (const x in data) for (const x in data)
row['full_data'][x] = data[x]; row['full_data'][x] = data[x];
}, },

Loading…
Cancel
Save