summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarcin Floryan <mfloryan@mm.waw.pl>2008-02-22 13:37:48 +0000
committermfloryan <mfloryan@users.sourceforge.net>2008-02-22 13:37:48 +0000
commit2ddaffebab5a866aa845b1c3621eb58aff790bfe (patch)
tree3f40d6b1686e3b9de87e9fa29f2b0691723307a7 /src
parentDon't crash when the original of an SPUse can't be found. This sort of fixes ... (diff)
downloadinkscape-2ddaffebab5a866aa845b1c3621eb58aff790bfe.tar.gz
inkscape-2ddaffebab5a866aa845b1c3621eb58aff790bfe.zip
Changed how tooltips for verbs are fetched to display translated versions correctly in the toolbox. Closes #169103.
(bzr r4822)
Diffstat (limited to 'src')
-rw-r--r--src/ink-action.cpp1
-rw-r--r--src/verbs.cpp6
-rw-r--r--src/verbs.h2
-rw-r--r--src/widgets/toolbox.cpp2
4 files changed, 9 insertions, 2 deletions
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 );