summaryrefslogtreecommitdiff
path: root/src/print_panel.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2010-03-27 08:16:56 +0000
committerManolo Gouy <Manolo>2010-03-27 08:16:56 +0000
commit506fa9d03492189c33f4a86189eda52bffe64b91 (patch)
tree41e193bb3d1e6badeb481bac1a9736298b8d6f54 /src/print_panel.cxx
parent8863c6d21fe4bb87e8870134b571e87d34fccaf7 (diff)
Minor improvement of printing preferences storage
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7344 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/print_panel.cxx')
-rw-r--r--src/print_panel.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/print_panel.cxx b/src/print_panel.cxx
index e5721a3c8..f8bfc2a1a 100644
--- a/src/print_panel.cxx
+++ b/src/print_panel.cxx
@@ -48,8 +48,7 @@
#include <FL/Fl_Preferences.H>
#include <FL/Fl_Int_Input.H>
-static Fl_Preferences *print_prefs;
-
+static Fl_Preferences print_prefs(Fl_Preferences::USER, "fltk.org", "printers");
static Fl_Double_Window *print_panel=(Fl_Double_Window *)0;
static Fl_Group *print_panel_controls=(Fl_Group *)0;
static Fl_Choice *print_choice=(Fl_Choice *)0;
@@ -230,13 +229,13 @@ static void cb_Save(Fl_Return_Button*, void*) {
const char *printer = (const char *)print_choice->menu()[print_choice->value()].user_data();
snprintf(name, sizeof(name), "%s/page_size", printer);
- print_prefs->set(name, print_page_size->value());
+ print_prefs.set(name, print_page_size->value());
snprintf(name, sizeof(name), "%s/output_mode", printer);
for (val = 0; val < 4; val ++) {
if (print_output_mode[val]->value()) break;
}
- print_prefs->set(name, val);
+ print_prefs.set(name, val);
}
static void cb_Cancel1(Fl_Button*, void*) {
@@ -586,11 +585,11 @@ void print_update_status() {
int val;
snprintf(name, sizeof(name), "%s/page_size", printer);
- print_prefs->get(name, val, 1);
+ print_prefs.get(name, val, 1);
print_page_size->value(val);
snprintf(name, sizeof(name), "%s/output_mode", printer);
- print_prefs->get(name, val, 0);
+ print_prefs.get(name, val, 0);
print_output_mode[val]->setonly();
}