summaryrefslogtreecommitdiffstats
path: root/src/widgets/spw-utilities.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2011-04-07 23:42:04 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2011-04-07 23:42:04 +0000
commit945ce419c806c73d70203dec33ececafbe108a92 (patch)
treecfcdb59bf47e9db7f9e01f7eebb59924bdeaea94 /src/widgets/spw-utilities.cpp
parentMerge from trunk (again) (diff)
parentExtensions. SVG+media fix (see Bug #400356). (diff)
downloadinkscape-945ce419c806c73d70203dec33ececafbe108a92.tar.gz
inkscape-945ce419c806c73d70203dec33ececafbe108a92.zip
Merge from trunk
(bzr r9508.1.73)
Diffstat (limited to 'src/widgets/spw-utilities.cpp')
-rw-r--r--src/widgets/spw-utilities.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/widgets/spw-utilities.cpp b/src/widgets/spw-utilities.cpp
index 7c2956c65..49e3a7495 100644
--- a/src/widgets/spw-utilities.cpp
+++ b/src/widgets/spw-utilities.cpp
@@ -34,11 +34,19 @@
* position in the table.
*/
Gtk::Label *
-spw_label(Gtk::Table *table, const gchar *label_text, int col, int row)
+spw_label(Gtk::Table *table, const gchar *label_text, int col, int row, Gtk::Widget* target)
{
- Gtk::Label *label_widget = new Gtk::Label(label_text);
+ Gtk::Label *label_widget = new Gtk::Label();
g_assert(label_widget != NULL);
-
+ if (target != NULL)
+ {
+ label_widget->set_text_with_mnemonic(label_text);
+ label_widget->set_mnemonic_widget(*target);
+ }
+ else
+ {
+ label_widget->set_text(label_text);
+ }
label_widget->set_alignment(1.0, 0.5);
label_widget->show();
table->attach(*label_widget, col, col+1, row, row+1, (Gtk::EXPAND | Gtk::FILL), static_cast<Gtk::AttachOptions>(0), 4, 0);