selection-describer.cpp revision 3b364ea648691ca05e04ccd839c21275f2528305
/*
* Inkscape::SelectionDescriber - shows messages describing selection
*
* Authors:
* MenTaLguY <mental@rydia.net>
* bulia byak <buliabyak@users.sf.net>
*
* Copyright (C) 2004 MenTaLguY
*
* 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 "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_TEXT)
{ return _("Text"); }
if (type == SP_TYPE_USE)
{ return _("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 {
} else {
fmt = _(" in layer <b>%s</b>");
} else {
fmt = _(" in layer <b><i>%s</i></b>");
}
}
_("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) {
} else if (n_terms == 1) {
objects_str = g_strdup_printf (_("<b>%i</b> objects of type <b>%s</b>"), object_count, (gchar *) terms->data);
} else if (n_terms == 2) {
objects_str = g_strdup_printf (_("<b>%i</b> objects of types <b>%s</b>, <b>%s</b>"), object_count, (gchar *) terms->data, (gchar *) terms->next->data);
} else if (n_terms == 3) {
objects_str = g_strdup_printf (_("<b>%i</b> objects of types <b>%s</b>, <b>%s</b>, <b>%s</b>"), object_count, (gchar *) terms->data, (gchar *) terms->next->data, (gchar *) terms->next->next->data);
} else {
}
} else {
ngettext("%s in <b>%i</b> layer. %s.",
"%s in <b>%i</b> layers. %s.",
selection->numberOfLayers()),
}
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 :