[pitivi: 48/65] Changed ProjectSettingsDialog to enable the Remove button after adding a preset. Fixes bug 638798.



commit c5f41c44ea642b19d312b6b1915d1d3d0ef78d30
Author: Alex BÄluÈ <alexandru balut gmail com>
Date:   Mon Jun 13 15:06:57 2011 +0200

    Changed ProjectSettingsDialog to enable the Remove button after adding a preset.
    Fixes bug 638798.

 pitivi/ui/projectsettings.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/ui/projectsettings.py b/pitivi/ui/projectsettings.py
index 037f46d..dbb965e 100644
--- a/pitivi/ui/projectsettings.py
+++ b/pitivi/ui/projectsettings.py
@@ -374,12 +374,15 @@ class ProjectSettingsDialog():
         self.save_audio_preset_button.set_sensitive(False)
 
     def _addVideoPresetButtonClickedCb(self, button):
-        self.video_presets.addPreset(_("New Preset"), {
+        preset_name = _("New Preset")
+        self.video_presets.addPreset(preset_name, {
             "width": int(self.width_spinbutton.get_value()),
             "height": int(self.height_spinbutton.get_value()),
             "frame-rate": self.frame_rate_fraction_widget.getWidgetValue(),
             "par": self.par_fraction_widget.getWidgetValue(),
         })
+        self.video_presets.restorePreset(preset_name)
+        self._updateVideoPresetButtons()
 
     def _removeVideoPresetButtonClickedCb(self, button):
         selection = self.video_preset_treeview.get_selection()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]