summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bfdf250)
raw | patch | inline | side by side (parent: bfdf250)
author | joncruz <joncruz@users.sourceforge.net> | |
Wed, 17 May 2006 03:57:05 +0000 (03:57 +0000) | ||
committer | joncruz <joncruz@users.sourceforge.net> | |
Wed, 17 May 2006 03:57:05 +0000 (03:57 +0000) |
ChangeLog | patch | blob | history | |
src/dialogs/layers-panel.cpp | patch | blob | history | |
src/dialogs/layers-panel.h | patch | blob | history |
diff --git a/ChangeLog b/ChangeLog
index e509efdfdfe3bb1ff10a7f47bf9388319be6fdea..cd914d5a9bbaa8d6c24819d2386f7ecf87f6c90f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
+2006-05-17 Jon A. Cruz <jon@joncruz.org>
+ * src/dialogs/layers-panel.cpp, src/dialogs/layers-panel.h:
+ Switched icons to stock generic.
+
2006-05-17 Michael Wybrow <mjwybrow@users.sourceforge.net>
* src/dialogs/layers-panel.cpp: Compile fix from Mathieu Dimanche.
index 5404672efe1d2451993c6e120c1d21760eefc65a..ac0696f7fabb76a273c27f4a2fa5066840f83bdb 100644 (file)
# include <config.h>
#endif
+#include <gtk/gtkstock.h>
+
#include "inkscape.h"
#include "layers-panel.h"
BUTTON_DELETE
};
-void LayersPanel::_styleButton( Gtk::Button& btn, SPDesktop *desktop, unsigned int code, char const* fallback )
+void LayersPanel::_styleButton( Gtk::Button& btn, SPDesktop *desktop, unsigned int code, char const* iconName, char const* fallback )
{
bool set = false;
+
+ if ( iconName ) {
+ GtkWidget *child = sp_icon_new( Inkscape::ICON_SIZE_SMALL_TOOLBAR, iconName );
+ gtk_widget_show( child );
+ btn.add( *manage(Glib::wrap(child)) );
+ set = true;
+ }
+
if ( desktop ) {
Verb *verb = Verb::get( code );
if ( verb ) {
SPAction *action = verb->get_action(desktop);
- if ( action && action->image ) {
+ if ( !set && action && action->image ) {
GtkWidget *child = sp_icon_new( Inkscape::ICON_SIZE_SMALL_TOOLBAR, action->image );
gtk_widget_show( child );
btn.add( *manage(Glib::wrap(child)) );
}
}
}
+
if ( !set && fallback ) {
btn.set_label( fallback );
}
SPDesktop* targetDesktop = SP_ACTIVE_DESKTOP;
Gtk::Button* btn = manage( new Gtk::Button() );
- _styleButton( *btn, targetDesktop, SP_VERB_LAYER_NEW, "Ne" );
+ _styleButton( *btn, targetDesktop, SP_VERB_LAYER_NEW, GTK_STOCK_ADD, "Ne" );
btn->signal_clicked().connect( sigc::bind( sigc::mem_fun(*this, &LayersPanel::_takeAction), (int)BUTTON_NEW) );
_buttonsRow.pack_start( *btn );
btn = manage( new Gtk::Button() );
- _styleButton( *btn, targetDesktop, SP_VERB_LAYER_TO_TOP, "Top" );
+ _styleButton( *btn, targetDesktop, SP_VERB_LAYER_TO_TOP, GTK_STOCK_GOTO_TOP, "Top" );
btn->signal_clicked().connect( sigc::bind( sigc::mem_fun(*this, &LayersPanel::_takeAction), (int)BUTTON_TOP) );
_watching.push_back( btn );
_buttonsRow.pack_start( *btn );
btn = manage( new Gtk::Button() );
- _styleButton( *btn, targetDesktop, SP_VERB_LAYER_RAISE, "Up" );
+ _styleButton( *btn, targetDesktop, SP_VERB_LAYER_RAISE, GTK_STOCK_GO_UP, "Up" );
btn->signal_clicked().connect( sigc::bind( sigc::mem_fun(*this, &LayersPanel::_takeAction), (int)BUTTON_UP) );
_watching.push_back( btn );
_buttonsRow.pack_start( *btn );
btn = manage( new Gtk::Button() );
- _styleButton( *btn, targetDesktop, SP_VERB_LAYER_LOWER, "Dn" );
+ _styleButton( *btn, targetDesktop, SP_VERB_LAYER_LOWER, GTK_STOCK_GO_DOWN, "Dn" );
btn->signal_clicked().connect( sigc::bind( sigc::mem_fun(*this, &LayersPanel::_takeAction), (int)BUTTON_DOWN) );
_watching.push_back( btn );
_buttonsRow.pack_start( *btn );
btn = manage( new Gtk::Button() );
- _styleButton( *btn, targetDesktop, SP_VERB_LAYER_TO_BOTTOM, "Btm" );
+ _styleButton( *btn, targetDesktop, SP_VERB_LAYER_TO_BOTTOM, GTK_STOCK_GOTO_BOTTOM, "Btm" );
btn->signal_clicked().connect( sigc::bind( sigc::mem_fun(*this, &LayersPanel::_takeAction), (int)BUTTON_BOTTOM) );
_watching.push_back( btn );
_buttonsRow.pack_start( *btn );
// _buttonsRow.pack_start( *btn );
btn = manage( new Gtk::Button() );
- _styleButton( *btn, targetDesktop, SP_VERB_LAYER_DELETE, "X" );
+ _styleButton( *btn, targetDesktop, SP_VERB_LAYER_DELETE, GTK_STOCK_REMOVE, "X" );
btn->signal_clicked().connect( sigc::bind( sigc::mem_fun(*this, &LayersPanel::_takeAction), (int)BUTTON_DELETE) );
_watching.push_back( btn );
_buttonsRow.pack_start( *btn );
index e931e3b39c84aeb62be9a0088724966352810ebf..366abfa987c35ed5d887bf85d6c84dbd70246f50 100644 (file)
static LayersPanel* instance;
- void _styleButton( Gtk::Button& btn, SPDesktop *desktop, unsigned int code, char const* fallback );
+ void _styleButton( Gtk::Button& btn, SPDesktop *desktop, unsigned int code, char const* iconName, char const* fallback );
void _fireAction( unsigned int code );
void _toggled( Glib::ustring const& str, int targetCol );