Code

Merge and cleanup of GSoC C++-ification project.
[inkscape.git] / src / ui / dialog / find.cpp
index 5068e3bf4c91874eb6f08d85c73d1be4aaa613a7..b6d6a0319cd122d7fe855be03ce5f47b1a086c78 100644 (file)
@@ -4,6 +4,8 @@
  * Authors:
  *   Bryce W. Harrington <bryce@bryceharrington.org>
  *   Johan Engelen <goejendaagh@zonnet.nl>
+ *   Jon A. Cruz <jon@joncruz.org>
+ *   Abhishek Sharma
  *
  * Copyright (C) 2004-2006 Authors
  *
@@ -57,10 +59,10 @@ namespace Dialog {
 
 Find::Find()
     : UI::Widget::Panel("", "/dialogs/find", SP_VERB_DIALOG_FIND),
-      _entry_text(_("_Text: "), _("Find objects by their text content (exact or partial match)")),
-      _entry_id(_("_ID: "), _("Find objects by the value of the id attribute (exact or partial match)")),
-      _entry_style(_("_Style: "), _("Find objects by the value of the style attribute (exact or partial match)")),
-      _entry_attribute(_("_Attribute: "), _("Find objects by the name of an attribute (exact or partial match)")),
+      _entry_text(_("_Text:"), _("Find objects by their text content (exact or partial match)")),
+      _entry_id(_("_ID:"), _("Find objects by the value of the id attribute (exact or partial match)")),
+      _entry_style(_("_Style:"), _("Find objects by the value of the style attribute (exact or partial match)")),
+      _entry_attribute(_("_Attribute:"), _("Find objects by the name of an attribute (exact or partial match)")),
       _check_search_selection(_("Search in s_election"), _("Limit search to the current selection")),
       _check_search_layer(_("Search in current _layer"), _("Limit search to the current layer")),
       _check_include_hidden(_("Include _hidden"), _("Include hidden objects in search")),
@@ -76,10 +78,8 @@ Find::Find()
       _check_texts(_("Texts"), _("Search text objects")),
       _check_groups(_("Groups"), _("Search groups")),
       _check_clones(
-                  //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
-                  // "Clones" is a noun indicating type of object to find
-                 Q_("find|Clones"), _("Search clones")),
+                    //TRANSLATORS: "Clones" is a noun indicating type of object to find
+                    C_("Find dialog", "Clones"), _("Search clones")),
       _check_images(_("Images"), _("Search images")),
       _check_offsets(_("Offsets"), _("Search offset objects")),
     
@@ -348,7 +348,7 @@ Find::all_items (SPObject *r, GSList *l, bool hidden, bool locked)
     if (!strcmp (SP_OBJECT_REPR (r)->name(), "svg:metadata"))
         return l; // we're not interested in metadata
 
-    for (SPObject *child = r->first_child(); child; child = SP_OBJECT_NEXT (child)) {
+    for (SPObject *child = r->firstChild(); child; child = child->getNext()) {
         if (SP_IS_ITEM (child) && !SP_OBJECT_IS_CLONED (child) && !desktop->isLayer(SP_ITEM(child))) {
                 if ((hidden || !desktop->itemIsHidden(SP_ITEM(child))) && (locked || !SP_ITEM(child)->isLocked())) {
                     l = g_slist_prepend (l, child);
@@ -417,7 +417,7 @@ Find::onFind()
         if (_check_search_layer.get_active()) {
             l = all_items (desktop->currentLayer(), l, hidden, locked);
         } else {
-            l = all_items (SP_DOCUMENT_ROOT (sp_desktop_document (desktop)), l, hidden, locked);
+            l = all_items(sp_desktop_document(desktop)->getRoot(), l, hidden, locked);
         }
     }
     guint all = g_slist_length (l);