Only enable choose target parameters button if ffmpeg target is selected
authorCarlos Lopez <genetita@gmail.com>
Fri, 28 May 2010 15:26:56 +0000 (17:26 +0200)
committerCarlos Lopez <genetita@gmail.com>
Fri, 28 May 2010 15:26:56 +0000 (17:26 +0200)
synfig-studio/src/gtkmm/render.cpp
synfig-studio/src/gtkmm/render.h

index 5de4148..4a7d6d2 100644 (file)
@@ -106,8 +106,9 @@ RenderSettings::RenderSettings(Gtk::Window& parent, etl::handle<synfigapp::Canva
        choose_button->show();
        choose_button->signal_clicked().connect(sigc::mem_fun(*this, &studio::RenderSettings::on_choose_pressed));
 
-       Gtk::Button *tparam_button(manage(new class Gtk::Button(Gtk::StockID(_("Parameters...")))));
+       tparam_button=manage(new class Gtk::Button(Gtk::StockID(_("Parameters..."))));
        tparam_button->show();
+       tparam_button->set_sensitive(false);
        tparam_button->signal_clicked().connect(sigc::mem_fun(*this, &studio::RenderSettings::on_targetparam_pressed));
 
        Gtk::Frame *target_frame=manage(new Gtk::Frame(_("Target")));
@@ -235,6 +236,7 @@ void
 RenderSettings::set_target(synfig::String name)
 {
        target_name=name;
+       tparam_button->set_sensitive(target_name.compare("ffmpeg")?false:true);
 }
 
 void
index 729251b..ac26cbc 100644 (file)
@@ -74,6 +74,7 @@ class RenderSettings : public Gtk::Dialog
 
        Gtk::OptionMenu optionmenu_target;
        Gtk::Menu *menu_target;
+       Gtk::Button *tparam_button;
 
        synfig::String target_name;