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/widgets/sp-color-notebook.cpp | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'src/widgets/sp-color-notebook.cpp') diff --git a/src/widgets/sp-color-notebook.cpp b/src/widgets/sp-color-notebook.cpp index 376cd8ee5..9766a9498 100644 --- a/src/widgets/sp-color-notebook.cpp +++ b/src/widgets/sp-color-notebook.cpp @@ -26,7 +26,7 @@ #include #include "../dialogs/dialog-events.h" -#include "../prefs-utils.h" +#include "../preferences.h" #include "sp-color-notebook.h" #include "spw-utilities.h" #include "sp-color-scales.h" @@ -97,19 +97,19 @@ sp_color_notebook_class_init (SPColorNotebookClass *klass) static void sp_color_notebook_switch_page(GtkNotebook *notebook, - GtkNotebookPage *page, - guint page_num, - SPColorNotebook *colorbook) + GtkNotebookPage *page, + guint page_num, + SPColorNotebook *colorbook) { - if ( colorbook ) - { + if ( colorbook ) + { ColorNotebook* nb = (ColorNotebook*)(SP_COLOR_SELECTOR(colorbook)->base); nb->switchPage( notebook, page, page_num ); - // remember the page we seitched to - prefs_set_int_attribute ("colorselector", "page", page_num); - - } + // remember the page we seitched to + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + prefs->setInt("/colorselector/page", page_num); + } } void ColorNotebook::switchPage(GtkNotebook*, @@ -274,7 +274,8 @@ void ColorNotebook::init() XPAD, YPAD); // restore the last active page - gtk_notebook_set_current_page (GTK_NOTEBOOK (_book), prefs_get_int_attribute ("colorselector", "page", 0)); + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + gtk_notebook_set_current_page (GTK_NOTEBOOK (_book), prefs->getInt("/colorselector/page", 0)); { gboolean found = FALSE; -- cgit v1.2.3