Logo Search packages:      
Sourcecode: kdenlive version File versions

void Gui::KdenliveApp::slotOptionsPreferences (  )  [slot]

Called when the user activates the "Preferences" action

Definition at line 2973 of file kdenlive.cpp.

References Gui::KdenliveSetupDlg::page5, Gui::KdenliveSetupDlg::selectedAudioDevice(), Gui::KdenliveSetupDlg::selectedAudioDriver(), Gui::KdenliveSetupDlg::selectedVideoDriver(), slotStatusMsg(), and updateConfiguration().

Referenced by initActions().

                                             {
      slotStatusMsg(i18n("Editing Preferences"));
      m_autoSaveTimer->stop();
      KdenliveSetupDlg *dialog =
          new KdenliveSetupDlg(this, this, "setupdlg");
      connect(dialog, SIGNAL(settingsChanged()), this,
          SLOT(updateConfiguration()));
      if (dialog->exec() == QDialog::Accepted) {
          KdenliveSettings::setDefaultprojectformat(projectFormatFromName(dialog->page5->defaultprojectformat->currentText()));
          bool notify = false;
          if (dialog->selectedAudioDevice() != KdenliveSettings::audiodevice()) {
              KdenliveSettings::setAudiodevice(dialog->selectedAudioDevice());
            notify = true;
          }
          if (dialog->selectedAudioDriver() != KdenliveSettings::audiodriver() && !(dialog->selectedAudioDriver().isEmpty() && KdenliveSettings::audiodriver().isEmpty())) {
            KdenliveSettings::setAudiodriver(dialog->selectedAudioDriver());
            notify = true;
          }
          if (dialog->selectedVideoDriver() != KdenliveSettings::videodriver() && !(dialog->selectedVideoDriver().isEmpty() && KdenliveSettings::videodriver().isEmpty())) {
            KdenliveSettings::setVideodriver(dialog->selectedVideoDriver());
            notify = true;
          }
          if (notify) {
            KMessageBox::sorry(this, i18n("Please restart Kdenlive to apply your changes\nto the audio/video system"));
          }
      }
      delete dialog;

      if (KdenliveSettings::autosave())
          m_autoSaveTimer->start(KdenliveSettings::autosavetime() * 60000, false);

      slotStatusMsg(i18n("Ready."));
    }


Generated by  Doxygen 1.6.0   Back to index