From: mfloryan Date: Fri, 22 Feb 2008 13:37:48 +0000 (+0000) Subject: Changed how tooltips for verbs are fetched to display translated versions correctly... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8ec823681d758984adf6f6a80256d3e1bf6ac8cb;p=inkscape.git Changed how tooltips for verbs are fetched to display translated versions correctly in the toolbox. Closes #169103. --- diff --git a/src/ink-action.cpp b/src/ink-action.cpp index 418a9ce4f..c09cade05 100644 --- a/src/ink-action.cpp +++ b/src/ink-action.cpp @@ -116,6 +116,7 @@ static void ink_action_finalize( GObject* obj ) } +//Any strings passed in should already be localised InkAction* ink_action_new( const gchar *name, const gchar *label, const gchar *tooltip, diff --git a/src/verbs.cpp b/src/verbs.cpp index 95d44483e..2902a4a2f 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -625,6 +625,12 @@ Verb::sensitive(SPDocument *in_doc, bool in_sensitive) return; } +/** \brief Accessor to get the tooltip for verb as localised string */ +gchar const * +Verb::get_tip (void) +{ + return _(_tip); +} void Verb::name(SPDocument *in_doc, Glib::ustring in_name) diff --git a/src/verbs.h b/src/verbs.h index 52f69e54e..b754d3807 100644 --- a/src/verbs.h +++ b/src/verbs.h @@ -341,7 +341,7 @@ public: /** \brief Accessor to get the internal variable. */ gchar const * get_name (void) { return _name; } /** \brief Accessor to get the internal variable. */ - gchar const * get_tip (void) { return _tip; } + gchar const * get_tip (void) ; /** \brief Accessor to get the internal variable. */ gchar const * get_image (void) { return _image; } diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index 1063ce2a1..8cdf0a07f 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -507,7 +507,7 @@ static GtkAction* create_action_for_verb( Inkscape::Verb* verb, Inkscape::UI::Vi GtkAction* act = 0; SPAction* targetAction = verb->get_action(view); - InkAction* inky = ink_action_new( verb->get_id(), verb->get_name(), _(verb->get_tip()), verb->get_image(), size ); + InkAction* inky = ink_action_new( verb->get_id(), _(verb->get_name()), verb->get_tip(), verb->get_image(), size ); act = GTK_ACTION(inky); gtk_action_set_sensitive( act, targetAction->sensitive );