summaryrefslogtreecommitdiffstats
path: root/src/widgets/sp-color-notebook.cpp
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2008-10-27 18:03:09 +0000
committerTed Gould <ted@canonical.com>2008-10-27 18:03:09 +0000
commit7dbe11bc23efa5f51a9b84e7d0f6dd16e63e0902 (patch)
tree7d3a2b95b84a03a19cb132cdf88bea0ab6dc4773 /src/widgets/sp-color-notebook.cpp
parentMerging from trunk (diff)
downloadinkscape-7dbe11bc23efa5f51a9b84e7d0f6dd16e63e0902.tar.gz
inkscape-7dbe11bc23efa5f51a9b84e7d0f6dd16e63e0902.zip
From trunk
(bzr r6885)
Diffstat (limited to 'src/widgets/sp-color-notebook.cpp')
-rw-r--r--src/widgets/sp-color-notebook.cpp23
1 files changed, 12 insertions, 11 deletions
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 <glibmm/i18n.h>
#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;