summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKris De Gussem <kris.degussem@gmail.com>2012-01-11 21:06:52 +0000
committerKris <Kris.De.Gussem@hotmail.com>2012-01-11 21:06:52 +0000
commit793f5a82fbda55a2f37d2f432a9ce37f1c801c1c (patch)
tree16603190d14046976505ce6acf5c449c687e0660 /src
parentPowerstroke: fix crashers (diff)
downloadinkscape-793f5a82fbda55a2f37d2f432a9ce37f1c801c1c.tar.gz
inkscape-793f5a82fbda55a2f37d2f432a9ce37f1c801c1c.zip
Dropped deprecated function sp_repr_get_int_attribute
(bzr r10871)
Diffstat (limited to 'src')
-rw-r--r--src/box3d-side.cpp2
-rw-r--r--src/box3d-side.h2
-rw-r--r--src/sp-object.cpp5
-rw-r--r--src/sp-object.h2
-rw-r--r--src/ui/CMakeLists.txt1
-rw-r--r--src/widgets/toolbox.cpp4
-rw-r--r--src/xml/repr-util.cpp28
-rw-r--r--src/xml/repr.h7
8 files changed, 11 insertions, 40 deletions
diff --git a/src/box3d-side.cpp b/src/box3d-side.cpp
index 0eb3b1c35..e67867d08 100644
--- a/src/box3d-side.cpp
+++ b/src/box3d-side.cpp
@@ -192,7 +192,7 @@ Box3DSide * Box3DSide::createBox3DSide(SPBox3D *box)
* Function which return the type attribute for Box3D.
* Acts as a replacement for directly accessing the XML Tree directly.
*/
-long long int Box3DSide::getFaceId()
+int Box3DSide::getFaceId()
{
return this->getIntAttribute("inkscape:box3dsidetype", -1);
}
diff --git a/src/box3d-side.h b/src/box3d-side.h
index a8d692b01..ed4972e29 100644
--- a/src/box3d-side.h
+++ b/src/box3d-side.h
@@ -32,7 +32,7 @@ struct Box3DSide : public SPPolygon {
Box3D::Axis dir1;
Box3D::Axis dir2;
Box3D::FrontOrRear front_or_rear;
- long long int getFaceId();
+ int getFaceId();
static Box3DSide * createBox3DSide(SPBox3D *box);
};
diff --git a/src/sp-object.cpp b/src/sp-object.cpp
index 826c271cf..efa11b4fd 100644
--- a/src/sp-object.cpp
+++ b/src/sp-object.cpp
@@ -743,9 +743,10 @@ void SPObject::invoke_build(SPDocument *document, Inkscape::XML::Node *repr, uns
sp_repr_add_listener(repr, &object_event_vector, this);
}
-long long int SPObject::getIntAttribute(char const *key, long long int def)
+int SPObject::getIntAttribute(char const *key, int def)
{
- return sp_repr_get_int_attribute(getRepr(),key,def);
+ sp_repr_get_int(getRepr(),key,&def);
+ return def;
}
unsigned SPObject::getPosition(){
diff --git a/src/sp-object.h b/src/sp-object.h
index 49e36d773..110deb262 100644
--- a/src/sp-object.h
+++ b/src/sp-object.h
@@ -684,7 +684,7 @@ public:
void invoke_build(SPDocument *document, Inkscape::XML::Node *repr, unsigned int cloned);
- long long int getIntAttribute(char const *key, long long int def);
+ int getIntAttribute(char const *key, int def);
unsigned getPosition();
diff --git a/src/ui/CMakeLists.txt b/src/ui/CMakeLists.txt
index 74802cab3..3727cc661 100644
--- a/src/ui/CMakeLists.txt
+++ b/src/ui/CMakeLists.txt
@@ -155,6 +155,7 @@ set(ui_SRC
dialog/livepatheffect-editor.h
dialog/memory.h
dialog/messages.h
+ dialog/object-properties.h
dialog/ocaldialogs.h
dialog/panel-dialog.h
dialog/print-colors-preview-dialog.h
diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp
index ba012f7dc..079ec4680 100644
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
@@ -2962,7 +2962,9 @@ static void star_tb_event_attr_changed(Inkscape::XML::Node *repr, gchar const *n
}
} else if (!strcmp(name, "sodipodi:sides")) {
adj = (GtkAdjustment*)g_object_get_data(G_OBJECT(tbl), "magnitude");
- gtk_adjustment_set_value(adj, sp_repr_get_int_attribute(repr, "sodipodi:sides", 0));
+ int sides = 0;
+ sp_repr_get_int(repr, "sodipodi:sides", &sides);
+ gtk_adjustment_set_value(adj, sides);
}
g_object_set_data(G_OBJECT(tbl), "freeze", GINT_TO_POINTER(FALSE));
diff --git a/src/xml/repr-util.cpp b/src/xml/repr-util.cpp
index 1e2449404..6899e77ee 100644
--- a/src/xml/repr-util.cpp
+++ b/src/xml/repr-util.cpp
@@ -312,34 +312,6 @@ gchar const *sp_xml_ns_prefix_uri(gchar const *prefix)
return uri;
}
-/*double sp_repr_get_double_attribute(Inkscape::XML::Node *repr, char const *key, double def)
-{
- char *result;
-
- g_return_val_if_fail(repr != NULL, def);
- g_return_val_if_fail(key != NULL, def);
-
- result = (char *) repr->attribute(key);
-
- if (result == NULL) return def;
-
- return g_ascii_strtod(result, NULL);
-}*/
-
-long long int sp_repr_get_int_attribute(Inkscape::XML::Node *repr, char const *key, long long int def)
-{
- char *result;
-
- g_return_val_if_fail(repr != NULL, def);
- g_return_val_if_fail(key != NULL, def);
-
- result = (char *) repr->attribute(key);
-
- if (result == NULL) return def;
-
- return atoll(result);
-}
-
/**
* Works for different-parent objects, so long as they have a common ancestor. Return value:
* 0 positions are equivalent
diff --git a/src/xml/repr.h b/src/xml/repr.h
index 3963e8efb..3eee45385 100644
--- a/src/xml/repr.h
+++ b/src/xml/repr.h
@@ -109,16 +109,11 @@ unsigned sp_repr_set_svg_double(Inkscape::XML::Node *repr, gchar const *key, dou
unsigned sp_repr_set_point(Inkscape::XML::Node *repr, gchar const *key, Geom::Point const & val);
unsigned sp_repr_get_point(Inkscape::XML::Node *repr, gchar const *key, Geom::Point *val);
-// \deprecated Use sp_repr_get_double to check for success
-//double sp_repr_get_double_attribute(Inkscape::XML::Node *repr, gchar const *key, double def);
-/// \deprecated Use sp_repr_get_int to check for success
-long long int sp_repr_get_int_attribute(Inkscape::XML::Node *repr, gchar const *key, long long int def);
-
int sp_repr_compare_position(Inkscape::XML::Node const *first, Inkscape::XML::Node const *second);
// Searching
/**
- * @brief Find an element node with the given name
+ * @brief Find an element node with the given name.
*
* This function searches the descendants of the specified node depth-first for
* the first XML node with the specified name.