Logo Search packages:      
Sourcecode: inkscape version File versions

gchar* sp_item_description ( SPItem item  ) 

Returns a string suitable for status bar, formatted in pango markup language.

Must be freed by caller.

Definition at line 858 of file sp-item.cpp.

References SPItem::clip_ref, and SPItem::mask_ref.

Referenced by GrDragger::updateTip().

{
    g_assert(item != NULL);
    g_assert(SP_IS_ITEM(item));

    if (((SPItemClass *) G_OBJECT_GET_CLASS(item))->description) {
        gchar *s = ((SPItemClass *) G_OBJECT_GET_CLASS(item))->description(item);
        if (s && item->clip_ref->getObject()) {
            gchar *snew = g_strdup_printf (_("%s; <i>clipped</i>"), s);
            g_free (s);
            s = snew;
        }
        if (s && item->mask_ref->getObject()) {
            gchar *snew = g_strdup_printf (_("%s; <i>masked</i>"), s);
            g_free (s);
            s = snew;
        }
        return s;
    }

    g_assert_not_reached();
    return NULL;
}


Generated by  Doxygen 1.6.0   Back to index