summaryrefslogtreecommitdiffstats
path: root/src/dialogs
diff options
context:
space:
mode:
authorKris De Gussem <kris.degussem@gmail.com>2012-01-19 19:45:06 +0000
committerKris <Kris.De.Gussem@hotmail.com>2012-01-19 19:45:06 +0000
commit28dcdf10f9fef7f4c7d7bf7664040aa3c26126fe (patch)
tree446c523f5a28f31ce6423086a293cdfff81f2b8f /src/dialogs
parentUpdate and documentation of sp-attribute-widget (diff)
downloadinkscape-28dcdf10f9fef7f4c7d7bf7664040aa3c26126fe.tar.gz
inkscape-28dcdf10f9fef7f4c7d7bf7664040aa3c26126fe.zip
Gtkmmification of object attributes dialog: image and link attributes now editable in dockable dialog (Bug #592323)
(bzr r10910)
Diffstat (limited to 'src/dialogs')
-rw-r--r--src/dialogs/CMakeLists.txt3
-rw-r--r--src/dialogs/Makefile_insert2
-rw-r--r--src/dialogs/object-attributes.cpp153
-rw-r--r--src/dialogs/object-attributes.h32
4 files changed, 0 insertions, 190 deletions
diff --git a/src/dialogs/CMakeLists.txt b/src/dialogs/CMakeLists.txt
index 1f2efecc3..a0a0c286b 100644
--- a/src/dialogs/CMakeLists.txt
+++ b/src/dialogs/CMakeLists.txt
@@ -4,7 +4,6 @@ set(dialogs_SRC
dialog-events.cpp
export.cpp
find.cpp
- object-attributes.cpp
spellcheck.cpp
text-edit.cpp
xml-tree.cpp
@@ -16,8 +15,6 @@ set(dialogs_SRC
dialog-events.h
export.h
find.h
- item-properties.h
- object-attributes.h
spellcheck.h
text-edit.h
xml-tree.h
diff --git a/src/dialogs/Makefile_insert b/src/dialogs/Makefile_insert
index c55b03775..342eba137 100644
--- a/src/dialogs/Makefile_insert
+++ b/src/dialogs/Makefile_insert
@@ -9,8 +9,6 @@ ink_common_sources += \
dialogs/export.h \
dialogs/find.cpp \
dialogs/find.h \
- dialogs/object-attributes.cpp \
- dialogs/object-attributes.h \
dialogs/spellcheck.cpp \
dialogs/spellcheck.h \
dialogs/text-edit.cpp \
diff --git a/src/dialogs/object-attributes.cpp b/src/dialogs/object-attributes.cpp
deleted file mode 100644
index 808e9a16a..000000000
--- a/src/dialogs/object-attributes.cpp
+++ /dev/null
@@ -1,153 +0,0 @@
-/**
- * @file
- * Generic properties editor.
- */
-/* Authors:
- * Lauris Kaplinski <lauris@kaplinski.com>
- * bulia byak <buliabyak@users.sf.net>
- * Kris De Gussem <Kris.DeGussem@gmail.com>
- *
- * Copyright (C) 1999-2011 Authors
- *
- * Released under GNU GPL, read the file 'COPYING' for more information
- */
-
-#include <glibmm/i18n.h>
-#include <string>
-#include <cstring>
-#include <stddef.h>
-#include <sigc++/connection.h>
-#include <sigc++/functors/ptr_fun.h>
-#include <sigc++/adaptors/bind.h>
-
-#include "helper/window.h"
-#include "macros.h"
-#include "sp-anchor.h"
-#include "widgets/sp-attribute-widget.h"
-#include "../xml/repr.h"
-
-struct SPAttrDesc {
- gchar const *label;
- gchar const *attribute;
-};
-
-static const SPAttrDesc anchor_desc[] = {
- { N_("Href:"), "xlink:href"},
- { N_("Target:"), "target"},
- { N_("Type:"), "xlink:type"},
- // TRANSLATORS: for info, see http://www.w3.org/TR/2000/CR-SVG-20000802/linking.html#AElementXLinkRoleAttribute
- // Identifies the type of the related resource with an absolute URI
- { N_("Role:"), "xlink:role"},
- // TRANSLATORS: for info, see http://www.w3.org/TR/2000/CR-SVG-20000802/linking.html#AElementXLinkArcRoleAttribute
- // For situations where the nature/role alone isn't enough, this offers an additional URI defining the purpose of the link.
- { N_("Arcrole:"), "xlink:arcrole"},
- // TRANSLATORS: for info, see http://www.w3.org/TR/2000/CR-SVG-20000802/linking.html#AElementXLinkTitleAttribute
- { N_("Title:"), "xlink:title"},
- { N_("Show:"), "xlink:show"},
- // TRANSLATORS: for info, see http://www.w3.org/TR/2000/CR-SVG-20000802/linking.html#AElementXLinkActuateAttribute
- { N_("Actuate:"), "xlink:actuate"},
- { NULL, NULL}
-};
-
-static const SPAttrDesc image_desc[] = {
- { N_("URL:"), "xlink:href"},
- { N_("X:"), "x"},
- { N_("Y:"), "y"},
- { N_("Width:"), "width"},
- { N_("Height:"), "height"},
- { 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 )
-{
- gtk_widget_destroy (widget);
-}
-
-
-
-static void window_destroyed( GtkObject *window, GtkObject */*object*/ )
-{
- sigc::connection *release_connection = (sigc::connection *)g_object_get_data(G_OBJECT(window), "release_connection");
- release_connection->disconnect();
- delete release_connection;
-}
-
-static void sp_object_attr_show_dialog ( SPObject *object,
- const SPAttrDesc *desc,
- const gchar *tag )
-{
- int len;
- Gtk::Window *window;
- SPAttributeTable* t;
- Glib::ustring title;
- std::vector<Glib::ustring> labels;
- std::vector<Glib::ustring> attrs;
-
- if (!strcmp (tag, "Link")) {
- title = _("Link Properties");
- } else if (!strcmp (tag, "Image")) {
- title = _("Image Properties");
- } else {
- title = Glib::ustring::compose(_("%1 Properties"), tag);
- }
-
- len = 0;
- while (desc[len].label)
- {
- labels.push_back(desc[len].label);
- attrs.push_back (desc[len].attribute);
- len += 1;
- }
-
- window = Inkscape::UI::window_new (title.c_str(), true);
- t = new SPAttributeTable (object, labels, attrs, (GtkWidget*)window->gobj());
-
- g_signal_connect (window->gobj(), "destroy",
- G_CALLBACK (window_destroyed), object );
-
- sigc::connection *release_connection = new sigc::connection();
- *release_connection = object->connectRelease(sigc::bind<1>(sigc::ptr_fun(&object_released), (GtkWidget*)window->gobj()));
- g_object_set_data((GObject*)window->gobj(), "release_connection", release_connection);
-
- t->show();
- window->show();
-} // end of sp_object_attr_show_dialog()
-
-
-void sp_object_attributes_dialog (SPObject *object, const gchar *tag)
-{
- g_return_if_fail (object != NULL);
- g_return_if_fail (SP_IS_OBJECT (object));
- g_return_if_fail (tag != NULL);
-
- if (!strcmp (tag, "Link")) {
- sp_object_attr_show_dialog (object, anchor_desc, tag);
- } else if (!strcmp (tag, "Image")) {
- Inkscape::XML::Node *ir = object->getRepr();
- 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()
-
-/*
- 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 :
diff --git a/src/dialogs/object-attributes.h b/src/dialogs/object-attributes.h
deleted file mode 100644
index 53b3ee37f..000000000
--- a/src/dialogs/object-attributes.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/** @file
- * @brief Generic object attribute editor
- */
-/* Author:
- * Lauris Kaplinski <lauris@ximian.com>
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Licensed under GNU GPL
- */
-
-#ifndef SEEN_DIALOGS_OBJECT_ATTRIBUTES_H
-#define SEEN_DIALOGS_OBJECT_ATTRIBUTES_H
-
-#include <glib.h>
-
-class SPObject;
-
-void sp_object_attributes_dialog (SPObject *object, const gchar *tag);
-
-#endif
-
-/*
- 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 :