Module: synfig
Branch: genete_master
Commit: 38134c93640054cbf5a92f778c0cedb3fa7b4733
URL:
http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=38134c93640054cbf5a92f778c0cedb3fa7b4733
Author: Carlos Lopez <car...@pcnuevo.(none)>
Date: Tue Jun 23 16:27:06 2009 +0200
Use Gtkmm stock items instead of Gtk ones for Keyframe Dial buttons.
---
synfig-studio/trunk/src/gtkmm/keyframedial.cpp | 21 +++++++++++++++++++--
synfig-studio/trunk/src/gtkmm/keyframedial.h | 1 +
2 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/synfig-studio/trunk/src/gtkmm/keyframedial.cpp
b/synfig-studio/trunk/src/gtkmm/keyframedial.cpp
index a9bf328..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 <gtkmm/image.h>
+#include <gtkmm/stock.h>
#endif
@@ -53,8 +54,8 @@ 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);
@@ -77,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;
+}
diff --git a/synfig-studio/trunk/src/gtkmm/keyframedial.h
b/synfig-studio/trunk/src/gtkmm/keyframedial.h
index 41dfc57..a6491c9 100644
--- a/synfig-studio/trunk/src/gtkmm/keyframedial.h
+++ b/synfig-studio/trunk/src/gtkmm/keyframedial.h
@@ -54,6 +54,7 @@ class KeyFrameDial : public Gtk::Table
Gtk::Button *lock_keyframe;
Gtk::Button *create_icon(Gtk::IconSize iconsize, const char * stockid,
const char * tooltip);
+ Gtk::Button *create_icon(Gtk::IconSize iconsize, const
Gtk::BuiltinStockID & stockid, const char * tooltip);
public:
------------------------------------------------------------------------------
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl