diff --git akregator/src/actionmanagerimpl.cpp akregator/src/actionmanagerimpl.cpp
index 27e23ce..923370f 100644
|
|
void ActionManagerImpl::setTrayIcon(TrayIcon* trayIcon) |
163 | 163 | return; |
164 | 164 | else d->trayIcon = trayIcon; |
165 | 165 | |
| 166 | #ifdef Q_OS_MAC |
| 167 | KMenu* traypop = trayIcon->contextMenu(); |
| 168 | #else |
166 | 169 | QMenu* traypop = trayIcon->contextMenu(); |
| 170 | #endif |
167 | 171 | |
168 | 172 | if (actionCollection()->action("feed_fetch_all")) |
169 | 173 | traypop->addAction(actionCollection()->action("feed_fetch_all")); |
diff --git kmail/kmmainwidget.cpp kmail/kmmainwidget.cpp
index d6a0fff..0f3184f 100644
|
|
void KMMainWidget::setupActions() |
3518 | 3518 | |
3519 | 3519 | { |
3520 | 3520 | KAction *action = new KAction(KIcon(QLatin1String("configure")), i18n("&Configure KMail..."), this); |
| 3521 | #ifdef Q_OS_MAC |
| 3522 | action->setMenuRole(QAction::PreferencesRole); |
| 3523 | #endif |
3521 | 3524 | actionCollection()->addAction(QLatin1String("kmail_configure_kmail"), action ); |
3522 | 3525 | connect(action, SIGNAL(triggered(bool)), kmkernel, SLOT(slotShowConfigurationDialog())); |
3523 | 3526 | } |
diff --git kmail/kmsystemtray.cpp kmail/kmsystemtray.cpp
index 1d3668a..ffa5665 100644
|
|
bool KMSystemTray::buildPopupMenu() |
112 | 112 | |
113 | 113 | contextMenu()->clear(); |
114 | 114 | |
| 115 | #ifndef Q_OS_MAC |
115 | 116 | contextMenu()->addTitle(qApp->windowIcon(), i18n("KMail")); |
| 117 | #else |
| 118 | { // emulate addTitle by adding an inactive menu item. |
| 119 | KAction *act = new KAction( i18n("KMail"), this ); |
| 120 | act->setEnabled(false); |
| 121 | act->setIcon(qApp->windowIcon()); |
| 122 | act->setIconVisibleInMenu(true); |
| 123 | contextMenu()->addAction(act); |
| 124 | contextMenu()->addSeparator(); |
| 125 | } |
| 126 | #endif |
116 | 127 | QAction * action; |
117 | 128 | if ( ( action = mainWidget->action(QLatin1String("check_mail")) ) ) |
118 | 129 | contextMenu()->addAction( action ); |
diff --git kmail/messageactions.cpp kmail/messageactions.cpp
index e730cf9..88ebc61 100644
|
|
void MessageActions::updateMailingListActions( const Akonadi::Item& messageItem |
388 | 388 | mMailingListActionMenu->menu()->clear(); |
389 | 389 | qDeleteAll(mMailListActionList); |
390 | 390 | mMailListActionList.clear(); |
| 391 | #ifndef Q_WS_MACX |
391 | 392 | if ( !listId.isEmpty() ) |
392 | 393 | mMailingListActionMenu->menu()->addTitle( listId ); |
| 394 | #else |
| 395 | // // emulate addTitle by adding an inactive menu item. |
| 396 | KAction *act = new KAction( listId, this ); |
| 397 | act->setEnabled(false); |
| 398 | mMailingListActionMenu->addAction( act ); |
| 399 | mMailingListActionMenu->addSeparator(); |
| 400 | #endif |
393 | 401 | |
394 | 402 | if ( mailList.features() & MessageCore::MailingList::ArchivedAt ) |
395 | 403 | // IDEA: this may be something you want to copy - "Copy in submenu"? |
diff --git messagelist/core/widgetbase.cpp messagelist/core/widgetbase.cpp
index 1092e05..ffd844a 100644
|
|
void Widget::themeMenuAboutToShow() |
468 | 468 | themeMenuAboutToShow(menu); |
469 | 469 | } |
470 | 470 | |
| 471 | static inline void addMenuTitle(KMenu *menu, const char *titleText, QObject *parent, bool separatorAbove=false) |
| 472 | { |
| 473 | #ifndef Q_WS_MACX |
| 474 | menu->addTitle( i18n( titleText ) ); |
| 475 | #else |
| 476 | // // emulate addTitle by adding an inactive menu item. |
| 477 | KAction *act = new KAction( i18n(titleText), parent ); |
| 478 | act->setEnabled(false); |
| 479 | if( separatorAbove ){ |
| 480 | menu->addSeparator(); |
| 481 | } |
| 482 | menu->addAction( act ); |
| 483 | menu->addSeparator(); |
| 484 | #endif |
| 485 | } |
| 486 | |
471 | 487 | void Widget::themeMenuAboutToShow(KMenu *menu) |
472 | 488 | { |
473 | 489 | menu->clear(); |
474 | 490 | |
475 | | menu->addTitle( i18n( "Theme" ) ); |
| 491 | addMenuTitle( menu, "Theme", this ); |
476 | 492 | |
477 | 493 | QActionGroup * grp = new QActionGroup( menu ); |
478 | 494 | |
… |
… |
void Widget::aggregationMenuAboutToShow(KMenu *menu) |
563 | 579 | { |
564 | 580 | menu->clear(); |
565 | 581 | |
566 | | menu->addTitle( i18n( "Aggregation" ) ); |
| 582 | addMenuTitle( menu, "Aggregation" , this ); |
567 | 583 | |
568 | 584 | QActionGroup * grp = new QActionGroup( menu ); |
569 | 585 | |
… |
… |
void Widget::sortOrderMenuAboutToShow(KMenu *menu) |
647 | 663 | { |
648 | 664 | menu->clear(); |
649 | 665 | |
650 | | menu->addTitle( i18n( "Message Sort Order" ) ); |
| 666 | addMenuTitle( menu, "Message Sort Order", this ); |
651 | 667 | |
652 | 668 | QActionGroup * grp; |
653 | 669 | QAction * act; |
… |
… |
void Widget::sortOrderMenuAboutToShow(KMenu *menu) |
672 | 688 | options = SortOrder::enumerateMessageSortDirectionOptions( d->mSortOrder.messageSorting() ); |
673 | 689 | |
674 | 690 | if ( options.size() >= 2 ) { |
675 | | menu->addTitle( i18n( "Message Sort Direction" ) ); |
| 691 | addMenuTitle( menu, "Message Sort Direction", this, true ); |
676 | 692 | |
677 | 693 | grp = new QActionGroup( menu ); |
678 | 694 | end = options.constEnd(); |
… |
… |
void Widget::sortOrderMenuAboutToShow(KMenu *menu) |
691 | 707 | options = SortOrder::enumerateGroupSortingOptions( d->mAggregation->grouping() ); |
692 | 708 | |
693 | 709 | if ( options.size() >= 2 ) { |
694 | | menu->addTitle( i18n( "Group Sort Order" ) ); |
| 710 | addMenuTitle( menu, "Group Sort Order", this, true ); |
695 | 711 | |
696 | 712 | grp = new QActionGroup( menu ); |
697 | 713 | |
… |
… |
void Widget::sortOrderMenuAboutToShow(KMenu *menu) |
712 | 728 | d->mSortOrder.groupSorting() ); |
713 | 729 | |
714 | 730 | if ( options.size() >= 2 ) { |
715 | | menu->addTitle( i18n( "Group Sort Direction" ) ); |
| 731 | addMenuTitle( menu, "Group Sort Direction", this, true ); |
716 | 732 | |
717 | 733 | grp = new QActionGroup( menu ); |
718 | 734 | end = options.constEnd(); |