From: John Darrington Date: Thu, 16 Aug 2007 06:30:22 +0000 (+0000) Subject: Added a basic output viewer. X-Git-Tag: v0.6.0~304 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pspp-builds.git;a=commitdiff_plain;h=5de8102af0956488f48ae9bf4941e5867a0f1260 Added a basic output viewer. --- diff --git a/po/de.po b/po/de.po index 56cd0715..f34643a9 100644 --- a/po/de.po +++ b/po/de.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: PSPP 0.4.3\n" "Report-Msgid-Bugs-To: pspp-dev@gnu.org\n" -"POT-Creation-Date: 2007-08-15 08:33+0800\n" +"POT-Creation-Date: 2007-08-16 14:11+0800\n" "PO-Revision-Date: 2006-07-28 19:32+0800\n" "Last-Translator: John Darrington \n" "Language-Team: German \n" @@ -3078,11 +3078,11 @@ msgstr "" msgid "Multivariate GLM not yet supported" msgstr "" -#: src/language/stats/glm.q:268 src/language/stats/regression.q:1140 +#: src/language/stats/glm.q:268 src/language/stats/regression.q:1153 msgid "Dependent variable must be numeric." msgstr "" -#: src/language/stats/glm.q:343 src/language/stats/regression.q:1240 +#: src/language/stats/glm.q:343 src/language/stats/regression.q:1252 msgid "No valid data found. This command was skipped." msgstr "" @@ -3334,6 +3334,13 @@ msgstr "" msgid "Coefficient Correlations" msgstr "" +#: src/language/stats/regression.q:1031 +msgid "" +"The dependent variable is equal to the independent variable. The least " +"sequares line is therefore Y=X. Standard errors and related statistics may " +"be meaningless." +msgstr "" + #: src/language/stats/sort-cases.c:63 msgid "Buffer limit must be at least 2." msgstr "" @@ -3891,69 +3898,69 @@ msgstr "" msgid "unexpected end of line expecting string" msgstr "" -#: src/output/ascii.c:176 +#: src/output/ascii.c:179 #, c-format msgid "" "ascii: page excluding margins and headers must be at least 59 characters " "wide by 15 lines long, but as configured is only %d characters by %d lines" msgstr "" -#: src/output/ascii.c:291 +#: src/output/ascii.c:295 #, c-format msgid "" "ascii: bad index value for `box' key: syntax is box[INDEX], 0 <= INDEX < %d " "decimal, with INDEX expressed in base 4" msgstr "" -#: src/output/ascii.c:298 +#: src/output/ascii.c:302 #, c-format msgid "ascii: multiple values for %s" msgstr "" -#: src/output/ascii.c:306 +#: src/output/ascii.c:310 #, c-format msgid "ascii: unknown parameter `%s'" msgstr "" -#: src/output/ascii.c:317 +#: src/output/ascii.c:321 #, c-format msgid "ascii: positive integer required as `%s' value" msgstr "" -#: src/output/ascii.c:343 +#: src/output/ascii.c:347 msgid "ascii: `emphasis' value must be `bold', `underline', or `none'" msgstr "" -#: src/output/ascii.c:356 +#: src/output/ascii.c:360 #, c-format msgid "ascii: zero or positive integer required as `%s' value" msgstr "" -#: src/output/ascii.c:387 +#: src/output/ascii.c:391 #, c-format msgid "ascii: boolean value expected for `%s'" msgstr "" -#: src/output/ascii.c:416 src/output/html.c:188 +#: src/output/ascii.c:423 src/output/html.c:188 msgid "`chart-files' value must contain `#'" msgstr "" -#: src/output/ascii.c:447 +#: src/output/ascii.c:454 #, c-format msgid "ascii: opening output file \"%s\"" msgstr "" -#: src/output/ascii.c:514 +#: src/output/ascii.c:521 #, c-format msgid "ascii: bad line (%d,%d)-(%d,%d) out of (%d,%d)\n" msgstr "" -#: src/output/ascii.c:736 src/output/postscript.c:826 +#: src/output/ascii.c:743 src/output/postscript.c:826 #, c-format msgid "%s - Page %d" msgstr "" -#: src/output/ascii.c:789 +#: src/output/ascii.c:795 #, c-format msgid "ascii: closing output file \"%s\"" msgstr "" @@ -3981,141 +3988,141 @@ msgstr "" msgid "unknown configuration parameter `%s' for HTML device driver" msgstr "" -#: src/output/output.c:162 +#: src/output/output.c:161 #, c-format msgid "unknown output driver `%s'" msgstr "" -#: src/output/output.c:164 +#: src/output/output.c:163 #, c-format msgid "output driver `%s' referenced but never defined" msgstr "" -#: src/output/output.c:255 +#: src/output/output.c:254 msgid "using default output driver configuration" msgstr "" -#: src/output/output.c:284 +#: src/output/output.c:283 msgid "cannot find output initialization file (use `-vv' to view search path)" msgstr "" -#: src/output/output.c:292 +#: src/output/output.c:291 #, c-format msgid "cannot open \"%s\"" msgstr "" -#: src/output/output.c:304 +#: src/output/output.c:303 #, c-format msgid "reading \"%s\"" msgstr "" -#: src/output/output.c:326 +#: src/output/output.c:325 msgid "syntax error" msgstr "" -#: src/output/output.c:335 +#: src/output/output.c:334 #, c-format msgid "error closing \"%s\"" msgstr "" -#: src/output/output.c:343 +#: src/output/output.c:342 msgid "no active output drivers" msgstr "" -#: src/output/output.c:346 +#: src/output/output.c:345 msgid "error reading device definition file" msgstr "" -#: src/output/output.c:463 +#: src/output/output.c:462 #, c-format msgid "" "Driver classes:\n" "\t" msgstr "" -#: src/output/output.c:495 +#: src/output/output.c:494 #, c-format msgid "syntax error parsing options for \"%s\" driver" msgstr "" -#: src/output/output.c:511 +#: src/output/output.c:510 #, c-format msgid "" "reached end of options inside quoted string parsing options for \"%s\" driver" msgstr "" -#: src/output/output.c:581 +#: src/output/output.c:580 #, c-format msgid "syntax error in string constant parsing options for \"%s\" driver" msgstr "" -#: src/output/output.c:629 +#: src/output/output.c:628 #, c-format msgid "syntax error expecting `=' parsing options for driver \"%s\"" msgstr "" -#: src/output/output.c:680 +#: src/output/output.c:679 #, c-format msgid "unknown output driver class `%.*s'" msgstr "" -#: src/output/output.c:695 +#: src/output/output.c:694 #, c-format msgid "unknown device type `%.*s'" msgstr "" -#: src/output/output.c:712 +#: src/output/output.c:711 #, c-format msgid "cannot initialize output driver `%s' of class `%s'" msgstr "" -#: src/output/output.c:758 +#: src/output/output.c:757 msgid "driver definition line missing driver name or class name" msgstr "" -#: src/output/output.c:904 +#: src/output/output.c:903 #, c-format msgid "unit \"%s\" is unknown in dimension \"%s\"" msgstr "" -#: src/output/output.c:919 +#: src/output/output.c:918 #, c-format msgid "bad dimension \"%s\"" msgstr "" -#: src/output/output.c:945 +#: src/output/output.c:944 #, c-format msgid "`x' expected in paper size `%s'" msgstr "" -#: src/output/output.c:955 +#: src/output/output.c:954 #, c-format msgid "trailing garbage `%s' on paper size `%s'" msgstr "" -#: src/output/output.c:999 +#: src/output/output.c:998 msgid "paper size name cannot be empty" msgstr "" -#: src/output/output.c:1016 +#: src/output/output.c:1015 msgid "cannot find `papersize' configuration file" msgstr "" -#: src/output/output.c:1023 +#: src/output/output.c:1022 #, c-format msgid "error opening \"%s\"" msgstr "" -#: src/output/output.c:1034 +#: src/output/output.c:1033 #, c-format msgid "error reading \"%s\"" msgstr "" -#: src/output/output.c:1060 +#: src/output/output.c:1059 msgid "syntax error in paper size definition" msgstr "" -#: src/output/output.c:1072 +#: src/output/output.c:1071 msgid "error reading paper size definition file" msgstr "" @@ -4452,7 +4459,8 @@ msgstr "" msgid "Sort Descending" msgstr "" -#: src/ui/gui/data-editor.glade:18 src/ui/gui/syntax-editor.glade:39 +#: src/ui/gui/data-editor.glade:18 src/ui/gui/output-viewer.glade:22 +#: src/ui/gui/syntax-editor.glade:39 msgid "_File" msgstr "_Datei" @@ -4476,7 +4484,8 @@ msgstr "" msgid "Recently Used _Files" msgstr "" -#: src/ui/gui/data-editor.glade:132 src/ui/gui/syntax-editor.glade:143 +#: src/ui/gui/data-editor.glade:132 src/ui/gui/output-viewer.glade:55 +#: src/ui/gui/syntax-editor.glade:143 msgid "_Edit" msgstr "_Bearbeiten" @@ -4591,24 +4600,29 @@ msgstr "Variableansicht" msgid "Data File _Comments" msgstr "Datei Fehler" -#: src/ui/gui/data-editor.glade:456 src/ui/gui/syntax-editor.glade:233 +#: src/ui/gui/data-editor.glade:456 src/ui/gui/output-viewer.glade:78 +#: src/ui/gui/syntax-editor.glade:234 #, fuzzy msgid "_Windows" msgstr "_Datei" -#: src/ui/gui/data-editor.glade:463 src/ui/gui/syntax-editor.glade:242 +#: src/ui/gui/data-editor.glade:463 src/ui/gui/output-viewer.glade:88 +#: src/ui/gui/syntax-editor.glade:243 msgid "_Minimise All Windows" msgstr "" -#: src/ui/gui/data-editor.glade:474 src/ui/gui/syntax-editor.glade:254 +#: src/ui/gui/data-editor.glade:474 src/ui/gui/output-viewer.glade:99 +#: src/ui/gui/syntax-editor.glade:254 msgid "_Help" msgstr "_Hilfe" -#: src/ui/gui/data-editor.glade:481 src/ui/gui/syntax-editor.glade:263 +#: src/ui/gui/data-editor.glade:481 src/ui/gui/output-viewer.glade:106 +#: src/ui/gui/syntax-editor.glade:262 msgid "_Reference Manual" msgstr "" -#: src/ui/gui/data-editor.glade:488 src/ui/gui/syntax-editor.glade:271 +#: src/ui/gui/data-editor.glade:488 src/ui/gui/output-viewer.glade:113 +#: src/ui/gui/syntax-editor.glade:269 msgid "_About" msgstr "_Info" @@ -4797,6 +4811,18 @@ msgstr "Unpassend Wert für Variable" msgid "Incorrect range specification" msgstr "Falshe Spannweitebeschreibung" +#: src/ui/gui/output-viewer.glade:32 +msgid "gtk-save" +msgstr "" + +#: src/ui/gui/output-viewer.glade:41 +msgid "gtk-save-as" +msgstr "" + +#: src/ui/gui/output-viewer.glade:65 +msgid "gtk-copy" +msgstr "" + #: src/ui/gui/psppire-buttonbox.c:143 msgid "Buttons" msgstr "" @@ -5155,7 +5181,7 @@ msgstr "Schriftwahlung" msgid "Current Line" msgstr "" -#: src/ui/gui/syntax-editor.glade:221 +#: src/ui/gui/syntax-editor.glade:222 msgid "To End" msgstr "" @@ -5214,26 +5240,36 @@ msgstr "Messe" msgid "Weight cases by %s" msgstr "" -#: src/ui/gui/window-manager.c:138 +#: src/ui/gui/window-manager.c:142 #, fuzzy, c-format msgid "Syntax%d" msgstr "Speichern unter" -#: src/ui/gui/window-manager.c:139 src/ui/gui/window-manager.c:170 +#: src/ui/gui/window-manager.c:143 src/ui/gui/window-manager.c:178 #, fuzzy, c-format msgid "%s --- PSPP Syntax Editor" msgstr "PSPP Dateiaufbereiter" -#: src/ui/gui/window-manager.c:142 +#: src/ui/gui/window-manager.c:146 #, fuzzy, c-format msgid "Untitled%d" msgstr "Unbetitelt" -#: src/ui/gui/window-manager.c:143 src/ui/gui/window-manager.c:173 +#: src/ui/gui/window-manager.c:147 src/ui/gui/window-manager.c:181 #, fuzzy, c-format msgid "%s --- PSPP Data Editor" msgstr "PSPP Dateiaufbereiter" +#: src/ui/gui/window-manager.c:150 +#, c-format +msgid "Output%d" +msgstr "" + +#: src/ui/gui/window-manager.c:151 +#, fuzzy, c-format +msgid "%s --- PSPP Output" +msgstr "PSPP Dateiaufbereiter" + #: src/ui/terminal/command-line.c:219 #, c-format msgid "" diff --git a/po/pspp.pot b/po/pspp.pot index 417292cd..583a4bb2 100644 --- a/po/pspp.pot +++ b/po/pspp.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: pspp-dev@gnu.org\n" -"POT-Creation-Date: 2007-08-15 08:33+0800\n" +"POT-Creation-Date: 2007-08-16 14:11+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -3071,11 +3071,11 @@ msgstr "" msgid "Multivariate GLM not yet supported" msgstr "" -#: src/language/stats/glm.q:268 src/language/stats/regression.q:1140 +#: src/language/stats/glm.q:268 src/language/stats/regression.q:1153 msgid "Dependent variable must be numeric." msgstr "" -#: src/language/stats/glm.q:343 src/language/stats/regression.q:1240 +#: src/language/stats/glm.q:343 src/language/stats/regression.q:1252 msgid "No valid data found. This command was skipped." msgstr "" @@ -3327,6 +3327,13 @@ msgstr "" msgid "Coefficient Correlations" msgstr "" +#: src/language/stats/regression.q:1031 +msgid "" +"The dependent variable is equal to the independent variable. The least " +"sequares line is therefore Y=X. Standard errors and related statistics may " +"be meaningless." +msgstr "" + #: src/language/stats/sort-cases.c:63 msgid "Buffer limit must be at least 2." msgstr "" @@ -3884,69 +3891,69 @@ msgstr "" msgid "unexpected end of line expecting string" msgstr "" -#: src/output/ascii.c:176 +#: src/output/ascii.c:179 #, c-format msgid "" "ascii: page excluding margins and headers must be at least 59 characters " "wide by 15 lines long, but as configured is only %d characters by %d lines" msgstr "" -#: src/output/ascii.c:291 +#: src/output/ascii.c:295 #, c-format msgid "" "ascii: bad index value for `box' key: syntax is box[INDEX], 0 <= INDEX < %d " "decimal, with INDEX expressed in base 4" msgstr "" -#: src/output/ascii.c:298 +#: src/output/ascii.c:302 #, c-format msgid "ascii: multiple values for %s" msgstr "" -#: src/output/ascii.c:306 +#: src/output/ascii.c:310 #, c-format msgid "ascii: unknown parameter `%s'" msgstr "" -#: src/output/ascii.c:317 +#: src/output/ascii.c:321 #, c-format msgid "ascii: positive integer required as `%s' value" msgstr "" -#: src/output/ascii.c:343 +#: src/output/ascii.c:347 msgid "ascii: `emphasis' value must be `bold', `underline', or `none'" msgstr "" -#: src/output/ascii.c:356 +#: src/output/ascii.c:360 #, c-format msgid "ascii: zero or positive integer required as `%s' value" msgstr "" -#: src/output/ascii.c:387 +#: src/output/ascii.c:391 #, c-format msgid "ascii: boolean value expected for `%s'" msgstr "" -#: src/output/ascii.c:416 src/output/html.c:188 +#: src/output/ascii.c:423 src/output/html.c:188 msgid "`chart-files' value must contain `#'" msgstr "" -#: src/output/ascii.c:447 +#: src/output/ascii.c:454 #, c-format msgid "ascii: opening output file \"%s\"" msgstr "" -#: src/output/ascii.c:514 +#: src/output/ascii.c:521 #, c-format msgid "ascii: bad line (%d,%d)-(%d,%d) out of (%d,%d)\n" msgstr "" -#: src/output/ascii.c:736 src/output/postscript.c:826 +#: src/output/ascii.c:743 src/output/postscript.c:826 #, c-format msgid "%s - Page %d" msgstr "" -#: src/output/ascii.c:789 +#: src/output/ascii.c:795 #, c-format msgid "ascii: closing output file \"%s\"" msgstr "" @@ -3974,141 +3981,141 @@ msgstr "" msgid "unknown configuration parameter `%s' for HTML device driver" msgstr "" -#: src/output/output.c:162 +#: src/output/output.c:161 #, c-format msgid "unknown output driver `%s'" msgstr "" -#: src/output/output.c:164 +#: src/output/output.c:163 #, c-format msgid "output driver `%s' referenced but never defined" msgstr "" -#: src/output/output.c:255 +#: src/output/output.c:254 msgid "using default output driver configuration" msgstr "" -#: src/output/output.c:284 +#: src/output/output.c:283 msgid "cannot find output initialization file (use `-vv' to view search path)" msgstr "" -#: src/output/output.c:292 +#: src/output/output.c:291 #, c-format msgid "cannot open \"%s\"" msgstr "" -#: src/output/output.c:304 +#: src/output/output.c:303 #, c-format msgid "reading \"%s\"" msgstr "" -#: src/output/output.c:326 +#: src/output/output.c:325 msgid "syntax error" msgstr "" -#: src/output/output.c:335 +#: src/output/output.c:334 #, c-format msgid "error closing \"%s\"" msgstr "" -#: src/output/output.c:343 +#: src/output/output.c:342 msgid "no active output drivers" msgstr "" -#: src/output/output.c:346 +#: src/output/output.c:345 msgid "error reading device definition file" msgstr "" -#: src/output/output.c:463 +#: src/output/output.c:462 #, c-format msgid "" "Driver classes:\n" "\t" msgstr "" -#: src/output/output.c:495 +#: src/output/output.c:494 #, c-format msgid "syntax error parsing options for \"%s\" driver" msgstr "" -#: src/output/output.c:511 +#: src/output/output.c:510 #, c-format msgid "" "reached end of options inside quoted string parsing options for \"%s\" driver" msgstr "" -#: src/output/output.c:581 +#: src/output/output.c:580 #, c-format msgid "syntax error in string constant parsing options for \"%s\" driver" msgstr "" -#: src/output/output.c:629 +#: src/output/output.c:628 #, c-format msgid "syntax error expecting `=' parsing options for driver \"%s\"" msgstr "" -#: src/output/output.c:680 +#: src/output/output.c:679 #, c-format msgid "unknown output driver class `%.*s'" msgstr "" -#: src/output/output.c:695 +#: src/output/output.c:694 #, c-format msgid "unknown device type `%.*s'" msgstr "" -#: src/output/output.c:712 +#: src/output/output.c:711 #, c-format msgid "cannot initialize output driver `%s' of class `%s'" msgstr "" -#: src/output/output.c:758 +#: src/output/output.c:757 msgid "driver definition line missing driver name or class name" msgstr "" -#: src/output/output.c:904 +#: src/output/output.c:903 #, c-format msgid "unit \"%s\" is unknown in dimension \"%s\"" msgstr "" -#: src/output/output.c:919 +#: src/output/output.c:918 #, c-format msgid "bad dimension \"%s\"" msgstr "" -#: src/output/output.c:945 +#: src/output/output.c:944 #, c-format msgid "`x' expected in paper size `%s'" msgstr "" -#: src/output/output.c:955 +#: src/output/output.c:954 #, c-format msgid "trailing garbage `%s' on paper size `%s'" msgstr "" -#: src/output/output.c:999 +#: src/output/output.c:998 msgid "paper size name cannot be empty" msgstr "" -#: src/output/output.c:1016 +#: src/output/output.c:1015 msgid "cannot find `papersize' configuration file" msgstr "" -#: src/output/output.c:1023 +#: src/output/output.c:1022 #, c-format msgid "error opening \"%s\"" msgstr "" -#: src/output/output.c:1034 +#: src/output/output.c:1033 #, c-format msgid "error reading \"%s\"" msgstr "" -#: src/output/output.c:1060 +#: src/output/output.c:1059 msgid "syntax error in paper size definition" msgstr "" -#: src/output/output.c:1072 +#: src/output/output.c:1071 msgid "error reading paper size definition file" msgstr "" @@ -4431,7 +4438,8 @@ msgstr "" msgid "Sort Descending" msgstr "" -#: src/ui/gui/data-editor.glade:18 src/ui/gui/syntax-editor.glade:39 +#: src/ui/gui/data-editor.glade:18 src/ui/gui/output-viewer.glade:22 +#: src/ui/gui/syntax-editor.glade:39 msgid "_File" msgstr "" @@ -4454,7 +4462,8 @@ msgstr "" msgid "Recently Used _Files" msgstr "" -#: src/ui/gui/data-editor.glade:132 src/ui/gui/syntax-editor.glade:143 +#: src/ui/gui/data-editor.glade:132 src/ui/gui/output-viewer.glade:55 +#: src/ui/gui/syntax-editor.glade:143 msgid "_Edit" msgstr "" @@ -4559,23 +4568,28 @@ msgstr "" msgid "Data File _Comments" msgstr "" -#: src/ui/gui/data-editor.glade:456 src/ui/gui/syntax-editor.glade:233 +#: src/ui/gui/data-editor.glade:456 src/ui/gui/output-viewer.glade:78 +#: src/ui/gui/syntax-editor.glade:234 msgid "_Windows" msgstr "" -#: src/ui/gui/data-editor.glade:463 src/ui/gui/syntax-editor.glade:242 +#: src/ui/gui/data-editor.glade:463 src/ui/gui/output-viewer.glade:88 +#: src/ui/gui/syntax-editor.glade:243 msgid "_Minimise All Windows" msgstr "" -#: src/ui/gui/data-editor.glade:474 src/ui/gui/syntax-editor.glade:254 +#: src/ui/gui/data-editor.glade:474 src/ui/gui/output-viewer.glade:99 +#: src/ui/gui/syntax-editor.glade:254 msgid "_Help" msgstr "" -#: src/ui/gui/data-editor.glade:481 src/ui/gui/syntax-editor.glade:263 +#: src/ui/gui/data-editor.glade:481 src/ui/gui/output-viewer.glade:106 +#: src/ui/gui/syntax-editor.glade:262 msgid "_Reference Manual" msgstr "" -#: src/ui/gui/data-editor.glade:488 src/ui/gui/syntax-editor.glade:271 +#: src/ui/gui/data-editor.glade:488 src/ui/gui/output-viewer.glade:113 +#: src/ui/gui/syntax-editor.glade:269 msgid "_About" msgstr "" @@ -4763,6 +4777,18 @@ msgstr "" msgid "Incorrect range specification" msgstr "" +#: src/ui/gui/output-viewer.glade:32 +msgid "gtk-save" +msgstr "" + +#: src/ui/gui/output-viewer.glade:41 +msgid "gtk-save-as" +msgstr "" + +#: src/ui/gui/output-viewer.glade:65 +msgid "gtk-copy" +msgstr "" + #: src/ui/gui/psppire-buttonbox.c:143 msgid "Buttons" msgstr "" @@ -5101,7 +5127,7 @@ msgstr "" msgid "Current Line" msgstr "" -#: src/ui/gui/syntax-editor.glade:221 +#: src/ui/gui/syntax-editor.glade:222 msgid "To End" msgstr "" @@ -5159,26 +5185,36 @@ msgstr "" msgid "Weight cases by %s" msgstr "" -#: src/ui/gui/window-manager.c:138 +#: src/ui/gui/window-manager.c:142 #, c-format msgid "Syntax%d" msgstr "" -#: src/ui/gui/window-manager.c:139 src/ui/gui/window-manager.c:170 +#: src/ui/gui/window-manager.c:143 src/ui/gui/window-manager.c:178 #, c-format msgid "%s --- PSPP Syntax Editor" msgstr "" -#: src/ui/gui/window-manager.c:142 +#: src/ui/gui/window-manager.c:146 #, c-format msgid "Untitled%d" msgstr "" -#: src/ui/gui/window-manager.c:143 src/ui/gui/window-manager.c:173 +#: src/ui/gui/window-manager.c:147 src/ui/gui/window-manager.c:181 #, c-format msgid "%s --- PSPP Data Editor" msgstr "" +#: src/ui/gui/window-manager.c:150 +#, c-format +msgid "Output%d" +msgstr "" + +#: src/ui/gui/window-manager.c:151 +#, c-format +msgid "%s --- PSPP Output" +msgstr "" + #: src/ui/terminal/command-line.c:219 #, c-format msgid "" diff --git a/src/data/file-name.c b/src/data/file-name.c index cfe91932..f3b16817 100644 --- a/src/data/file-name.c +++ b/src/data/file-name.c @@ -252,7 +252,7 @@ safety_violation (const char *fn) FILE * fn_open (const char *fn, const char *mode) { - assert (mode[0] == 'r' || mode[0] == 'w'); + assert (mode[0] == 'r' || mode[0] == 'w' || mode[0] == 'a'); if (mode[0] == 'r' && (!strcmp (fn, "stdin") || !strcmp (fn, "-"))) return stdin; diff --git a/src/output/ChangeLog b/src/output/ChangeLog index 27f8ade3..7f78e2b5 100644 --- a/src/output/ChangeLog +++ b/src/output/ChangeLog @@ -1,3 +1,8 @@ +2007-08-16 Ben Pfaff + + * output.c output.h: export function outp_configure_driver_line. + * ascii.c: Added an "append" property. + 2007-08-12 Ben Pfaff Add support for charts to ASCII driver. Bug #16364. diff --git a/src/output/ascii.c b/src/output/ascii.c index 2278f809..2ac0401d 100644 --- a/src/output/ascii.c +++ b/src/output/ascii.c @@ -41,6 +41,7 @@ /* ASCII driver options: (defaults listed first) output-file="pspp.list" + append=no|yes If output-file exists, append to it? chart-files="pspp-#.png" Name used for charts. chart-type=png Format of charts (use "none" to disable). @@ -100,6 +101,7 @@ struct ascii_driver_ext struct pool *pool; /* User parameters. */ + bool append; /* Append if output-file already exists? */ bool headers; /* Print headers at top of page? */ bool paginate; /* Insert formfeeds? */ bool squeeze_blank_lines; /* Squeeze multiple blank lines into one? */ @@ -143,6 +145,7 @@ ascii_open_driver (struct outp_driver *this, struct substring options) this->horiz_line_width[i] = this->vert_line_width[i] = i != OUTP_L_NONE; this->ext = x = pool_create_container (struct ascii_driver_ext, pool); + x->append = false; x->headers = true; x->paginate = true; x->squeeze_blank_lines = false; @@ -255,6 +258,7 @@ static const struct outp_option option_tab[] = {"headers", boolean_arg, 0}, {"paginate", boolean_arg, 1}, {"squeeze", boolean_arg, 2}, + {"append", boolean_arg, 3}, {"emphasis", emphasis_arg, 0}, @@ -398,6 +402,9 @@ handle_option (struct outp_driver *this, const char *key, case 2: x->squeeze_blank_lines = setting; break; + case 3: + x->append = setting; + break; default: NOT_REACHED (); } @@ -441,7 +448,7 @@ ascii_open_page (struct outp_driver *this) if (x->file == NULL) { - x->file = fn_open (x->file_name, "w"); + x->file = fn_open (x->file_name, x->append ? "a" : "w"); if (x->file == NULL) { error (0, errno, _("ascii: opening output file \"%s\""), @@ -782,7 +789,6 @@ static void ascii_flush (struct outp_driver *this) { struct ascii_driver_ext *x = this->ext; - if (x->file != NULL) { if (fn_close (x->file_name, x->file) != 0) diff --git a/src/output/output.c b/src/output/output.c index 58750724..9527c46f 100644 --- a/src/output/output.c +++ b/src/output/output.c @@ -82,7 +82,6 @@ char *outp_subtitle; static int disabled_devices; static void destroy_driver (struct outp_driver *); -static void configure_driver_line (struct substring); static void configure_driver (const struct substring, const struct substring, const struct substring, const struct substring); @@ -318,7 +317,7 @@ outp_read_devices (void) struct outp_names *n = search_names (cp, ep); if (n) { - configure_driver_line (ds_ss (&line)); + outp_configure_driver_line (ds_ss (&line)); delete_name (n); } } @@ -733,8 +732,8 @@ configure_driver (struct substring driver_name, struct substring class_name, DRIVERNAME:CLASSNAME:DEVICETYPE:OPTIONS Adds a driver to outp_driver_list pursuant to the specification provided. */ -static void -configure_driver_line (struct substring line_) +void +outp_configure_driver_line (struct substring line_) { struct string line = DS_EMPTY_INITIALIZER; struct substring tokens[4]; diff --git a/src/output/output.h b/src/output/output.h index f7504bce..2338a0d8 100644 --- a/src/output/output.h +++ b/src/output/output.h @@ -14,8 +14,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#if !output_h -#define output_h 1 +#ifndef OUTPUT_OUTPUT_H +#define OUTPUT_OUTPUT_H 1 #include @@ -134,6 +134,7 @@ extern char *outp_subtitle; void outp_init (void); void outp_read_devices (void); +void outp_configure_driver_line (struct substring); void outp_done (void); void outp_configure_clear (void); @@ -164,4 +165,4 @@ int outp_string_width (struct outp_driver *, const char *, enum outp_font); /* Imported from som-frnt.c. */ void som_destroy_driver (struct outp_driver *); -#endif /* output.h */ +#endif /* output/output.h */ diff --git a/src/ui/gui/ChangeLog b/src/ui/gui/ChangeLog index d3aee623..3aec8fc0 100644 --- a/src/ui/gui/ChangeLog +++ b/src/ui/gui/ChangeLog @@ -1,3 +1,9 @@ +2007-08-16 John Darrington + + * output-viewer.c output-viewer.h output-viewer.glade (new files) + helper.c psppire.c syntax-editor.glade window-manager.c + window-manager.h : Added a basic output viewer window. + 2007-08-13 John Darrington * clipboard.c (clip_to_html clip_to_text): Fixed bug --- use the diff --git a/src/ui/gui/automake.mk b/src/ui/gui/automake.mk index df6f6d1e..b869a318 100644 --- a/src/ui/gui/automake.mk +++ b/src/ui/gui/automake.mk @@ -50,6 +50,7 @@ dist_src_ui_gui_psppire_DATA = \ $(top_srcdir)/src/ui/gui/psppire.glade \ $(top_srcdir)/src/ui/gui/syntax-editor.glade \ $(top_srcdir)/src/ui/gui/data-editor.glade \ + $(top_srcdir)/src/ui/gui/output-viewer.glade \ $(top_srcdir)/src/ui/gui/psppicon.png \ $(top_srcdir)/src/ui/gui/pspplogo.png \ $(top_srcdir)/src/ui/gui/icons/value-labels.png \ @@ -98,6 +99,8 @@ src_ui_gui_psppire_SOURCES = \ src/ui/gui/helper.h \ src/ui/gui/missing-val-dialog.c \ src/ui/gui/missing-val-dialog.h \ + src/ui/gui/output-viewer.c \ + src/ui/gui/output-viewer.h \ src/ui/gui/psppire-buttonbox.c \ src/ui/gui/psppire-buttonbox.h \ src/ui/gui/psppire-hbuttonbox.c \ diff --git a/src/ui/gui/helper.c b/src/ui/gui/helper.c index 98bd4179..6259965a 100644 --- a/src/ui/gui/helper.c +++ b/src/ui/gui/helper.c @@ -41,7 +41,7 @@ #include #include "psppire-data-store.h" #include - +#include "output-viewer.h" #include @@ -104,7 +104,7 @@ get_widget_assert (GladeXML *xml, const gchar *name) w = glade_xml_get_widget (xml, name); if ( !w ) - g_warning ("Widget \"%s\" could not be found\n", name); + g_critical ("Widget \"%s\" could not be found\n", name); return w; } @@ -204,6 +204,8 @@ execute_syntax (struct getl_interface *sss) proc_set_active_file_data (the_dataset, NULL); som_flush (); + + reload_the_viewer (); } diff --git a/src/ui/gui/output-viewer.c b/src/ui/gui/output-viewer.c new file mode 100644 index 00000000..d2f46bab --- /dev/null +++ b/src/ui/gui/output-viewer.c @@ -0,0 +1,191 @@ +/* PSPPIRE - a graphical user interface for PSPP. + Copyright (C) 2007 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include +#include +#include "window-manager.h" +#include "output-viewer.h" +#include "helper.h" +#include "about.h" + +#include +#include +#include + +#include +#include + +struct output_viewer +{ + struct editor_window parent; + GtkTextBuffer *buffer; /* The buffer which contains the text */ + GtkWidget *textview ; + FILE *fp; /* The file it's viewing */ +}; + + +static void +cancel_urgency (GtkWindow *window, gpointer data) +{ + gtk_window_set_urgency_hint (window, FALSE); +} + + +static struct output_viewer *the_output_viewer = NULL; + + +/* Callback for the "delete" action (clicking the x on the top right + hand corner of the window) */ +static gboolean +on_delete (GtkWidget *w, GdkEvent *event, gpointer user_data) +{ + struct output_viewer *ov = user_data; + + g_free (ov); + + the_output_viewer = NULL; + + unlink (OUTPUT_FILE_NAME); + + return FALSE; +} + + +/* + Create a new output viewer +*/ +struct output_viewer * +new_output_viewer (void) +{ + GladeXML *xml = XML_NEW ("output-viewer.glade"); + + struct output_viewer *ov ; + struct editor_window *e; + + connect_help (xml); + + ov = g_malloc (sizeof (*ov)); + + e = (struct editor_window *)ov; + + + e->window = GTK_WINDOW (get_widget_assert (xml, "output-viewer-window")); + ov->textview = get_widget_assert (xml, "output-viewer-textview"); + ov->buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (ov->textview)); + + g_signal_connect (e->window, + "focus-in-event", + G_CALLBACK (cancel_urgency), + NULL); + + { + /* Output uses ascii characters for tabular material. + So we need a monospaced font otherwise it'll look silly */ + PangoFontDescription *font_desc = + pango_font_description_from_string ("monospace"); + + gtk_widget_modify_font (ov->textview, font_desc); + pango_font_description_free (font_desc); + } + + ov->fp = NULL; + + g_signal_connect (get_widget_assert (xml,"help_about"), + "activate", + G_CALLBACK (about_new), + e->window); + + g_signal_connect (get_widget_assert (xml,"help_reference"), + "activate", + G_CALLBACK (reference_manual), + NULL); + + g_signal_connect (get_widget_assert (xml,"windows_minimise-all"), + "activate", + G_CALLBACK (minimise_all_windows), + NULL); + + g_object_unref (xml); + + + g_signal_connect (e->window, "delete-event", + G_CALLBACK (on_delete), ov); + + return ov; +} + + +void +reload_the_viewer (void) +{ + struct stat buf; + + /* If there is no output, then don't do anything */ + if (0 != stat (OUTPUT_FILE_NAME, &buf)) + return ; + + if ( NULL == the_output_viewer ) + { + the_output_viewer = + (struct output_viewer *) window_create (WINDOW_OUTPUT, NULL); + } + + reload_viewer (the_output_viewer); +} + + +void +reload_viewer (struct output_viewer *ov) +{ + GtkTextIter end_iter; + char line[OUTPUT_LINE_WIDTH]; + GtkTextMark *mark ; + gboolean chars_inserted = FALSE; + + + if ( ov->fp == NULL) + { + ov->fp = fopen (OUTPUT_FILE_NAME, "r"); + if ( ov->fp == NULL) + { + g_print ("Cannot open %s\n", OUTPUT_FILE_NAME); + return; + } + } + + gtk_text_buffer_get_end_iter (ov->buffer, &end_iter); + + mark = gtk_text_buffer_create_mark (ov->buffer, NULL, &end_iter, TRUE); + + /* Read in the next lot of text */ + while (fgets (line, OUTPUT_LINE_WIDTH, ov->fp) != NULL) + { + chars_inserted = TRUE; + gtk_text_buffer_insert (ov->buffer, &end_iter, line, -1); + } + + /* Scroll to where the start of this lot of text begins */ + gtk_text_view_scroll_to_mark (GTK_TEXT_VIEW (ov->textview), + mark, + 0.1, TRUE, 0.0, 0.0); + + + if ( chars_inserted ) + gtk_window_set_urgency_hint ( ((struct editor_window *)ov)->window, TRUE); +} + + + diff --git a/src/ui/gui/output-viewer.glade b/src/ui/gui/output-viewer.glade new file mode 100644 index 00000000..824d24b8 --- /dev/null +++ b/src/ui/gui/output-viewer.glade @@ -0,0 +1,150 @@ + + + + + + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 600 + 400 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + _File + True + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + gtk-save + True + True + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + gtk-save-as + True + True + + + + + + + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + _Edit + True + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + gtk-copy + True + True + + + + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + _Windows + True + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + _Minimise All Windows + True + + + + + + + + + True + _Help + True + + + + + True + _Reference Manual + True + + + + + True + _About + True + + + + + + + + + False + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + 5 + + + + + 1 + + + + + + diff --git a/src/ui/gui/output-viewer.h b/src/ui/gui/output-viewer.h new file mode 100644 index 00000000..0bc148bb --- /dev/null +++ b/src/ui/gui/output-viewer.h @@ -0,0 +1,41 @@ +/* PSPPIRE - a graphical user interface for PSPP. + Copyright (C) 2007 Free Software Foundation + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + + +#ifndef OUTPUT_VIEWER_H +#define OUTPUT_VIEWER_H + +#include + +#include "window-manager.h" + + +struct output_viewer * new_output_viewer (void); + +void reload_viewer (struct output_viewer *); + +void reload_the_viewer (void); + + +#define OUTPUT_FILE_NAME "psppire.txt" + +/* Make sure these two agree !! */ +#define OUTPUT_LINE_WIDTH 80 +#define OUTPUT_LINE_WIDTH_str "80" + + + +#endif diff --git a/src/ui/gui/psppire.c b/src/ui/gui/psppire.c index 7a9c91c4..0c60fbd2 100644 --- a/src/ui/gui/psppire.c +++ b/src/ui/gui/psppire.c @@ -22,10 +22,9 @@ #include "relocatable.h" #include "data-editor.h" - #include "psppire.h" - +#include #include #include #include @@ -48,6 +47,8 @@ #include "var-sheet.h" #include "message-dialog.h" +#include "output-viewer.h" + PsppireDataStore *the_data_store = 0; PsppireVarStore *the_var_store = 0; @@ -107,8 +108,13 @@ initialize (void) create_icon_factory (); - outp_read_devices (); - outp_enable_device (true, OUTP_DEV_SCREEN); + outp_configure_driver_line ( + ss_cstr ("gui:ascii:screen:squeeze=on headers=off top-margin=0 " + "bottom-margin=0 paginate=off length=50 " + "width=" OUTPUT_LINE_WIDTH_str " emphasis=none " + "output-file=\"" OUTPUT_FILE_NAME "\" append=yes")); + + unlink (OUTPUT_FILE_NAME); new_data_window (NULL, NULL); } diff --git a/src/ui/gui/syntax-editor.glade b/src/ui/gui/syntax-editor.glade index ff63d738..6fa42066 100644 --- a/src/ui/gui/syntax-editor.glade +++ b/src/ui/gui/syntax-editor.glade @@ -212,6 +212,7 @@ True Current Line True + @@ -247,7 +248,6 @@ - True @@ -256,7 +256,6 @@ - True @@ -264,7 +263,6 @@ True - True diff --git a/src/ui/gui/window-manager.c b/src/ui/gui/window-manager.c index cea00fed..91f44a59 100644 --- a/src/ui/gui/window-manager.c +++ b/src/ui/gui/window-manager.c @@ -22,6 +22,7 @@ #include #include "syntax-editor.h" #include "data-editor.h" +#include "output-viewer.h" #include #define _(msgid) gettext (msgid) @@ -88,6 +89,9 @@ window_create (enum window_type type, const gchar *name) case WINDOW_DATA: e = (struct editor_window *) new_data_editor (); break; + case WINDOW_OUTPUT: + e = (struct editor_window *) new_output_viewer (); + break; default: g_assert_not_reached (); }; @@ -142,6 +146,10 @@ set_window_name (struct editor_window *e, e->name = g_strdup_printf (_("Untitled%d"), next_window_id () ); title = g_strdup_printf (_("%s --- PSPP Data Editor"), e->name); break; + case WINDOW_OUTPUT: + e->name = g_strdup_printf (_("Output%d"), next_window_id () ); + title = g_strdup_printf (_("%s --- PSPP Output"), e->name); + break; default: g_assert_not_reached (); } diff --git a/src/ui/gui/window-manager.h b/src/ui/gui/window-manager.h index 3bff13e7..2bb2fd7c 100644 --- a/src/ui/gui/window-manager.h +++ b/src/ui/gui/window-manager.h @@ -23,7 +23,8 @@ enum window_type { WINDOW_DATA, - WINDOW_SYNTAX + WINDOW_SYNTAX, + WINDOW_OUTPUT };