From: dooglus Date: Sun, 25 Feb 2007 05:13:09 +0000 (+0000) Subject: Added tooltips to the preview window's buttons. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=bd139d512a08554fce8b5fa43c9fb24adb62c50b;p=synfig.git Added tooltips to the preview window's buttons. git-svn-id: http://svn.voria.com/code@252 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-studio/trunk/src/gtkmm/preview.cpp b/synfig-studio/trunk/src/gtkmm/preview.cpp index fc59738..bea2c5a 100644 --- a/synfig-studio/trunk/src/gtkmm/preview.cpp +++ b/synfig-studio/trunk/src/gtkmm/preview.cpp @@ -34,6 +34,7 @@ #include "audiocontainer.h" #include #include +#include #include #include @@ -282,9 +283,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(); @@ -344,19 +346,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); @@ -368,19 +370,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); diff --git a/synfig-studio/trunk/src/gtkmm/preview.h b/synfig-studio/trunk/src/gtkmm/preview.h index ba36491..452f5a2 100644 --- a/synfig-studio/trunk/src/gtkmm/preview.h +++ b/synfig-studio/trunk/src/gtkmm/preview.h @@ -168,6 +168,7 @@ class Widget_Preview : public Gtk::Table Gtk::Adjustment adj_time_scrub; //the adjustment for the managed scrollbar Gtk::HScrollbar scr_time_scrub; Gtk::ToggleButton b_loop; + Gtk::Tooltips tooltips; //Glib::RefPtr gc_area; Glib::RefPtr currentbuf;