From 94e5fe845bd66b66069df22c241867af20c6bcaf Mon Sep 17 00:00:00 2001 From: Kris De Gussem Date: Thu, 23 Dec 2010 18:52:29 +0100 Subject: Mnemonics in "Fill and stroke", "Align and distribute", and "Transform" dialogs (Bug 170765) (bzr r9981) --- src/widgets/spw-utilities.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/widgets/spw-utilities.cpp') 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(0), 4, 0); -- cgit v1.2.3