From: Gerco Ballintijn Date: Mon, 22 Jun 2009 12:02:52 +0000 (+0200) Subject: Use the GTKmm (instead of GTK) icon specifications for the Zoom and Frame X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=2d3216db7740f8155429914c17af1edb04a032bb;p=synfig.git Use the GTKmm (instead of GTK) icon specifications for the Zoom and Frame Navigation buttons. --- diff --git a/synfig-studio/trunk/src/gtkmm/framedial.cpp b/synfig-studio/trunk/src/gtkmm/framedial.cpp index f892b60..a361bd3 100644 --- a/synfig-studio/trunk/src/gtkmm/framedial.cpp +++ b/synfig-studio/trunk/src/gtkmm/framedial.cpp @@ -32,6 +32,7 @@ #include "framedial.h" #include +#include #endif @@ -52,10 +53,14 @@ FrameDial::FrameDial(): Gtk::Table(3, 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")); + 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); @@ -64,11 +69,11 @@ FrameDial::FrameDial(): Gtk::Table(3, 1, false) } 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 +83,4 @@ FrameDial::create_icon(Gtk::IconSize iconsize, const char * stockid, return button; } + diff --git a/synfig-studio/trunk/src/gtkmm/framedial.h b/synfig-studio/trunk/src/gtkmm/framedial.h index 58136b7..01f2be0 100644 --- a/synfig-studio/trunk/src/gtkmm/framedial.h +++ b/synfig-studio/trunk/src/gtkmm/framedial.h @@ -53,7 +53,8 @@ class FrameDial : public Gtk::Table Gtk::Button *seek_next_frame; Gtk::Button *seek_end; - Gtk::Button *create_icon(Gtk::IconSize iconsize, const char * stockid, const char * tooltip); + Gtk::Button *create_icon(Gtk::IconSize size, const Gtk::BuiltinStockID & stockid, + const char * tooltip); public: FrameDial(); diff --git a/synfig-studio/trunk/src/gtkmm/zoomdial.cpp b/synfig-studio/trunk/src/gtkmm/zoomdial.cpp index aa42f1c..ae2f4a4 100644 --- a/synfig-studio/trunk/src/gtkmm/zoomdial.cpp +++ b/synfig-studio/trunk/src/gtkmm/zoomdial.cpp @@ -31,6 +31,7 @@ #include "zoomdial.h" #include +#include #include "general.h" @@ -51,10 +52,10 @@ using namespace studio; ZoomDial::ZoomDial(Gtk::IconSize & size): Table(3, 1, false) { - zoom_in = create_icon(size, GTK_STOCK_ZOOM_IN, _("Zoom In")); - zoom_out = create_icon(size, GTK_STOCK_ZOOM_OUT, _("Zoom Out")); - zoom_fit = create_icon(size, GTK_STOCK_ZOOM_FIT, _("Zoom to Fit")); - zoom_norm = create_icon(size, GTK_STOCK_ZOOM_100, _("Zoom to 100%")); + zoom_in = create_icon(size, Gtk::Stock::ZOOM_IN, _("Zoom In")); + zoom_out = create_icon(size, Gtk::Stock::ZOOM_OUT, _("Zoom Out")); + zoom_fit = create_icon(size, Gtk::Stock::ZOOM_FIT, _("Zoom to Fit")); + zoom_norm = create_icon(size, Gtk::Stock::ZOOM_100, _("Zoom to 100%")); attach(*zoom_out, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); attach(*zoom_norm, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); @@ -63,11 +64,11 @@ ZoomDial::ZoomDial(Gtk::IconSize & size): Table(3, 1, false) } Gtk::Button * -ZoomDial::create_icon(Gtk::IconSize size, const char * stockid, +ZoomDial::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), size)); + Gtk::Image *icon = manage(new Gtk::Image(stockid, size)); button->add(*icon); tooltips.set_tip(*button, tooltip); icon->set_padding(0, 0); @@ -78,4 +79,3 @@ ZoomDial::create_icon(Gtk::IconSize size, const char * stockid, return button; } - diff --git a/synfig-studio/trunk/src/gtkmm/zoomdial.h b/synfig-studio/trunk/src/gtkmm/zoomdial.h index eda3fae..1d9d63a 100644 --- a/synfig-studio/trunk/src/gtkmm/zoomdial.h +++ b/synfig-studio/trunk/src/gtkmm/zoomdial.h @@ -50,7 +50,7 @@ class ZoomDial : public Gtk::Table Gtk::Button *zoom_fit; Gtk::Button *zoom_norm; - Gtk::Button *create_icon(Gtk::IconSize size, const char * stockid, + Gtk::Button *create_icon(Gtk::IconSize size, const Gtk::BuiltinStockID & stockid, const char * tooltip); public: