Tray icon tweaks.
This commit is contained in:
parent
b1258d48fe
commit
1c8358999e
@ -13,6 +13,7 @@ Fixed:
|
||||
|
||||
Added:
|
||||
<ul>
|
||||
<li>Tray icon tooltips now displays number of unread messages if there is at least one unread message.</li>
|
||||
<li>Re-introduced "blau" (dark) skin.</li>
|
||||
<li>Import/export dialog now offers "Check/uncheck all items" button.</li>
|
||||
</ul>
|
||||
|
@ -339,7 +339,6 @@ void FeedsView::deleteSelectedItem() {
|
||||
}
|
||||
|
||||
QModelIndex current_index = currentIndex();
|
||||
QItemSelectionModel *selection_model = selectionModel();
|
||||
|
||||
if (!current_index.isValid()) {
|
||||
// Changes are done, unlock the update master lock and exit.
|
||||
@ -347,17 +346,8 @@ void FeedsView::deleteSelectedItem() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (selection_model->selectedRows().size() > 1) {
|
||||
selection_model->clearSelection();
|
||||
selection_model->select(current_index, QItemSelectionModel::Rows | QItemSelectionModel::SelectCurrent);
|
||||
|
||||
qApp->showGuiMessage(tr("You selected multiple items for deletion."),
|
||||
tr("You can delete feeds/categories only one by one."),
|
||||
QSystemTrayIcon::Warning, qApp->mainForm());
|
||||
}
|
||||
|
||||
if (MessageBox::show(qApp->mainForm(), QMessageBox::Question, tr("Deleting feed or category."),
|
||||
tr("You are about to delete selected feed or category."), tr("Do you really want to remove selected item?"),
|
||||
if (MessageBox::show(qApp->mainForm(), QMessageBox::Question, tr("Deleting feed or category"),
|
||||
tr("You are about to delete selected feed or category."), tr("Do you really want to delete selected item?"),
|
||||
QString(), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes) == QMessageBox::No) {
|
||||
// User changed his mind.
|
||||
qApp->closeLock()->unlock();
|
||||
|
@ -28,8 +28,7 @@
|
||||
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
TrayIconMenu::TrayIconMenu(const QString &title, QWidget *parent)
|
||||
: QMenu(title, parent) {
|
||||
TrayIconMenu::TrayIconMenu(const QString &title, QWidget *parent) : QMenu(title, parent) {
|
||||
}
|
||||
|
||||
TrayIconMenu::~TrayIconMenu() {
|
||||
@ -119,9 +118,13 @@ void SystemTrayIcon::show() {
|
||||
|
||||
void SystemTrayIcon::setNumber(int number) {
|
||||
if (number <= 0) {
|
||||
setToolTip(APP_LONG_NAME);
|
||||
|
||||
QSystemTrayIcon::setIcon(QIcon(m_normalIcon));
|
||||
}
|
||||
else {
|
||||
setToolTip(tr("%1\nUnread news: %2").arg(APP_LONG_NAME, QString::number(number)));
|
||||
|
||||
QPixmap background(m_plainPixmap);
|
||||
QPainter tray_painter;
|
||||
|
||||
|
@ -60,7 +60,6 @@ IconFactory *Application::icons() {
|
||||
SystemTrayIcon *Application::trayIcon() {
|
||||
if (m_trayIcon == NULL) {
|
||||
m_trayIcon = new SystemTrayIcon(APP_ICON_PATH, APP_ICON_PLAIN_PATH, m_mainForm);
|
||||
m_trayIcon->setToolTip(APP_LONG_NAME);
|
||||
}
|
||||
|
||||
return m_trayIcon;
|
||||
|
Loading…
x
Reference in New Issue
Block a user