summaryrefslogtreecommitdiff
path: root/src/PSEditor.cxx
diff options
context:
space:
mode:
authorJohannes Hofmann <johannes.hofmann@gmx.de>2004-07-18 18:49:43 +0000
committerJohannes Hofmann <johannes.hofmann@gmx.de>2004-07-18 18:49:43 +0000
commit5d8a189660934ba57e60860ccaa5205e4b982bbf (patch)
tree8c798c05a0b41291b6b2d975c74de6d1731bc0d9 /src/PSEditor.cxx
parent86d53fee2ecfad9a143bae0e5e17498207afecac (diff)
fixes
fixes
Diffstat (limited to 'src/PSEditor.cxx')
-rw-r--r--src/PSEditor.cxx23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/PSEditor.cxx b/src/PSEditor.cxx
index bc50b59..20e9de2 100644
--- a/src/PSEditor.cxx
+++ b/src/PSEditor.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: PSEditor.cxx,v 1.4 2004/07/09 22:51:39 hofmann Exp $"
+// "$Id: PSEditor.cxx,v 1.5 2004/07/18 20:49:43 hofmann Exp $"
//
// PSEditor routines.
//
@@ -29,6 +29,7 @@
PSEditor::PSEditor(int X,int Y,int W, int H) : PSEditWidget(X, Y, W, H) {
loaded = 0;
mod = 0;
+ ps_level = 1;
}
int PSEditor::handle(int event) {
@@ -137,7 +138,13 @@ int PSEditor::save(const char* savefile) {
FILE *fp = fdopen(tmp_fd, "r");
rewind(fp);
FILE *sfp = fopen(savefile, "w");
- PSWriter *pw = new PSLevel2Writer(this);
+ PSWriter *pw;
+
+ if (ps_level == 2) {
+ pw = new PSLevel2Writer(this);
+ } else {
+ pw = new PSLevel1Writer(this);
+ }
pw->write(fp, sfp);
@@ -147,3 +154,15 @@ int PSEditor::save(const char* savefile) {
mod = 0;
return 0;
}
+
+int PSEditor::get_ps_level() {
+ return ps_level;
+}
+
+void PSEditor::set_ps_level(int l) {
+ if (l == 2) {
+ ps_level = 2;
+ } else {
+ ps_level = 1;
+ }
+}