X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fframedial.cpp;h=6437930d6c920f4a1fb8520e7b46309411be7508;hb=e9a42a585dec26a8c0aabcfd6e12755f0f0f1156;hp=f892b60be306c499a60a99d22be53a6f1ec2546d;hpb=85041620c2c84b2b5c46207483c3441e8b0330d9;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/framedial.cpp b/synfig-studio/trunk/src/gtkmm/framedial.cpp index f892b60..6437930 100644 --- a/synfig-studio/trunk/src/gtkmm/framedial.cpp +++ b/synfig-studio/trunk/src/gtkmm/framedial.cpp @@ -6,7 +6,9 @@ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore ** Copyright (c) 2009 Gerco Ballintijn +** Copyright (c) 2009 Carlos López ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as @@ -32,6 +34,7 @@ #include "framedial.h" #include +#include #endif @@ -48,27 +51,34 @@ using namespace studio; /* === M E T H O D S ======================================================= */ -FrameDial::FrameDial(): Gtk::Table(3, 1, false) +FrameDial::FrameDial(): Gtk::Table(5, 1, false) { Gtk::IconSize iconsize = Gtk::IconSize::from_name("synfig-small_icon"); - seek_begin = create_icon(iconsize, GTK_STOCK_MEDIA_PREVIOUS, _("Seek to Begin")); - seek_prev_frame = create_icon(iconsize, GTK_STOCK_MEDIA_REWIND, _("Previous Frame")); - seek_next_frame = create_icon(iconsize, GTK_STOCK_MEDIA_FORWARD, _("Next Frame")); - seek_end = create_icon(iconsize, GTK_STOCK_MEDIA_NEXT, _("Seek to End")); + seek_begin = create_icon(iconsize, Gtk::Stock::MEDIA_PREVIOUS, + _("Seek to Begin")); + seek_prev_frame = create_icon(iconsize, Gtk::Stock::MEDIA_REWIND, + _("Previous Frame")); + play_stop = create_icon(iconsize, Gtk::Stock::MEDIA_PLAY, + _("Play")); + seek_next_frame = create_icon(iconsize, Gtk::Stock::MEDIA_FORWARD, + _("Next Frame")); + seek_end = create_icon(iconsize, Gtk::Stock::MEDIA_NEXT, + _("Seek to End")); attach(*seek_begin, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); attach(*seek_prev_frame, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); - attach(*seek_next_frame, 2, 3, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); - attach(*seek_end, 3, 4, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); + attach(*play_stop, 2, 3, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); + attach(*seek_next_frame, 3, 4, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); + attach(*seek_end, 4, 5, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); } Gtk::Button * -FrameDial::create_icon(Gtk::IconSize iconsize, const char * stockid, +FrameDial::create_icon(Gtk::IconSize size, const Gtk::BuiltinStockID & stockid, const char * tooltip) { Gtk::Button *button = manage(new class Gtk::Button()); - Gtk::Image *icon = manage(new Gtk::Image(Gtk::StockID(stockid), iconsize)); + Gtk::Image *icon = manage(new Gtk::Image(stockid, size)); button->add(*icon); tooltips.set_tip(*button, tooltip); icon->set_padding(0, 0); @@ -78,3 +88,4 @@ FrameDial::create_icon(Gtk::IconSize iconsize, const char * stockid, return button; } +