From: Carlos Lopez Date: Sun, 21 Jun 2009 10:45:00 +0000 (+0200) Subject: Move Lock keyframe button to the KeyFrameDial X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=5aa08267da13439daab566f02fb3a20104511752;p=synfig.git Move Lock keyframe button to the KeyFrameDial --- diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index 89bad1b..7223410 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -968,14 +968,16 @@ CanvasView::create_time_bar() //time_scroll->set_update_policy(Gtk::UPDATE_DISCONTINUOUS); //Setup the Animation Mode Button and the Keyframe Lock button - NORMAL_BUTTON(animatebutton,"gtk-yes",_("Animate")); + Gtk::IconSize iconsize=Gtk::IconSize::from_name("synfig-small_icon"); + SMALL_BUTTON(animatebutton,"gtk-yes",_("Animate")); animatebutton->signal_clicked().connect(sigc::mem_fun(*this, &studio::CanvasView::on_animate_button_pressed)); animatebutton->show(); - +/* NORMAL_BUTTON(keyframebutton,"synfig-keyframe_lock_all",_("All Keyframes Locked")); keyframebutton->signal_clicked().connect(sigc::mem_fun(*this, &studio::CanvasView::on_keyframe_button_pressed)); keyframebutton->show(); - + keyframebutton->set_relief(Gtk::RELIEF_NONE); +*/ //Setup the audio display disp_audio->set_size_request(-1,32); //disp_audio->show(); disp_audio->set_time_adjustment(&time_adjustment()); @@ -1016,7 +1018,9 @@ CanvasView::create_time_bar() KeyFrameDial *keyframedial = Gtk::manage(new class KeyFrameDial()); keyframedial->signal_seek_prev_keyframe().connect(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::jump_to_prev_keyframe)); keyframedial->signal_seek_next_keyframe().connect(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::jump_to_next_keyframe)); + keyframedial->signal_lock_keyframe().connect(sigc::mem_fun(*this, &studio::CanvasView::on_keyframe_button_pressed)); keyframedial->show(); + keyframebutton=keyframedial->get_lock_button(); Gtk::Table *table = manage(new class Gtk::Table(4, 4, false)); timebar = table; @@ -1029,7 +1033,7 @@ CanvasView::create_time_bar() table->attach(*time_window_scroll, 1, 4, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); table->attach(*keyframedial, 0, 1, 3, 4, Gtk::SHRINK, Gtk::SHRINK); table->attach(*animatebutton, 2, 3, 3, 4, Gtk::SHRINK, Gtk::SHRINK); - table->attach(*keyframebutton, 1, 2, 3, 4, Gtk::SHRINK, Gtk::SHRINK); + //table->attach(*keyframebutton, 1, 2, 3, 4, Gtk::SHRINK, Gtk::SHRINK); table->show(); diff --git a/synfig-studio/trunk/src/gtkmm/keyframedial.cpp b/synfig-studio/trunk/src/gtkmm/keyframedial.cpp index ba60717..a9bf328 100644 --- a/synfig-studio/trunk/src/gtkmm/keyframedial.cpp +++ b/synfig-studio/trunk/src/gtkmm/keyframedial.cpp @@ -49,15 +49,17 @@ using namespace studio; /* === M E T H O D S ======================================================= */ -KeyFrameDial::KeyFrameDial(): Gtk::Table(1, 2, false) +KeyFrameDial::KeyFrameDial(): Gtk::Table(1, 3, false) { Gtk::IconSize iconsize = Gtk::IconSize::from_name("synfig-small_icon"); seek_prev_keyframe = create_icon(iconsize, GTK_STOCK_GO_BACK, _("Previous KeyFrame")); seek_next_keyframe = create_icon(iconsize, GTK_STOCK_GO_FORWARD, _("Next KeyFrame")); + lock_keyframe = create_icon(Gtk::ICON_SIZE_BUTTON, "synfig-keyframe_lock_all",_("All Keyframes Locked")); attach(*seek_prev_keyframe, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); attach(*seek_next_keyframe, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); + attach(*lock_keyframe, 2, 3, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); } Gtk::Button * diff --git a/synfig-studio/trunk/src/gtkmm/keyframedial.h b/synfig-studio/trunk/src/gtkmm/keyframedial.h index 6636590..41dfc57 100644 --- a/synfig-studio/trunk/src/gtkmm/keyframedial.h +++ b/synfig-studio/trunk/src/gtkmm/keyframedial.h @@ -51,6 +51,7 @@ class KeyFrameDial : public Gtk::Table Gtk::Button *seek_prev_keyframe; Gtk::Button *seek_next_keyframe; + Gtk::Button *lock_keyframe; Gtk::Button *create_icon(Gtk::IconSize iconsize, const char * stockid, const char * tooltip); @@ -59,6 +60,8 @@ public: KeyFrameDial(); Glib::SignalProxy0 signal_seek_prev_keyframe() { return seek_prev_keyframe->signal_clicked(); } Glib::SignalProxy0 signal_seek_next_keyframe() { return seek_next_keyframe->signal_clicked(); } + Glib::SignalProxy0 signal_lock_keyframe() { return lock_keyframe->signal_clicked(); } + Gtk::Button *get_lock_button() { return lock_keyframe; } }; // END of class KeyFrameDial