Code

Pot and Dutch translation update
[inkscape.git] / src / selection-chemistry.cpp
index f1262e9ca140f7b23aef1eece39df8b594238c87..8b917de55ed8201a7da335684856c9962c673fb5 100644 (file)
@@ -415,6 +415,15 @@ void sp_selection_duplicate(SPDesktop *desktop, bool suppressDone)
                         g_free(newref);
                     }
                 }
+            } else if (SP_IS_OFFSET(old_clone)) {
+                for (guint j = 0; j < old_ids.size(); j++) {
+                gchar *source_href = SP_OFFSET(old_clone)->sourceHref;
+                    if (source_href && source_href[0]=='#' && !strcmp(source_href+1, old_ids[j])) {
+                        gchar *newref = g_strdup_printf("#%s", new_ids[j]);
+                        doc->getObjectById(new_ids[i])->repr->setAttribute("xlink:href", newref);
+                        g_free(newref);
+                    }
+                }
             }
         }
     }
@@ -844,10 +853,8 @@ sp_selection_raise(SPDesktop *desktop)
     }
 
     sp_document_done(sp_desktop_document(desktop), SP_VERB_SELECTION_RAISE,
-                     //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
-                     // "Raise" means "to raise an object" in the undo history
-                     Q_("undo action|Raise"));
+                     //TRANSLATORS: "Raise" means "to raise an object" in the undo history
+                     C_("Undo action", "Raise"));
 }
 
 void sp_selection_raise_to_top(SPDesktop *desktop)
@@ -2053,10 +2060,8 @@ sp_selection_clone(SPDesktop *desktop)
         Inkscape::GC::release(clone);
     }
 
-    // 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
     sp_document_done(sp_desktop_document(desktop), SP_VERB_EDIT_CLONE,
-                     Q_("action|Clone"));
+                     C_("Action","Clone"));
 
     selection->setReprList(newsel);
 
@@ -2154,6 +2159,11 @@ sp_selection_unlink(SPDesktop *desktop)
         SPItem *unlink;
         if (SP_IS_USE(item)) {
             unlink = sp_use_unlink(SP_USE(item));
+            // Unable to unlink use (external or invalid href?)
+            if (!unlink) {
+                new_select = g_slist_prepend(new_select, item);
+                continue;
+            }
         } else /*if (SP_IS_TREF(use))*/ {
             unlink = SP_ITEM(sp_tref_convert_to_tspan(item));
         }
@@ -3308,4 +3318,4 @@ void unhide_all_in_all_layers(SPDesktop *dt) {
   fill-column:99
   End:
 */
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :