summaryrefslogtreecommitdiffstats
path: root/src/widgets/spw-utilities.cpp
diff options
context:
space:
mode:
authorKris De Gussem <kris.degussem@gmail.com>2010-12-23 17:52:29 +0000
committerKris <Kris.De.Gussem@hotmail.com>2010-12-23 17:52:29 +0000
commit94e5fe845bd66b66069df22c241867af20c6bcaf (patch)
tree0508fc2d89f5a64f6d2cfbab08e473e9aba6718e /src/widgets/spw-utilities.cpp
parentFix crash in cycle-selection (and restructure internals). (diff)
downloadinkscape-94e5fe845bd66b66069df22c241867af20c6bcaf.tar.gz
inkscape-94e5fe845bd66b66069df22c241867af20c6bcaf.zip
Mnemonics in "Fill and stroke", "Align and distribute", and "Transform" dialogs (Bug 170765)
(bzr r9981)
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);