Code

Add option to align & distribute dialog to treat the selection as a group (closes...
[inkscape.git] / src / ui / dialog / find.cpp
index cfc1bfeb256da45dd1e0dffa90636a656c484625..f59f2504c062b68fe897841bf84e4a26fc2f44af 100644 (file)
@@ -76,7 +76,9 @@ Find::Find()
       _check_paths(_("Paths"), _("Search paths, lines, polylines")),
       _check_texts(_("Texts"), _("Search text objects")),
       _check_groups(_("Groups"), _("Search groups")),
-      _check_clones(_("Clones"), _("Search clones")),
+      _check_clones(
+                 //TRANSLATORS: Translate the word "Clones" only. A noun indicating type of object to find
+                 Q_("find|Clones"), _("Search clones")),
       _check_images(_("Images"), _("Search images")),
       _check_offsets(_("Offsets"), _("Search offset objects")),
     
@@ -275,7 +277,7 @@ Find::filter_fields (GSList *l, bool exact)
 bool
 Find::item_type_match (SPItem *item)
 {
-    SPDesktop *desktop = SP_ACTIVE_DESKTOP;
+    SPDesktop *desktop = getDesktop();
 
     if (SP_IS_RECT(item)) {
         return (_check_all_shapes.get_active() || _check_rects.get_active());
@@ -337,7 +339,7 @@ Find::filter_list (GSList *l, bool exact)
 GSList *
 Find::all_items (SPObject *r, GSList *l, bool hidden, bool locked)
 {
-    SPDesktop *desktop = SP_ACTIVE_DESKTOP;
+    SPDesktop *desktop = getDesktop();
 
     if (SP_IS_DEFS(r))
         return l; // we're not interested in items in defs
@@ -359,9 +361,9 @@ Find::all_items (SPObject *r, GSList *l, bool hidden, bool locked)
 GSList *
 Find::all_selection_items (Inkscape::Selection *s, GSList *l, SPObject *ancestor, bool hidden, bool locked)
 {
-    SPDesktop *desktop = SP_ACTIVE_DESKTOP;
+    SPDesktop *desktop = getDesktop();
 
-   for (GSList *i = (GSList *) s->itemList(); i != NULL; i = i->next) {
+    for (GSList *i = (GSList *) s->itemList(); i != NULL; i = i->next) {
         if (SP_IS_ITEM (i->data) && !SP_OBJECT_IS_CLONED (i->data) && !desktop->isLayer(SP_ITEM(i->data))) {
             if (!ancestor || ancestor->isAncestorOf(SP_OBJECT (i->data))) {
                 if ((hidden || !desktop->itemIsHidden(SP_ITEM(i->data))) && (locked || !SP_ITEM(i->data)->isLocked())) {
@@ -398,7 +400,7 @@ Find::onClear()
 void
 Find::onFind()
 {   
-    SPDesktop *desktop = SP_ACTIVE_DESKTOP;
+    SPDesktop *desktop = getDesktop();
 
     bool hidden = _check_include_hidden.get_active();
     bool locked = _check_include_locked.get_active();