diff options
| author | Jabiertxof <jtx@jtx> | 2017-04-28 19:42:36 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx> | 2017-04-28 19:42:36 +0000 |
| commit | 52054e24f8b98c07753588c726a1e777bad7245b (patch) | |
| tree | 69b39b96cef271d0bb9acbf2d75f7329bee6c2d9 /src/preferences.cpp | |
| parent | Update to trunk (diff) | |
| download | inkscape-52054e24f8b98c07753588c726a1e777bad7245b.tar.gz inkscape-52054e24f8b98c07753588c726a1e777bad7245b.zip | |
Reset
(bzr r15620.1.9)
Diffstat (limited to 'src/preferences.cpp')
| -rw-r--r-- | src/preferences.cpp | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/preferences.cpp b/src/preferences.cpp index 2849fe068..4d522a1d8 100644 --- a/src/preferences.cpp +++ b/src/preferences.cpp @@ -512,35 +512,6 @@ void Preferences::remove(Glib::ustring const &pref_path) Inkscape::XML::Node *node = _getNode(pref_path, false); if (node && node->parent()) { node->parent()->removeChild(node); - } else { //Handle to remove also attributes in path not only the container node - // verify path - g_assert( pref_path.at(0) == '/' ); - if (_prefs_doc == NULL){ - return; - } - node = _prefs_doc->root(); - Inkscape::XML::Node *child = NULL; - gchar **splits = g_strsplit(pref_path.c_str(), "/", 0); - if ( splits ) { - for (int part_i = 0; splits[part_i]; ++part_i) { - // skip empty path segments - if (!splits[part_i][0]) { - continue; - } - if (!node->firstChild()) { - node->setAttribute(splits[part_i], NULL); - g_strfreev(splits); - return; - } - for (child = node->firstChild(); child; child = child->next()) { - if (!strcmp(splits[part_i], child->attribute("id"))) { - break; - } - } - node = child; - } - } - g_strfreev(splits); } } |
