Ticket #3395: codycam.diff

File codycam.diff, 1.7 KB (added by gamblore, 16 years ago)

Diff to allow Local saving (updated with stippi's improvements)

  • CodyCam.cpp

     
    744744    fUploadClientSelector = new BMenuField("UploadClient", NULL,
    745745        fUploadClientMenu, NULL);
    746746
    747     fFtpSetupBox->SetLabel("FTP");
     747    fFtpSetupBox->SetLabel("Output");
    748748    // this doesn't work with the layout manager
    749 //  fFtpSetupBox->SetLabel(fUploadClientSelector);
    750 fUploadClientSelector->SetLabel("Type:");
     749    // fFtpSetupBox->SetLabel(fUploadClientSelector);
     750    fUploadClientSelector->SetLabel("Type:");
    751751
    752752    BGridLayout *ftpLayout = new BGridLayout(kXBuffer, 0);
    753753    ftpLayout->SetInsets(10, 15, 5, 5);
  • VideoConsumer.cpp

     
    606606void
    607607VideoConsumer::FtpThread()
    608608{
     609    char fullPath[B_PATH_NAME_LENGTH];
    609610    FUNCTION("VideoConsumer::FtpThread\n");
    610 
    611     if (LocalSave(fFileNameText, fFtpBitmap) == B_OK)
     611    if (fUploadClient == 2) {
     612        // 64 + 64 = 128 max
     613        snprintf(fullPath, B_PATH_NAME_LENGTH, "%s/%s", fDirectoryText, fFileNameText);
     614        LocalSave(fullPath, fFtpBitmap);
     615    } else if (LocalSave(fFileNameText, fFtpBitmap) == B_OK)
    612616        FtpSave(fFileNameText);
    613617
    614618#if 0
     
    688692        case 1:
    689693            ftp = new SftpClient;
    690694            break;
     695        case 2:
     696            return B_OK;
    691697        default:
    692698            fprintf(stderr, "invalid upload client %ld\n", fUploadClient);
    693699            return EINVAL;
  • CodyCam.h

     
    8181const char* kUploadClient[] = {
    8282    "FTP",
    8383    "SFTP",
     84    "Local",
    8485    0
    8586};
    8687