History

Removing old attachment dialog, updating menu code

Brad Davis committed 10 years ago

Commit f53aaa11 parent 29565577 files · +10 −341Browse files

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

Unified · Split

interface/src/Menu.cpp+8−5
@@ -70,8 +70,8 @@ Menu::Menu() { · 69 unmodified lines
70 }70 }
71 71
72 // File > Update -- FIXME: needs implementation72 // File > Update -- FIXME: needs implementation
73 auto updateAction = addActionToQMenuAndActionHash(fileMenu, "Update");73 auto action = addActionToQMenuAndActionHash(fileMenu, "Update");
74 updateAction->setDisabled(true);74 action->setDisabled(true);
75 75
76 // File > Help76 // File > Help
77 addActionToQMenuAndActionHash(fileMenu, MenuOption::Help, 0, qApp, SLOT(showHelp()));77 addActionToQMenuAndActionHash(fileMenu, MenuOption::Help, 0, qApp, SLOT(showHelp()));
@@ -166,8 +166,11 @@ Menu::Menu() { · 88 unmodified lines
166 QObject* avatar = avatarManager->getMyAvatar();166 QObject* avatar = avatarManager->getMyAvatar();
167 167
168 // Avatar > Attachments...168 // Avatar > Attachments...
169 addActionToQMenuAndActionHash(avatarMenu, MenuOption::Attachments, 0,169 action = addActionToQMenuAndActionHash(avatarMenu, MenuOption::Attachments);
170 dialogsManager.data(), SLOT(editAttachments()));170 connect(action, &QAction::triggered, [] {
171 DependencyManager::get<OffscreenUi>()->show(QString("hifi/dialogs/AttachmentsDialog.qml"), "AttachmentsDialog");
172 });
173
171 174
172 // Avatar > Size175 // Avatar > Size
173 MenuWrapper* avatarSizeMenu = avatarMenu->addMenu("Size");176 MenuWrapper* avatarSizeMenu = avatarMenu->addMenu("Size");
@@ -285,7 +288,7 @@ Menu::Menu() { · 111 unmodified lines
285 addCheckableActionToQMenuAndActionHash(settingsMenu, "Developer Menus", 0, false, this, SLOT(toggleDeveloperMenus()));288 addCheckableActionToQMenuAndActionHash(settingsMenu, "Developer Menus", 0, false, this, SLOT(toggleDeveloperMenus()));
286 289
287 // Settings > General...290 // Settings > General...
288 auto action = addActionToQMenuAndActionHash(settingsMenu, MenuOption::Preferences, Qt::CTRL | Qt::Key_Comma, nullptr, nullptr, QAction::PreferencesRole);291 action = addActionToQMenuAndActionHash(settingsMenu, MenuOption::Preferences, Qt::CTRL | Qt::Key_Comma, nullptr, nullptr, QAction::PreferencesRole);
289 connect(action, &QAction::triggered, [] {292 connect(action, &QAction::triggered, [] {
290 DependencyManager::get<OffscreenUi>()->toggle(QString("hifi/dialogs/GeneralPreferencesDialog.qml"), "GeneralPreferencesDialog");293 DependencyManager::get<OffscreenUi>()->toggle(QString("hifi/dialogs/GeneralPreferencesDialog.qml"), "GeneralPreferencesDialog");
291 });294 });