X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fdialogs%2Fobject-attributes.cpp;h=e0c891ea1ad22c4aedf4f30eec1d88f610fc1238;hb=b632ab726ddcf5acea122f867fef25decfb6dbe9;hp=34f7e44638cf32d3b92bd840fbb26191f01322d2;hpb=8a539cb9d32e7082b6a2774815acc2eccc5e1694;p=inkscape.git diff --git a/src/dialogs/object-attributes.cpp b/src/dialogs/object-attributes.cpp index 34f7e4463..e0c891ea1 100644 --- a/src/dialogs/object-attributes.cpp +++ b/src/dialogs/object-attributes.cpp @@ -15,11 +15,16 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif + #include +#include +#include + #include "helper/window.h" #include "macros.h" #include "sp-anchor.h" #include "sp-attribute-widget.h" +#include "../xml/repr.h" #include #include @@ -57,9 +62,17 @@ static const SPAttrDesc image_desc[] = { { NULL, NULL} }; +static const SPAttrDesc image_nohref_desc[] = { + { N_("X:"), "x"}, + { N_("Y:"), "y"}, + { N_("Width:"), "width"}, + { N_("Height:"), "height"}, + { NULL, NULL} +}; + static void -object_released (SPObject *object, GtkWidget *widget) +object_released( SPObject */*object*/, GtkWidget *widget ) { gtk_widget_destroy (widget); } @@ -67,7 +80,7 @@ object_released (SPObject *object, GtkWidget *widget) static void -window_destroyed (GtkObject *window, GtkObject *object) +window_destroyed( GtkObject *window, GtkObject */*object*/ ) { sigc::connection *release_connection = (sigc::connection *)g_object_get_data(G_OBJECT(window), "release_connection"); release_connection->disconnect(); @@ -97,7 +110,7 @@ sp_object_attr_show_dialog ( SPObject *object, attrs[i] = desc[i].attribute; } - title = g_strdup_printf (_("%s attributes"), tag); + title = g_strdup_printf (_("%s Properties"), tag); w = sp_window_new (title, TRUE); g_free (title); @@ -128,7 +141,13 @@ sp_object_attributes_dialog (SPObject *object, const gchar *tag) if (!strcmp (tag, "Link")) { sp_object_attr_show_dialog (object, anchor_desc, tag); } else if (!strcmp (tag, "Image")) { - sp_object_attr_show_dialog (object, image_desc, tag); + Inkscape::XML::Node *ir = SP_OBJECT_REPR(object); + const gchar *href = ir->attribute("xlink:href"); + if ( (!href) || ((strncmp(href, "data:", 5) == 0)) ) { + sp_object_attr_show_dialog (object, image_nohref_desc, tag); + } else { + sp_object_attr_show_dialog (object, image_desc, tag); + } } } // end of sp_object_attributes_dialog()