selection-describer.cpp revision 4358ff6156766a315e38e72a5c3c83d6d5f7486b
/*
* Inkscape::SelectionDescriber - shows messages describing selection
*
* Authors:
* MenTaLguY <mental@rydia.net>
* bulia byak <buliabyak@users.sf.net>
*
* Copyright (C) 2004-2006 Authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "selection.h"
#include "selection-describer.h"
#include "desktop.h"
#include "sp-textpath.h"
#include "sp-offset.h"
#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"
#include "sp-image.h"
#include "sp-path.h"
#include "sp-line.h"
#include "sp-use.h"
#include "sp-polyline.h"
#include "sp-spiral.h"
const gchar *
{
if (type == SP_TYPE_ANCHOR)
{ return _("Link"); }
if (type == SP_TYPE_CIRCLE)
{ return _("Circle"); }
if (type == SP_TYPE_ELLIPSE)
{ return _("Ellipse"); }
if (type == SP_TYPE_FLOWTEXT)
{ return _("Flowed text"); }
if (type == SP_TYPE_GROUP)
{ return _("Group"); }
if (type == SP_TYPE_IMAGE)
{ return _("Image"); }
if (type == SP_TYPE_LINE)
{ return _("Line"); }
if (type == SP_TYPE_PATH)
{ return _("Path"); }
if (type == SP_TYPE_POLYGON)
{ return _("Polygon"); }
if (type == SP_TYPE_POLYLINE)
{ 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)
{ return _("Ellipse"); }
if (type == SP_TYPE_OFFSET)
{ return _("Offset path"); }
if (type == SP_TYPE_SPIRAL)
{ return _("Spiral"); }
if (type == SP_TYPE_STAR)
{ return _("Star"); }
return NULL;
}
{
r = g_slist_prepend (r, (void *) term);
}
return r;
}
namespace Inkscape {
{
}
char const *when_selected = _("Click selection to toggle scale/rotation handles");
if (!items) { // no items
_context.set(Inkscape::NORMAL_MESSAGE, _("No objects selected. Click, Shift+click, or drag around objects to select."));
} else {
// Layer name
} else {
char const *layer_label;
bool is_label = false;
is_label = true;
} else {
}
if (is_label) {
} else {
}
}
// Parent name
if (num_layers == 1) {
if (num_parents == 1) {
else
} else {
in_phrase = g_strdup_printf(ngettext(" in <b>%i</b> parents (%s)", " in <b>%i</b> parents (%s)", num_parents), num_parents, layer_name);
}
} else {
in_phrase = g_strdup_printf(ngettext(" in <b>%i</b> layers", " in <b>%i</b> layers", num_layers), num_layers);
}
g_free (layer_name);
_("Use <b>Shift+D</b> to look up original"), when_selected);
} else if (SP_IS_TEXT_TEXTPATH(item)) {
_("Use <b>Shift+D</b> to look up path"), when_selected);
_("Use <b>Shift+D</b> to look up frame"), when_selected);
} else {
}
} else { // multiple items
if (n_terms == 0) {
// this is only used with 2 or more objects
} else if (n_terms == 1) {
// this is only used with 2 or more objects
ngettext("<b>%i</b> object of type <b>%s</b>", "<b>%i</b> objects of type <b>%s</b>", object_count),
} else if (n_terms == 2) {
// this is only used with 2 or more objects
ngettext("<b>%i</b> object of types <b>%s</b>, <b>%s</b>", "<b>%i</b> objects of types <b>%s</b>, <b>%s</b>", object_count),
} else if (n_terms == 3) {
// this is only used with 2 or more objects
ngettext("<b>%i</b> object of types <b>%s</b>, <b>%s</b>, <b>%s</b>", "<b>%i</b> objects of types <b>%s</b>, <b>%s</b>, <b>%s</b>", object_count),
object_count, (gchar *) terms->data, (gchar *) terms->next->data, (gchar *) terms->next->next->data);
} else {
// this is only used with 2 or more objects
ngettext("<b>%i</b> object of <b>%i</b> types", "<b>%i</b> objects of <b>%i</b> types", object_count),
}
if (objects_str)
}
}
}
}
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :