selection-describer.cpp revision e09ce394efc7218b83f734e0962c4df789c55cb9
/*
* Inkscape::SelectionDescriber - shows messages describing selection
*
* Authors:
* MenTaLguY <mental@rydia.net>
* bulia byak <buliabyak@users.sf.net>
* Abhishek Sharma
*
* 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)
//TRANSLATORS: "Link" means internet link (anchor)
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"); }
if (type == SP_TYPE_USE)
// TRANSLATORS: "Clone" is a noun, type of object
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;
}
// Returns the number of filtered items in the list
{
int count=0;
}
return count;
}
namespace Inkscape {
SelectionDescriber::SelectionDescriber(Inkscape::Selection *selection, MessageStack *stack, char *when_selected, char *when_nothing)
{
}
{
delete _selection_changed_connection;
delete _selection_modified_connection;
}
{
}
if (!items) { // no items
} 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),
}
// indicate all, some, or none filtered
if (n_filt) {
} else {
}
_context.setF(Inkscape::NORMAL_MESSAGE, "%s%s%s. %s.", objects_str, filt_str, in_phrase, _when_selected);
if (objects_str) {
objects_str = 0;
}
if (filt_str) {
objects_str = 0;
}
}
}
}
}
/*
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:fileencoding=utf-8:textwidth=99 :