summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMenTaLguY <mental@rydia.net>2006-05-27 05:47:13 +0000
committermental <mental@users.sourceforge.net>2006-05-27 05:47:13 +0000
commit586e7a89f45c9f0f83e5af0570431361c0d13427 (patch)
tree25def74e0d4b1a7517be0e30e3dd249f811816f6 /src
parentPrevent layer name duplication (diff)
downloadinkscape-586e7a89f45c9f0f83e5af0570431361c0d13427.tar.gz
inkscape-586e7a89f45c9f0f83e5af0570431361c0d13427.zip
make button labels translatable, and use HButtonBox versus HBox for better appearance
(bzr r1025)
Diffstat (limited to 'src')
-rw-r--r--src/dialogs/layers-panel.cpp36
-rw-r--r--src/dialogs/layers-panel.h3
2 files changed, 22 insertions, 17 deletions
diff --git a/src/dialogs/layers-panel.cpp b/src/dialogs/layers-panel.cpp
index 31e9823c6..4af154062 100644
--- a/src/dialogs/layers-panel.cpp
+++ b/src/dialogs/layers-panel.cpp
@@ -12,6 +12,8 @@
# include <config.h>
#endif
+#include <glibmm/i18n.h>
+
#include <gtk/gtkstock.h>
#include "inkscape.h"
@@ -130,10 +132,10 @@ protected:
const Glib::ustring& path,
const Gdk::Rectangle& background_area,
const Gdk::Rectangle& cell_area,
- Gtk::CellRendererState flags) {
- bool val = false;
+ Gtk::CellRendererState flags)
+ {
_signal_toggled.emit(path);
- return val;
+ return false;
}
@@ -639,44 +641,46 @@ LayersPanel::LayersPanel() :
SPDesktop* targetDesktop = SP_ACTIVE_DESKTOP;
+ _buttonsRow.set_child_min_width( 16 );
+
Gtk::Button* btn = manage( new Gtk::Button() );
- _styleButton( *btn, targetDesktop, SP_VERB_LAYER_NEW, GTK_STOCK_ADD, "Ne" );
+ _styleButton( *btn, targetDesktop, SP_VERB_LAYER_NEW, GTK_STOCK_ADD, _("New") );
btn->signal_clicked().connect( sigc::bind( sigc::mem_fun(*this, &LayersPanel::_takeAction), (int)BUTTON_NEW) );
- _buttonsRow.pack_start( *btn );
+ _buttonsRow.add( *btn );
btn = manage( new Gtk::Button() );
- _styleButton( *btn, targetDesktop, SP_VERB_LAYER_TO_TOP, GTK_STOCK_GOTO_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) );
_watchingNonTop.push_back( btn );
- _buttonsRow.pack_start( *btn );
+ _buttonsRow.add( *btn );
btn = manage( new Gtk::Button() );
- _styleButton( *btn, targetDesktop, SP_VERB_LAYER_RAISE, GTK_STOCK_GO_UP, "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) );
_watchingNonTop.push_back( btn );
- _buttonsRow.pack_start( *btn );
+ _buttonsRow.add( *btn );
btn = manage( new Gtk::Button() );
- _styleButton( *btn, targetDesktop, SP_VERB_LAYER_LOWER, GTK_STOCK_GO_DOWN, "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) );
_watchingNonBottom.push_back( btn );
- _buttonsRow.pack_start( *btn );
+ _buttonsRow.add( *btn );
btn = manage( new Gtk::Button() );
- _styleButton( *btn, targetDesktop, SP_VERB_LAYER_TO_BOTTOM, GTK_STOCK_GOTO_BOTTOM, "Btm" );
+ _styleButton( *btn, targetDesktop, SP_VERB_LAYER_TO_BOTTOM, GTK_STOCK_GOTO_BOTTOM, _("Bot") );
btn->signal_clicked().connect( sigc::bind( sigc::mem_fun(*this, &LayersPanel::_takeAction), (int)BUTTON_BOTTOM) );
_watchingNonBottom.push_back( btn );
- _buttonsRow.pack_start( *btn );
+ _buttonsRow.add( *btn );
// btn = manage( new Gtk::Button("Dup") );
// btn->signal_clicked().connect( sigc::bind( sigc::mem_fun(*this, &LayersPanel::_takeAction), (int)BUTTON_DUPLICATE) );
-// _buttonsRow.pack_start( *btn );
+// _buttonsRow.add( *btn );
btn = manage( new Gtk::Button() );
- _styleButton( *btn, targetDesktop, SP_VERB_LAYER_DELETE, GTK_STOCK_REMOVE, "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 );
+ _buttonsRow.add( *btn );
diff --git a/src/dialogs/layers-panel.h b/src/dialogs/layers-panel.h
index f7a9f0799..63cff3ede 100644
--- a/src/dialogs/layers-panel.h
+++ b/src/dialogs/layers-panel.h
@@ -16,6 +16,7 @@
#include <gtkmm/treestore.h>
#include <gtkmm/tooltips.h>
#include <gtkmm/scrolledwindow.h>
+#include <gtkmm/buttonbox.h>
#include "ui/widget/panel.h"
//#include "ui/previewholder.h"
@@ -101,7 +102,7 @@ private:
Gtk::Tooltips _tips;
Gtk::TreeView _tree;
- Gtk::HBox _buttonsRow;
+ Gtk::HButtonBox _buttonsRow;
Gtk::ScrolledWindow _scroller;
Gtk::Menu _popupMenu;
};