From: dooglus Date: Sun, 2 Nov 2008 18:31:51 +0000 (+0000) Subject: Fix 2112320: "Change 'Grab' button in the Gradient Editor". Renamed the 'Grab' butto... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=58dcd069768f926d6e43a327edaa47e3e5b0f921;p=synfig.git Fix 2112320: "Change 'Grab' button in the Gradient Editor". Renamed the 'Grab' button to 'Set as Default', and greyed it out when it is editing the default gradient. git-svn-id: https://synfig.svn.sourceforge.net/svnroot/synfig@2143 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-studio/trunk/src/gtkmm/cellrenderer_value.cpp b/synfig-studio/trunk/src/gtkmm/cellrenderer_value.cpp index eca2a97..34af34e 100644 --- a/synfig-studio/trunk/src/gtkmm/cellrenderer_value.cpp +++ b/synfig-studio/trunk/src/gtkmm/cellrenderer_value.cpp @@ -533,6 +533,7 @@ CellRenderer_ValueBase::start_editing_vfunc( path ) ); + App::dialog_gradient->grab_button_set_sensitive(true); App::dialog_gradient->present(); return NULL; diff --git a/synfig-studio/trunk/src/gtkmm/dialog_gradient.cpp b/synfig-studio/trunk/src/gtkmm/dialog_gradient.cpp index faedd6f..5a3edca 100644 --- a/synfig-studio/trunk/src/gtkmm/dialog_gradient.cpp +++ b/synfig-studio/trunk/src/gtkmm/dialog_gradient.cpp @@ -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)); diff --git a/synfig-studio/trunk/src/gtkmm/dialog_gradient.h b/synfig-studio/trunk/src/gtkmm/dialog_gradient.h index 7daa4ac..c681dac 100644 --- a/synfig-studio/trunk/src/gtkmm/dialog_gradient.h +++ b/synfig-studio/trunk/src/gtkmm/dialog_gradient.h @@ -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(); diff --git a/synfig-studio/trunk/src/gtkmm/widget_defaults.cpp b/synfig-studio/trunk/src/gtkmm/widget_defaults.cpp index 4567272..5158af0 100644 --- a/synfig-studio/trunk/src/gtkmm/widget_defaults.cpp +++ b/synfig-studio/trunk/src/gtkmm/widget_defaults.cpp @@ -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(); }