From 7dbe11bc23efa5f51a9b84e7d0f6dd16e63e0902 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 27 Oct 2008 13:03:09 -0500 Subject: From trunk (bzr r6885) --- src/ui/dialog/dialog.cpp | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'src/ui/dialog/dialog.cpp') diff --git a/src/ui/dialog/dialog.cpp b/src/ui/dialog/dialog.cpp index 1361b4977..2b39eb3c9 100644 --- a/src/ui/dialog/dialog.cpp +++ b/src/ui/dialog/dialog.cpp @@ -1,8 +1,7 @@ -/** - * \brief Base class for dialogs in Inkscape. This class provides certain - * common behaviors and styles wanted of all dialogs in the application. - * - * Authors: +/** @file + * @brief Base class for dialogs in Inkscape - implementation + */ +/* Authors: * Bryce W. Harrington * buliabyak@gmail.com * Johan Engelen @@ -30,7 +29,7 @@ #include "dialog-manager.h" #include "modifier-fns.h" #include "shortcuts.h" -#include "prefs-utils.h" +#include "preferences.h" #include "interface.h" #include "verbs.h" @@ -206,10 +205,11 @@ Dialog::read_geometry() { _user_hidden = false; - int x = prefs_get_int_attribute (_prefs_path, "x", -1000); - int y = prefs_get_int_attribute (_prefs_path, "y", -1000); - int w = prefs_get_int_attribute (_prefs_path, "w", 0); - int h = prefs_get_int_attribute (_prefs_path, "h", 0); + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + int x = prefs->getInt(_prefs_path + "/x", -1000); + int y = prefs->getInt(_prefs_path + "/y", -1000); + int w = prefs->getInt(_prefs_path + "/w", 0); + int h = prefs->getInt(_prefs_path + "/h", 0); // g_print ("read %d %d %d %d\n", x, y, w, h); @@ -245,10 +245,11 @@ Dialog::save_geometry() 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); } -- cgit v1.2.3