History

CR feedback

ZappoMan committed 11 years ago

Commit da9a8e81 parent 827e37b1 file · +13 −6Browse files

Showing the changes to interface/src/ui/PreferencesDialog.cpp (1 of 1 file). Show all

Unified · Split

interface/src/ui/PreferencesDialog.cpp+13−6
@@ -16,6 +16,7 @@ · 15 unmodified lines
16#include <avatar/AvatarManager.h>16#include <avatar/AvatarManager.h>
17#include <devices/Faceshift.h>17#include <devices/Faceshift.h>
18#include <devices/SixenseManager.h>18#include <devices/SixenseManager.h>
19#include <NetworkingConstants.h>
19 20
20#include "Application.h"21#include "Application.h"
21#include "MainWindow.h"22#include "MainWindow.h"
@@ -82,17 +83,21 @@ void PreferencesDialog::setSkeletonUrl(QString modelUrl) { · 60 unmodified lines
82}83}
83 84
84void PreferencesDialog::openHeadModelBrowser() {85void PreferencesDialog::openHeadModelBrowser() {
85 auto MARKETPLACE_URL = "https://metaverse.highfidelity.com/marketplace?category=avatars";86 auto MARKETPLACE_URL = NetworkingConstants::METAVERSE_SERVER_URL.toString() + "/marketplace?category=avatars";
87 auto WIDTH = 900;
88 auto HEIGHT = 700;
86 if (!_marketplaceWindow) {89 if (!_marketplaceWindow) {
87 _marketplaceWindow = new WebWindowClass("Marketplace", MARKETPLACE_URL, 900, 700, false);90 _marketplaceWindow = new WebWindowClass("Marketplace", MARKETPLACE_URL, WIDTH, HEIGHT, false);
88 }91 }
89 _marketplaceWindow->setVisible(true);92 _marketplaceWindow->setVisible(true);
90}93}
91 94
92void PreferencesDialog::openBodyModelBrowser() {95void PreferencesDialog::openBodyModelBrowser() {
93 auto MARKETPLACE_URL = "https://metaverse.highfidelity.com/marketplace?category=avatars";96 auto MARKETPLACE_URL = NetworkingConstants::METAVERSE_SERVER_URL.toString() + "/marketplace?category=avatars";
97 auto WIDTH = 900;
98 auto HEIGHT = 700;
94 if (!_marketplaceWindow) {99 if (!_marketplaceWindow) {
95 _marketplaceWindow = new WebWindowClass("Marketplace", MARKETPLACE_URL, 900, 700, false);100 _marketplaceWindow = new WebWindowClass("Marketplace", MARKETPLACE_URL, WIDTH, HEIGHT, false);
96 }101 }
97 _marketplaceWindow->setVisible(true);102 _marketplaceWindow->setVisible(true);
98}103}
@@ -211,11 +216,13 @@ void PreferencesDialog::savePreferences() { · 112 unmodified lines
211 UserActivityLogger::getInstance().changedDisplayName(displayNameStr);216 UserActivityLogger::getInstance().changedDisplayName(displayNameStr);
212 shouldDispatchIdentityPacket = true;217 shouldDispatchIdentityPacket = true;
213 }218 }
219
220 auto AVATAR_FILE_EXTENSION = ".fst";
214 221
215 QUrl faceModelURL(ui.faceURLEdit->text());222 QUrl faceModelURL(ui.faceURLEdit->text());
216 QString faceModelURLString = faceModelURL.toString();223 QString faceModelURLString = faceModelURL.toString();
217 if (faceModelURLString != _faceURLString) {224 if (faceModelURLString != _faceURLString) {
218 if (faceModelURLString.isEmpty() || faceModelURLString.toLower().contains(".fst")) {225 if (faceModelURLString.isEmpty() || faceModelURLString.toLower().contains(AVATAR_FILE_EXTENSION)) {
219 // change the faceModelURL in the profile, it will also update this user's BlendFace226 // change the faceModelURL in the profile, it will also update this user's BlendFace
220 myAvatar->setFaceModelURL(faceModelURL);227 myAvatar->setFaceModelURL(faceModelURL);
221 UserActivityLogger::getInstance().changedModel("head", faceModelURLString);228 UserActivityLogger::getInstance().changedModel("head", faceModelURLString);
@@ -228,7 +235,7 @@ void PreferencesDialog::savePreferences() { · 6 unmodified lines
228 QUrl skeletonModelURL(ui.skeletonURLEdit->text());235 QUrl skeletonModelURL(ui.skeletonURLEdit->text());
229 QString skeletonModelURLString = skeletonModelURL.toString();236 QString skeletonModelURLString = skeletonModelURL.toString();
230 if (skeletonModelURLString != _skeletonURLString) {237 if (skeletonModelURLString != _skeletonURLString) {
231 if (skeletonModelURLString.isEmpty() || skeletonModelURLString.toLower().contains(".fst")) {238 if (skeletonModelURLString.isEmpty() || skeletonModelURLString.toLower().contains(AVATAR_FILE_EXTENSION)) {
232 // change the skeletonModelURL in the profile, it will also update this user's Body239 // change the skeletonModelURL in the profile, it will also update this user's Body
233 myAvatar->setSkeletonModelURL(skeletonModelURL);240 myAvatar->setSkeletonModelURL(skeletonModelURL);
234 UserActivityLogger::getInstance().changedModel("skeleton", skeletonModelURLString);241 UserActivityLogger::getInstance().changedModel("skeleton", skeletonModelURLString);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t