diff options
Diffstat (limited to 'src/dialogs/item-properties.cpp')
| -rw-r--r-- | src/dialogs/item-properties.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/dialogs/item-properties.cpp b/src/dialogs/item-properties.cpp index 9b816436b..808775786 100644 --- a/src/dialogs/item-properties.cpp +++ b/src/dialogs/item-properties.cpp @@ -40,7 +40,7 @@ #include "../interface.h" #include "dialog-events.h" -#include "../prefs-utils.h" +#include "../preferences.h" #define MIN_ONSCREEN_DISTANCE 50 @@ -49,7 +49,7 @@ static win_data wd; // impossible original values to make sure they are read from prefs static gint x = -1000, y = -1000, w = 0, h = 0; -static gchar const *prefs_path = "dialogs.object"; +static Glib::ustring const prefs_path = "/dialogs/object/"; static void sp_item_widget_modify_selection (SPWidget *spw, Inkscape::Selection *selection, guint flags, GtkWidget *itemw); static void sp_item_widget_change_selection (SPWidget *spw, Inkscape::Selection *selection, GtkWidget *itemw); @@ -75,10 +75,11 @@ sp_item_dialog_delete( GtkObject */*object*/, GdkEvent */*event*/, gpointer /*da if (x<0) x=0; if (y<0) y=0; - prefs_set_int_attribute (prefs_path, "x", x); - prefs_set_int_attribute (prefs_path, "y", y); - prefs_set_int_attribute (prefs_path, "w", w); - prefs_set_int_attribute (prefs_path, "h", h); + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + prefs->setInt(prefs_path + "x", x); + prefs->setInt(prefs_path + "y", y); + prefs->setInt(prefs_path + "w", w); + prefs->setInt(prefs_path + "h", h); return FALSE; // which means, go ahead and destroy it @@ -479,16 +480,16 @@ sp_item_dialog (void) gchar title[500]; sp_ui_dialog_title_string (Inkscape::Verb::get(SP_VERB_DIALOG_ITEM), title); + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); dlg = sp_window_new (title, TRUE); if (x == -1000 || y == -1000) { - x = prefs_get_int_attribute (prefs_path, "x", -1000); - y = prefs_get_int_attribute (prefs_path, "y", -1000); + x = prefs->getInt(prefs_path + "x", -1000); + y = prefs->getInt(prefs_path + "y", -1000); } - if (w ==0 || h == 0) { - w = prefs_get_int_attribute (prefs_path, "w", 0); - h = prefs_get_int_attribute (prefs_path, "h", 0); + w = prefs->getInt(prefs_path + "w", 0); + h = prefs->getInt(prefs_path + "h", 0); } // if (x<0) x=0; |
