|
|
@ -46,28 +46,30 @@ void RSSImp::displayRSSListMenu(const QPoint& pos){ |
|
|
|
// No item under the mouse, clear selection
|
|
|
|
// No item under the mouse, clear selection
|
|
|
|
listStreams->clearSelection(); |
|
|
|
listStreams->clearSelection(); |
|
|
|
} |
|
|
|
} |
|
|
|
QMenu myFinishedListMenu(this); |
|
|
|
QMenu myRSSListMenu(this); |
|
|
|
QList<QTreeWidgetItem*> selectedItems = listStreams->selectedItems(); |
|
|
|
QList<QTreeWidgetItem*> selectedItems = listStreams->selectedItems(); |
|
|
|
if(selectedItems.size() > 0) { |
|
|
|
if(selectedItems.size() > 0) { |
|
|
|
myFinishedListMenu.addAction(actionUpdate_feed); |
|
|
|
myRSSListMenu.addAction(actionUpdate); |
|
|
|
myFinishedListMenu.addAction(actionMark_items_read); |
|
|
|
myRSSListMenu.addAction(actionMark_items_read); |
|
|
|
myFinishedListMenu.addSeparator(); |
|
|
|
myRSSListMenu.addSeparator(); |
|
|
|
if(selectedItems.size() == 1) { |
|
|
|
if(selectedItems.size() == 1) { |
|
|
|
myFinishedListMenu.addAction(actionRename_feed); |
|
|
|
myRSSListMenu.addAction(actionRename); |
|
|
|
} |
|
|
|
} |
|
|
|
myFinishedListMenu.addAction(actionDelete_feed); |
|
|
|
myRSSListMenu.addAction(actionDelete); |
|
|
|
myFinishedListMenu.addSeparator(); |
|
|
|
myRSSListMenu.addSeparator(); |
|
|
|
myFinishedListMenu.addAction(actionCopy_feed_URL); |
|
|
|
myRSSListMenu.addAction(actionCopy_feed_URL); |
|
|
|
if(selectedItems.size() == 1) { |
|
|
|
if(selectedItems.size() == 1) { |
|
|
|
myFinishedListMenu.addSeparator(); |
|
|
|
myRSSListMenu.addSeparator(); |
|
|
|
myFinishedListMenu.addAction(actionRSS_feed_downloader); |
|
|
|
myRSSListMenu.addAction(actionRSS_feed_downloader); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
myFinishedListMenu.addAction(actionNew_subscription); |
|
|
|
myRSSListMenu.addAction(actionNew_subscription); |
|
|
|
myFinishedListMenu.addAction(actionUpdate_all_feeds); |
|
|
|
myRSSListMenu.addAction(actionNew_folder); |
|
|
|
|
|
|
|
myRSSListMenu.addSeparator(); |
|
|
|
|
|
|
|
myRSSListMenu.addAction(actionUpdate_all_feeds); |
|
|
|
} |
|
|
|
} |
|
|
|
myFinishedListMenu.exec(QCursor::pos()); |
|
|
|
myRSSListMenu.exec(QCursor::pos()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void RSSImp::displayItemsListMenu(const QPoint&){ |
|
|
|
void RSSImp::displayItemsListMenu(const QPoint&){ |
|
|
@ -389,9 +391,9 @@ RSSImp::RSSImp(bittorrent *BTSession) : QWidget(), BTSession(BTSession){ |
|
|
|
connect(listNews, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(displayItemsListMenu(const QPoint&))); |
|
|
|
connect(listNews, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(displayItemsListMenu(const QPoint&))); |
|
|
|
|
|
|
|
|
|
|
|
// Feeds list actions
|
|
|
|
// Feeds list actions
|
|
|
|
connect(actionDelete_feed, SIGNAL(triggered()), this, SLOT(deleteSelectedItems())); |
|
|
|
connect(actionDelete, SIGNAL(triggered()), this, SLOT(deleteSelectedItems())); |
|
|
|
connect(actionRename_feed, SIGNAL(triggered()), this, SLOT(renameFiles())); |
|
|
|
connect(actionRename, SIGNAL(triggered()), this, SLOT(renameFiles())); |
|
|
|
connect(actionUpdate_feed, SIGNAL(triggered()), this, SLOT(refreshSelectedStreams())); |
|
|
|
connect(actionUpdate, SIGNAL(triggered()), this, SLOT(refreshSelectedStreams())); |
|
|
|
connect(actionNew_subscription, SIGNAL(triggered()), this, SLOT(on_newFeedButton_clicked())); |
|
|
|
connect(actionNew_subscription, SIGNAL(triggered()), this, SLOT(on_newFeedButton_clicked())); |
|
|
|
connect(actionUpdate_all_feeds, SIGNAL(triggered()), this, SLOT(on_updateAllButton_clicked())); |
|
|
|
connect(actionUpdate_all_feeds, SIGNAL(triggered()), this, SLOT(on_updateAllButton_clicked())); |
|
|
|
connect(actionCopy_feed_URL, SIGNAL(triggered()), this, SLOT(copySelectedFeedsURL())); |
|
|
|
connect(actionCopy_feed_URL, SIGNAL(triggered()), this, SLOT(copySelectedFeedsURL())); |
|
|
|