summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2008-05-10 19:38:34 +0000
committerjoncruz <joncruz@users.sourceforge.net>2008-05-10 19:38:34 +0000
commit5822ba65cc06960292e6752352e752b61b4482d6 (patch)
tree0f4035787939c93ad3286d10d55a3f59afa527b0 /src
parentclean Imagemagick detection and doesn't link anymore unused related libs (bug... (diff)
downloadinkscape-5822ba65cc06960292e6752352e752b61b4482d6.tar.gz
inkscape-5822ba65cc06960292e6752352e752b61b4482d6.zip
Do not show/edit image URL for data URIs.
Fixes Bug #227253. (bzr r5648)
Diffstat (limited to 'src')
-rw-r--r--src/dialogs/object-attributes.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/dialogs/object-attributes.cpp b/src/dialogs/object-attributes.cpp
index 475e8dce6..e0c891ea1 100644
--- a/src/dialogs/object-attributes.cpp
+++ b/src/dialogs/object-attributes.cpp
@@ -24,6 +24,7 @@
#include "macros.h"
#include "sp-anchor.h"
#include "sp-attribute-widget.h"
+#include "../xml/repr.h"
#include <sigc++/connection.h>
#include <sigc++/functors/ptr_fun.h>
@@ -61,6 +62,14 @@ 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 )
@@ -132,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()