Code

Warning cleanup.
[inkscape.git] / src / selection-describer.cpp
index 6b0e1ea425c968d9c63e2fd912658a19d4242fca..bd84030543fb2a6a62b45046a16fe464c1d28613 100644 (file)
@@ -24,6 +24,7 @@
 #include "sp-flowtext.h"
 #include "sp-use.h"
 #include "sp-rect.h"
+#include "box3d.h"
 #include "sp-ellipse.h"
 #include "sp-star.h"
 #include "sp-anchor.h"
@@ -38,7 +39,8 @@ const gchar *
 type2term(GType type)
 {
     if (type == SP_TYPE_ANCHOR)
-        { return _("Link"); }
+       // TRANSLATORS: only translate and put "Link" in the translation. It means internet link (anchor)
+        { return Q_("web|Link"); }
     if (type == SP_TYPE_CIRCLE)
         { return _("Circle"); }
     if (type == SP_TYPE_ELLIPSE)
@@ -59,8 +61,12 @@ type2term(GType type)
         { return _("Polyline"); }
     if (type == SP_TYPE_RECT)
         { return _("Rectangle"); }
+    if (type == SP_TYPE_BOX3D)
+        { return _("3D Box"); }
     if (type == SP_TYPE_TEXT)
         { return _("Text"); }
+    // TRANSLATORS: only translate "string" in "context|string".
+    // For more details, see http://developer.gnome.org/doc/API/2.0/glib/glib-I18N.html#Q-:CAPS
     if (type == SP_TYPE_USE)
         { return Q_("object|Clone"); }
     if (type == SP_TYPE_ARC)
@@ -91,10 +97,18 @@ namespace Inkscape {
 SelectionDescriber::SelectionDescriber(Inkscape::Selection *selection, MessageStack *stack)
 : _context(stack)
 {
-    selection->connectChanged(sigc::mem_fun(*this, &SelectionDescriber::_updateMessageFromSelection));
+    _selection_changed_connection = new sigc::connection (
+             selection->connectChanged(
+                 sigc::mem_fun(*this, &SelectionDescriber::_updateMessageFromSelection)));
     _updateMessageFromSelection(selection);
 }
 
+SelectionDescriber::~SelectionDescriber()
+{
+    _selection_changed_connection->disconnect();
+    delete _selection_changed_connection;
+}
+
 void SelectionDescriber::_updateMessageFromSelection(Inkscape::Selection *selection) {
     GSList const *items = selection->itemList();