History

Merge branch 'master' of https://github.com/highfidelity/hifi into toggleOverlay

Brad Hefta-Gaub committed 10 years ago

Commit b0c286b2 parents 519a90f 202a45678 files · +2143 −1227Browse files

Showing the changes to interface/src/Menu.cpp (1 of 78 files). Show all

Unified · Split

interface/src/Menu.cpp+5−20
@@ -70,17 +70,9 @@ Menu::Menu() { · 69 unmodified lines
70 dialogsManager.data(), &DialogsManager::toggleLoginDialog);70 dialogsManager.data(), &DialogsManager::toggleLoginDialog);
71 }71 }
72 72
73 // File > Update -- FIXME: needs implementation
74 auto action = addActionToQMenuAndActionHash(fileMenu, "Update");
75 action->setDisabled(true);
76
77 // File > Help73 // File > Help
78 addActionToQMenuAndActionHash(fileMenu, MenuOption::Help, 0, qApp, SLOT(showHelp()));74 addActionToQMenuAndActionHash(fileMenu, MenuOption::Help, 0, qApp, SLOT(showHelp()));
79 75
80 // File > Crash Reporter...-- FIXME: needs implementation
81 auto crashReporterAction = addActionToQMenuAndActionHash(fileMenu, "Crash Reporter...");
82 crashReporterAction->setDisabled(true);
83
84 // File > About76 // File > About
85 addActionToQMenuAndActionHash(fileMenu, MenuOption::AboutApp, 0, qApp, SLOT(aboutApp()), QAction::AboutRole);77 addActionToQMenuAndActionHash(fileMenu, MenuOption::AboutApp, 0, qApp, SLOT(aboutApp()), QAction::AboutRole);
86 78
@@ -167,7 +159,7 @@ Menu::Menu() { · 80 unmodified lines
167 QObject* avatar = avatarManager->getMyAvatar();159 QObject* avatar = avatarManager->getMyAvatar();
168 160
169 // Avatar > Attachments...161 // Avatar > Attachments...
170 action = addActionToQMenuAndActionHash(avatarMenu, MenuOption::Attachments);162 auto action = addActionToQMenuAndActionHash(avatarMenu, MenuOption::Attachments);
171 connect(action, &QAction::triggered, [] {163 connect(action, &QAction::triggered, [] {
172 DependencyManager::get<OffscreenUi>()->show(QString("hifi/dialogs/AttachmentsDialog.qml"), "AttachmentsDialog");164 DependencyManager::get<OffscreenUi>()->show(QString("hifi/dialogs/AttachmentsDialog.qml"), "AttachmentsDialog");
173 });165 });
@@ -262,16 +254,10 @@ Menu::Menu() { · 88 unmodified lines
262 // Navigate menu ----------------------------------254 // Navigate menu ----------------------------------
263 MenuWrapper* navigateMenu = addMenu("Navigate");255 MenuWrapper* navigateMenu = addMenu("Navigate");
264 256
265 // Navigate > Home -- FIXME: needs implementation257 // Navigate > Show Address Bar
266 auto homeAction = addActionToQMenuAndActionHash(navigateMenu, "Home");
267 homeAction->setDisabled(true);
268
269 addActionToQMenuAndActionHash(navigateMenu, MenuOption::AddressBar, Qt::CTRL | Qt::Key_L,258 addActionToQMenuAndActionHash(navigateMenu, MenuOption::AddressBar, Qt::CTRL | Qt::Key_L,
270 dialogsManager.data(), SLOT(toggleAddressBar()));259 dialogsManager.data(), SLOT(toggleAddressBar()));
271 260
272 // Navigate > Directory -- FIXME: needs implementation
273 addActionToQMenuAndActionHash(navigateMenu, "Directory");
274
275 // Navigate > Bookmark related menus -- Note: the Bookmark class adds its own submenus here.261 // Navigate > Bookmark related menus -- Note: the Bookmark class adds its own submenus here.
276 qApp->getBookmarks()->setupMenus(this, navigateMenu);262 qApp->getBookmarks()->setupMenus(this, navigateMenu);
277 263
@@ -302,20 +288,19 @@ Menu::Menu() { · 24 unmodified lines
302 DependencyManager::get<OffscreenUi>()->toggle(QString("hifi/dialogs/GeneralPreferencesDialog.qml"), "GeneralPreferencesDialog");288 DependencyManager::get<OffscreenUi>()->toggle(QString("hifi/dialogs/GeneralPreferencesDialog.qml"), "GeneralPreferencesDialog");
303 });289 });
304 290
305 291 // Settings > Avatar...
306 // Settings > Avatar...-- FIXME: needs implementation
307 action = addActionToQMenuAndActionHash(settingsMenu, "Avatar...");292 action = addActionToQMenuAndActionHash(settingsMenu, "Avatar...");
308 connect(action, &QAction::triggered, [] {293 connect(action, &QAction::triggered, [] {
309 DependencyManager::get<OffscreenUi>()->toggle(QString("hifi/dialogs/AvatarPreferencesDialog.qml"), "AvatarPreferencesDialog");294 DependencyManager::get<OffscreenUi>()->toggle(QString("hifi/dialogs/AvatarPreferencesDialog.qml"), "AvatarPreferencesDialog");
310 });295 });
311 296
312 // Settings > Audio...-- FIXME: needs implementation297 // Settings > Audio...
313 action = addActionToQMenuAndActionHash(settingsMenu, "Audio...");298 action = addActionToQMenuAndActionHash(settingsMenu, "Audio...");
314 connect(action, &QAction::triggered, [] {299 connect(action, &QAction::triggered, [] {
315 DependencyManager::get<OffscreenUi>()->toggle(QString("hifi/dialogs/AudioPreferencesDialog.qml"), "AudioPreferencesDialog");300 DependencyManager::get<OffscreenUi>()->toggle(QString("hifi/dialogs/AudioPreferencesDialog.qml"), "AudioPreferencesDialog");
316 });301 });
317 302
318 // Settings > LOD...-- FIXME: needs implementation303 // Settings > LOD...
319 action = addActionToQMenuAndActionHash(settingsMenu, "LOD...");304 action = addActionToQMenuAndActionHash(settingsMenu, "LOD...");
320 connect(action, &QAction::triggered, [] {305 connect(action, &QAction::triggered, [] {
321 DependencyManager::get<OffscreenUi>()->toggle(QString("hifi/dialogs/LodPreferencesDialog.qml"), "LodPreferencesDialog");306 DependencyManager::get<OffscreenUi>()->toggle(QString("hifi/dialogs/LodPreferencesDialog.qml"), "LodPreferencesDialog");