X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fkeyframedial.cpp;h=c7b5c56445244630eacebee55e7133bf87f4b617;hb=9459638ad6797b8139f1e9f0715c96076dbf0890;hp=ba607173d9ea4f667ae5ec3801a04857a59074d0;hpb=7bca451a7f43f49570cefb2decbd4ef1bd711eea;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/keyframedial.cpp b/synfig-studio/trunk/src/gtkmm/keyframedial.cpp index ba60717..c7b5c56 100644 --- a/synfig-studio/trunk/src/gtkmm/keyframedial.cpp +++ b/synfig-studio/trunk/src/gtkmm/keyframedial.cpp @@ -33,6 +33,7 @@ #include "keyframedial.h" #include +#include #endif @@ -49,15 +50,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")); + 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 * @@ -75,3 +78,19 @@ KeyFrameDial::create_icon(Gtk::IconSize iconsize, const char * stockid, return button; } + +Gtk::Button * +KeyFrameDial::create_icon(Gtk::IconSize iconsize, const Gtk::BuiltinStockID & stockid, + const char * tooltip) +{ + Gtk::Button *button = manage(new class Gtk::Button()); + Gtk::Image *icon = manage(new Gtk::Image(stockid, iconsize)); + button->add(*icon); + tooltips.set_tip(*button, tooltip); + icon->set_padding(0, 0); + icon->show(); + button->set_relief(Gtk::RELIEF_NONE); + button->show(); + + return button; +}