History

Merge remote-tracking branch 'upstream/master' into RunningScripts

Ryan Huffman committed 12 years ago

Commit edcff0b2 parents f889cef a934ffb45 files · +1654 −425Browse files

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

Unified · Split

interface/src/Application.cpp+15−13
@@ -317,6 +317,9 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 316 unmodified lines
317 Particle::setVoxelEditPacketSender(&_voxelEditSender);317 Particle::setVoxelEditPacketSender(&_voxelEditSender);
318 Particle::setParticleEditPacketSender(&_particleEditSender);318 Particle::setParticleEditPacketSender(&_particleEditSender);
319 319
320 // when -url in command line, teleport to location
321 urlGoTo(argc, constArgv);
322
320 // For now we're going to set the PPS for outbound packets to be super high, this is323 // For now we're going to set the PPS for outbound packets to be super high, this is
321 // probably not the right long term solution. But for now, we're going to do this to324 // probably not the right long term solution. But for now, we're going to do this to
322 // allow you to move a particle around in your hand325 // allow you to move a particle around in your hand
@@ -865,7 +868,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 542 unmodified lines
865 868
866 case Qt::Key_G:869 case Qt::Key_G:
867 if (isShifted) {870 if (isShifted) {
868 Menu::getInstance()->triggerOption(MenuOption::Gravity);871 Menu::getInstance()->triggerOption(MenuOption::ObeyEnvironmentalGravity);
869 }872 }
870 break;873 break;
871 874
@@ -3578,34 +3581,33 @@ void Application::takeSnapshot() { · 2706 unmodified lines
3578void Application::urlGoTo(int argc, const char * constArgv[]) {3581void Application::urlGoTo(int argc, const char * constArgv[]) {
3579 //Gets the url (hifi://domain/destination/orientation)3582 //Gets the url (hifi://domain/destination/orientation)
3580 QString customUrl = getCmdOption(argc, constArgv, "-url");3583 QString customUrl = getCmdOption(argc, constArgv, "-url");
3581 3584 if(customUrl.startsWith(CUSTOM_URL_SCHEME + "//")) {
3582 if (customUrl.startsWith("hifi://")) {
3583 QStringList urlParts = customUrl.remove(0, CUSTOM_URL_SCHEME.length() + 2).split('/', QString::SkipEmptyParts);3585 QStringList urlParts = customUrl.remove(0, CUSTOM_URL_SCHEME.length() + 2).split('/', QString::SkipEmptyParts);
3584 if (urlParts.count() > 1) {3586 if (urlParts.count() == 1) {
3587 // location coordinates or place name
3588 QString domain = urlParts[0];
3589 Menu::goToDomain(domain);
3590 } else if (urlParts.count() > 1) {
3585 // if url has 2 or more parts, the first one is domain name3591 // if url has 2 or more parts, the first one is domain name
3586 QString domain = urlParts[0];3592 QString domain = urlParts[0];
3587 3593
3588 // second part is either a destination coordinate or3594 // second part is either a destination coordinate or
3589 // a place name3595 // a place name
3590 QString destination = urlParts[1];3596 QString destination = urlParts[1];
3591 3597
3592 // any third part is an avatar orientation.3598 // any third part is an avatar orientation.
3593 QString orientation = urlParts.count() > 2 ? urlParts[2] : QString();3599 QString orientation = urlParts.count() > 2 ? urlParts[2] : QString();
3594 3600
3595 Menu::goToDomain(domain);3601 Menu::goToDomain(domain);
3596 3602
3597 // goto either @user, #place, or x-xx,y-yy,z-zz3603 // goto either @user, #place, or x-xx,y-yy,z-zz
3598 // style co-ordinate.3604 // style co-ordinate.
3599 Menu::goTo(destination);3605 Menu::goTo(destination);
3600 3606
3601 if (!orientation.isEmpty()) {3607 if (!orientation.isEmpty()) {
3602 // location orientation3608 // location orientation
3603 Menu::goToOrientation(orientation);3609 Menu::goToOrientation(orientation);
3604 }3610 }
3605 } else if (urlParts.count() == 1) {3611 }
3606 // location coordinates or place name
3607 QString destination = urlParts[0];
3608 Menu::goTo(destination);
3609 }
3610 }3612 }
3611}3613}

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