X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fpreview.cpp;h=69d9bf8cf4982ef8254b2c609c5b579d7ca9c8d1;hb=24ff35aed1b5a84e10599c686402cd41561e7510;hp=23d3d2395c71af84cd1778a985caae5343b1661f;hpb=02252941b29de64037116f4d37991a38d9ff0d94;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/preview.cpp b/synfig-studio/trunk/src/gtkmm/preview.cpp index 23d3d23..69d9bf8 100644 --- a/synfig-studio/trunk/src/gtkmm/preview.cpp +++ b/synfig-studio/trunk/src/gtkmm/preview.cpp @@ -5,16 +5,17 @@ ** $Id: preview.cpp,v 1.2 2005/01/10 08:13:44 darco Exp $ ** ** \legal -** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley ** -** This software and associated documentation -** are CONFIDENTIAL and PROPRIETARY property of -** the above-mentioned copyright holder. +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. ** -** You may not copy, print, publish, or in any -** other way distribute this software without -** a prior written agreement with -** the copyright holder. +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. ** \endlegal */ /* ========================================================================= */ @@ -281,9 +282,10 @@ void studio::Preview::frame_finish(const Preview_Target *targ) signal_changed()(); } -#define IMAGIFY_BUTTON(button,stockid) \ +#define IMAGIFY_BUTTON(button,stockid,tooltip) \ icon=manage(new Gtk::Image(Gtk::StockID(stockid),Gtk::ICON_SIZE_BUTTON)); \ button->add(*icon); \ + tooltips.set_tip(*button,tooltip); \ icon->set_padding(0,0);\ icon->show(); @@ -292,6 +294,8 @@ Widget_Preview::Widget_Preview() adj_time_scrub(0,0,1000,1,10,0), scr_time_scrub(adj_time_scrub), b_loop(/*_("Loop")*/), +currentindex(0), +audiotime(0), adj_sound(0,0,4), l_lasttime("0s"), playing(false) @@ -341,19 +345,19 @@ playing(false) hbox = manage(new Gtk::HBox); button = &b_loop; - IMAGIFY_BUTTON(button,Gtk::Stock::REFRESH); + IMAGIFY_BUTTON(button,Gtk::Stock::REFRESH,"Toggle Looping"); hbox->pack_start(b_loop,Gtk::PACK_SHRINK,0); //attach(b_loop,0,1,2,3,Gtk::EXPAND|Gtk::FILL,Gtk::SHRINK); button = manage(new Gtk::Button(/*_("Play")*/)); button->signal_clicked().connect(sigc::mem_fun(*this,&Widget_Preview::play)); - IMAGIFY_BUTTON(button,Gtk::Stock::GO_FORWARD); + IMAGIFY_BUTTON(button,Gtk::Stock::GO_FORWARD,"Play"); hbox->pack_start(*button,Gtk::PACK_SHRINK,0); //attach(*button,1,2,2,3,Gtk::EXPAND|Gtk::FILL,Gtk::SHRINK); button = manage(new Gtk::Button(/*_("Stop")*/)); button->signal_clicked().connect(sigc::mem_fun(*this,&Widget_Preview::stop)); - IMAGIFY_BUTTON(button,Gtk::Stock::NO); + IMAGIFY_BUTTON(button,Gtk::Stock::NO,"Stop"); hbox->pack_start(*button,Gtk::PACK_SHRINK,0); //attach(*button,2,3,2,3,Gtk::EXPAND|Gtk::FILL,Gtk::SHRINK); @@ -365,19 +369,19 @@ playing(false) button = manage(new Gtk::Button(/*_("Halt Render")*/)); button->signal_clicked().connect(sigc::mem_fun(*this,&Widget_Preview::stoprender)); - IMAGIFY_BUTTON(button,Gtk::Stock::STOP); + IMAGIFY_BUTTON(button,Gtk::Stock::STOP,"Halt Render"); hbox->pack_start(*button,Gtk::PACK_SHRINK,0); //attach(*button,2,3,3,4,Gtk::EXPAND|Gtk::FILL,Gtk::SHRINK); button = manage(new Gtk::Button(/*_("Re-Preview")*/)); button->signal_clicked().connect(sigc::mem_fun(*this,&Widget_Preview::repreview)); - IMAGIFY_BUTTON(button,Gtk::Stock::CONVERT); + IMAGIFY_BUTTON(button,Gtk::Stock::CONVERT,"Re-Preview"); hbox->pack_start(*button,Gtk::PACK_SHRINK,0); //attach(*button,0,2,4,5,Gtk::EXPAND|Gtk::FILL,Gtk::SHRINK); button = manage(new Gtk::Button(/*_("Erase All")*/)); button->signal_clicked().connect(sigc::mem_fun(*this,&Widget_Preview::eraseall)); - //IMAGIFY_BUTTON(button,Gtk::Stock::DELETE); + IMAGIFY_BUTTON(button,Gtk::Stock::DELETE,"Erase All"); hbox->pack_start(*button,Gtk::PACK_SHRINK,0); //attach(*button,2,3,4,5,Gtk::EXPAND|Gtk::FILL,Gtk::SHRINK);