bool LLPreviewGesture::handleSaveChangesDialog(const LLSD& notification, const LLSD& response) { S32 option = LLNotification::getSelectedOption(notification, response); switch(option) { case 0: // "Yes" gGestureManager.stopGesture(mPreviewGesture); mCloseAfterSave = TRUE; onClickSave(this); break; case 1: // "No" gGestureManager.stopGesture(mPreviewGesture); mDirty = FALSE; // Force the dirty flag because user has clicked NO on confirm save dialog... close(); break; case 2: // "Cancel" default: // If we were quitting, we didn't really mean it. LLAppViewer::instance()->abortQuit(); break; } return false; }
// static void LLPreviewGesture::handleSaveChangesDialog(S32 option, void* data) { LLPreviewGesture* self = (LLPreviewGesture*)data; switch(option) { case 0: // "Yes" gGestureManager.stopGesture(self->mPreviewGesture); self->mCloseAfterSave = TRUE; onClickSave(data); break; case 1: // "No" gGestureManager.stopGesture(self->mPreviewGesture); self->mDirty = FALSE; // Force the dirty flag because user has clicked NO on confirm save dialog... self->close(); break; case 2: // "Cancel" default: // If we were quitting, we didn't really mean it. app_abort_quit(); break; } }