diff --git Charm/ApplicationCore.cpp Charm/ApplicationCore.cpp
index 17cd0fe..964d098 100644
|
|
ApplicationCore::ApplicationCore( QObject* parent ) |
158 | 158 | SLOT( slotQuitApplication() ) ); |
159 | 159 | |
160 | 160 | m_actionAboutDialog.setText( tr( "About Charm" ) ); |
| 161 | m_actionAboutDialog.setMenuRole(QAction::AboutRole); |
161 | 162 | connect( &m_actionAboutDialog, SIGNAL( triggered() ), |
162 | 163 | &mainView(), SLOT( slotAboutDialog() ) ); |
163 | 164 | |
164 | 165 | m_actionPreferences.setText( tr( "Preferences" ) ); |
| 166 | m_actionPreferences.setMenuRole(QAction::PreferencesRole); |
165 | 167 | m_actionPreferences.setIcon( Data::configureIcon() ); |
166 | 168 | connect( &m_actionPreferences, SIGNAL( triggered( bool ) ), |
167 | 169 | &mainView(), SLOT( slotEditPreferences( bool ) ) ); |
… |
… |
void ApplicationCore::createWindowMenu( QMenuBar *menuBar ) |
260 | 262 | menu->addAction( &m_actionActivityReport ); |
261 | 263 | menu->addAction( &m_actionWeeklyTimesheetReport ); |
262 | 264 | menu->addAction( &m_actionMonthlyTimesheetReport ); |
263 | | #ifndef Q_OS_OSX |
| 265 | #if !defined(Q_OS_OSX) && !defined(Q_OS_MAC) |
264 | 266 | menu->addSeparator(); |
265 | 267 | #endif |
266 | 268 | menu->addAction( &m_actionPreferences ); |
… |
… |
void ApplicationCore::createFileMenu( QMenuBar *menuBar ) |
277 | 279 | menu->addAction( &m_actionSyncTasks ); |
278 | 280 | menu->addAction( &m_actionImportTasks ); |
279 | 281 | menu->addAction( &m_actionExportTasks ); |
280 | | #ifndef Q_OS_OSX |
| 282 | #if !defined(Q_OS_OSX) && !defined(Q_OS_MAC) |
281 | 283 | menu->addSeparator(); |
282 | 284 | #endif |
283 | 285 | menu->addAction( &m_actionQuit ); |
diff --git Charm/Charm.cpp Charm/Charm.cpp
index 4872e3a..951ba5a 100644
|
|
|
13 | 13 | |
14 | 14 | static ApplicationCore* createApplicationCore() |
15 | 15 | { |
16 | | #ifdef Q_OS_OSX |
17 | | return new MacApplicationCore; |
18 | | #endif |
| 16 | // #if defined(Q_OS_OSX) || defined(Q_OS_MAC) |
| 17 | // // this seems to disable (menu) shortcuts... |
| 18 | // return new MacApplicationCore; |
| 19 | // #endif |
19 | 20 | return new ApplicationCore; |
20 | 21 | } |
21 | 22 | |
… |
… |
int main ( int argc, char** argv ) |
46 | 47 | |
47 | 48 | try { |
48 | 49 | QApplication app( argc, argv ); |
| 50 | #if defined(Q_OS_MAC) || defined(Q_OS_OSX) |
| 51 | app.setAttribute(Qt::AA_DontShowIconsInMenus); |
| 52 | #endif |
49 | 53 | QScopedPointer<ApplicationCore> core( createApplicationCore() ); |
50 | 54 | QObject::connect( &app, SIGNAL(commitDataRequest(QSessionManager&)), core.data(), SLOT(commitData(QSessionManager&)) ); |
51 | 55 | QObject::connect( &app, SIGNAL(saveStateRequest(QSessionManager&)), core.data(), SLOT(saveState(QSessionManager&)) ); |
diff --git Charm/Data.cpp Charm/Data.cpp
index ad8abfa..a7778b1 100644
|
|
const QIcon& Data::charmTrayIcon() |
18 | 18 | // On X11: pure-Qt apps get 22x22 from QSystemTrayIcon. |
19 | 19 | // KDE apps seem to get 24x24 in KSystemTrayIcon via KIconLoader, which is actually better. |
20 | 20 | |
21 | | #ifdef Q_OS_OSX |
| 21 | #if !defined(Q_OS_OSX) && !defined(Q_OS_MAC) |
22 | 22 | static const QString iconPath = QLatin1String(":/Charm/charmtray_mac.png"); |
23 | 23 | #else |
24 | 24 | static const QString iconPath = QLatin1String(":/Charm/charmtray22.png"); |
… |
… |
const QIcon& Data::charmTrayActiveIcon() |
37 | 37 | // On X11: pure-Qt apps get 22x22 from QSystemTrayIcon. |
38 | 38 | // KDE apps seem to get 24x24 in KSystemTrayIcon via KIconLoader, which is actually better. |
39 | 39 | |
40 | | #ifdef Q_OS_OSX |
| 40 | #if !defined(Q_OS_OSX) && !defined(Q_OS_MAC) |
41 | 41 | static const QString iconPath = QLatin1String(":/Charm/charmtrayactive_mac.png"); |
42 | 42 | #else |
43 | 43 | static const QString iconPath = QLatin1String(":/Charm/charmtrayactive22.png"); |
diff --git Charm/Idle/IdleDetector.cpp Charm/Idle/IdleDetector.cpp
index 131e76e..47c575c 100644
|
|
IdleDetector::IdleDetector( QObject* parent ) |
20 | 20 | IdleDetector* IdleDetector::createIdleDetector( QObject* parent ) |
21 | 21 | { |
22 | 22 | #ifdef CHARM_IDLE_DETECTION |
23 | | #ifdef Q_OS_OSX |
| 23 | #if defined(Q_OS_OSX) || defined(Q_OS_MAC) |
24 | 24 | return new MacIdleDetector( parent ); |
25 | 25 | #endif |
26 | 26 | |
diff --git Charm/Widgets/CharmWindow.cpp Charm/Widgets/CharmWindow.cpp
index 375aedc..8bd7657 100644
|
|
void CharmWindow::setWindowNumber( int number ) |
85 | 85 | delete m_shortcut; |
86 | 86 | m_shortcut = new QShortcut( this ); |
87 | 87 | QKeySequence sequence( tr( "Ctrl+%1" ).arg( number ) ); |
88 | | #ifdef Q_OS_OSX |
| 88 | #if !defined(Q_OS_OSX) && !defined(Q_OS_MAC) |
89 | 89 | m_shortcut->setKey( sequence ); |
90 | 90 | #endif |
91 | 91 | m_shortcut->setContext( Qt::ApplicationShortcut ); |
diff --git Charm/Widgets/EventView.cpp Charm/Widgets/EventView.cpp
index 2fb9ef4..2eae8aa 100644
|
|
EventView::EventView( QToolBar* toolBar, QWidget* parent ) |
96 | 96 | m_actionDeleteEvent.setText( tr( "Delete Event..." ) ); |
97 | 97 | QList<QKeySequence> deleteShortcuts; |
98 | 98 | deleteShortcuts << QKeySequence::Delete; |
99 | | #ifdef Q_OS_OSX |
| 99 | #if !defined(Q_OS_OSX) && !defined(Q_OS_MAC) |
100 | 100 | deleteShortcuts << Qt::Key_Backspace; |
101 | 101 | #endif |
102 | 102 | m_actionDeleteEvent.setShortcuts(deleteShortcuts); |