Fix 2112320: "Change 'Grab' button in the Gradient Editor". Renamed the 'Grab' butto...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sun, 2 Nov 2008 18:31:51 +0000 (18:31 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sun, 2 Nov 2008 18:31:51 +0000 (18:31 +0000)
git-svn-id: https://synfig.svn.sourceforge.net/svnroot/synfig@2143 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-studio/trunk/src/gtkmm/cellrenderer_value.cpp
synfig-studio/trunk/src/gtkmm/dialog_gradient.cpp
synfig-studio/trunk/src/gtkmm/dialog_gradient.h
synfig-studio/trunk/src/gtkmm/widget_defaults.cpp

index eca2a97..34af34e 100644 (file)
@@ -533,6 +533,7 @@ CellRenderer_ValueBase::start_editing_vfunc(
                                path
                        )
                );
+               App::dialog_gradient->grab_button_set_sensitive(true);
                App::dialog_gradient->present();
 
                return NULL;
index faedd6f..5a3edca 100644 (file)
@@ -72,7 +72,7 @@ Dialog_Gradient::Dialog_Gradient():
        set_role("gradient_editor");
 
        // Setup the buttons
-       Gtk::Button *grab_button(manage(new class Gtk::Button(Gtk::StockID(_("Grab")))));
+       grab_button = manage(new class Gtk::Button(Gtk::StockID(_("Set as Default"))));
        grab_button->show();
        add_action_widget(*grab_button,2);
        grab_button->signal_clicked().connect(sigc::mem_fun(*this, &Dialog_Gradient::on_grab_pressed));
index 7daa4ac..c681dac 100644 (file)
@@ -86,6 +86,7 @@ class Dialog_Gradient : public Gtk::Dialog
 
        Widget_Gradient* widget_gradient;
        Widget_ColorEdit* widget_color;
+       Gtk::Button *grab_button;
 
        void on_changed();
 
@@ -97,6 +98,8 @@ public:
 
        const synfig::Gradient& get_gradient()const { return widget_gradient->get_value(); }
 
+       void grab_button_set_sensitive(bool sensitive) { grab_button->set_sensitive(sensitive); }
+
        void reset();
 
 
index 4567272..5158af0 100644 (file)
@@ -464,6 +464,7 @@ Widget_Defaults::on_gradient_clicked()
        App::dialog_gradient->set_gradient(synfigapp::Main::get_gradient());
        App::dialog_gradient->reset();
        App::dialog_gradient->signal_edited().connect(sigc::ptr_fun(synfigapp::Main::set_gradient));
+       App::dialog_gradient->grab_button_set_sensitive(false);
        App::dialog_gradient->present();
 }