r25027 by jghali - #16772: Fix various typos <luzpaz>
scribus-commit
scribus-commit at lists.scribus.net
Sat Mar 12 22:05:49 UTC 2022
Author: jghali
Date: Sat Mar 12 22:05:49 2022
New Revision: 25027
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=25027
Log:
#16772: Fix various typos <luzpaz>
Modified:
trunk/Scribus/resources/translations/CMakeLists.txt
trunk/Scribus/scribus/plugins/barcodegenerator/barcode.ps
trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp
trunk/Scribus/scribus/plugins/import/ps/import.prolog
trunk/Scribus/scribus/plugins/scripter/doc/ChangeLog
trunk/Scribus/scribus/plugins/scriptplugin/scripts/Ligatursatz.py
trunk/Scribus/scribus/plugins/scriptplugin_py2x/scripts/Ligatursatz.py
trunk/Scribus/scribus/plugins/scriptplugin_py2x/scripts/importcsv2table.py
trunk/Scribus/scribus/transaction.h
trunk/Scribus/scribus/ui/loremipsum.h
Modified: trunk/Scribus/resources/translations/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25027&path=/trunk/Scribus/resources/translations/CMakeLists.txt
==============================================================================
--- trunk/Scribus/resources/translations/CMakeLists.txt (original)
+++ trunk/Scribus/resources/translations/CMakeLists.txt Sat Mar 12 22:05:49 2022
@@ -16,7 +16,7 @@
get_filename_component(TS_FILENAME ${TS_FILEPATH} NAME)
string(REGEX MATCH "\\.([0-9a-zA-Z_]*)\\." LANGSTR ${TS_FILENAME})
string(REPLACE "." "" LANGSTR ${LANGSTR})
- #append ts_filename to get the file name, appent ts_filepath to get the full path
+ #append ts_filename to get the file name, append ts_filepath to get the full path
if(WANT_GUI_LANG)
foreach(WANTED_LANG ${WANT_GUI_LANG})
if(LANGSTR STREQUAL WANTED_LANG)
Modified: trunk/Scribus/scribus/plugins/barcodegenerator/barcode.ps
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25027&path=/trunk/Scribus/scribus/plugins/barcodegenerator/barcode.ps
==============================================================================
--- trunk/Scribus/scribus/plugins/barcodegenerator/barcode.ps (original)
+++ trunk/Scribus/scribus/plugins/barcodegenerator/barcode.ps Sat Mar 12 22:05:49 2022
@@ -6347,7 +6347,7 @@
} if
} if
- % Concatinate fields
+ % Concatenate fields
/binval [
linkage {1} {0} ifelse
method {48 sub} forall
@@ -17846,7 +17846,7 @@
% Recompose the secondary parity codewords
/secchk [ 0 1 scodes 1 sub { dup secochk exch get exch secechk exch get } for ] def
- % Concatinate the data into final codewords
+ % Concatenate the data into final codewords
/codewords [
pri aload pop
pri 10 rscodes aload pop
@@ -18358,7 +18358,7 @@
/cwf msgbits m bpcw add 1 sub 1 getinterval def % Last bit
cwb allzero {/cwf (1) def /m m 1 sub def} if % Flip last bit to avoid zeros
cwb allones {/cwf (0) def /m m 1 sub def} if % Flip last bit to avoid ones
- % Concatinate the bits
+ % Concatenate the bits
12 string dup 0 cwb putinterval
dup bpcw 1 sub cwf putinterval
0 bpcw getinterval
@@ -22473,7 +22473,7 @@
} if
} if
- % Concatinate fields
+ % Concatenate fields
/bits [
cdf aload pop
gpf aload pop
Modified: trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25027&path=/trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp (original)
+++ trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp Sat Mar 12 22:05:49 2022
@@ -607,7 +607,7 @@
{
m_unsupported.insert(m_token+')');
- //All these tags are unsupported in Scribus, so just ignoring them till we find close paranthesis
+ //All these tags are unsupported in Scribus, so just ignoring them till we find close parenthesis
while (lookAhead() != QChar(')'))
m_textIndex=m_textIndex+1;
m_textIndex=m_textIndex+1;//Ignore )
Modified: trunk/Scribus/scribus/plugins/import/ps/import.prolog
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25027&path=/trunk/Scribus/scribus/plugins/import/ps/import.prolog
==============================================================================
--- trunk/Scribus/scribus/plugins/import/ps/import.prolog (original)
+++ trunk/Scribus/scribus/plugins/import/ps/import.prolog Sat Mar 12 22:05:49 2022
@@ -254,7 +254,7 @@
exch pop
} bind def
-% Code for reading patters is currently commented out, as it
+% Code for reading patterns is currently commented out, as it
% doesn't seem to work correctly.
% /makepattern { % dict matrix makepattern patterndict
% %/makepattern =
Modified: trunk/Scribus/scribus/plugins/scripter/doc/ChangeLog
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25027&path=/trunk/Scribus/scribus/plugins/scripter/doc/ChangeLog
==============================================================================
--- trunk/Scribus/scribus/plugins/scripter/doc/ChangeLog (original)
+++ trunk/Scribus/scribus/plugins/scripter/doc/ChangeLog Sat Mar 12 22:05:49 2022
@@ -1,473 +1,473 @@
-2008-08-17 22:00 henning
-
- * python/sceditor/console.py: updated keywords and added ScripterNG
- to namespace
-
-2008-08-17 21:51 henning
-
- * api_page.cpp, api_page.h: added activePage.newText, newRectange,
- newEllipse, newImage, newLine
-
-2008-08-17 16:48 henning
-
- * api_document.cpp, api_document.h, api_page.cpp, api_page.h: added
- selection property to document and page
-
-2008-08-17 04:57 henning
-
- * api_window.cpp, doc/ChangeLog, doc/python_src.zip,
- scripterngimpl.cpp: updated documentation
- make use of COLLECTOR
-
-2008-08-17 04:43 henning
-
- * python/sceditor/assist.py, python/sceditor/dockwidget.py,
- python/sceditor/indenter.py, python/sceditor/widget.py: removed
- unused imports, small fixes
-
-2008-08-17 04:32 henning
-
- * python/mikro.py, python/sceditor/assist.py,
- python/sceditor/console.py, python/sceditor/dockwidget.py,
- python/sceditor/mainwindow.py, python/sceditor/widget.py:
- refactoring: expand star imports
- backspace only works beginning with column 4 in console
-
-2008-08-17 03:58 henning
-
- * python/sceditor/console.py, python/sceditor/highlighter.py,
- python/sceditor/mainwindow.py, python/sceditor/widget.py: added
- simple highlighting for QtScript and fixed a console bug
-
-2008-08-16 03:42 henning
-
- * api_dialogs.cpp, api_document.cpp, api_document.h, api_page.cpp,
- api_page.h, api_prefs.cpp, python/excepthook.py,
- python/init_scripterng.py, python/mikro.py, scripterng.cpp,
- scripterngimpl.cpp, scripterngimpl.h: added activeDocument.items
- which returns all Item objects of active
- document
- there are now #defines SCRIPTERNG for ScripterNGImpl::instance()
- and COLLECTOR for ScripterNGImpl::instance()->instance()
-
-2008-08-15 14:22 henning
-
- * doc/BUGS, doc/ChangeLog, doc/TODO: updated docs
-
-2008-08-15 05:25 henning
-
- * python/examples/objectexplorer.spy, python/mikro.py: add wrapper
- for dynamic property names
-
-2008-08-15 05:24 henning
-
- * python/sceditor/console.py, python/sceditor/mainwindow.py: enable
- redraw and update screen after each run
-
-2008-08-15 02:12 henning
-
- * python/autoload/fullscreen.spy: added "toggle fullscreen" menu
- entry - saves a lot of pixels
-
-2008-08-15 02:11 henning
-
- * api_document.cpp, api_page.cpp, api_page.h,
- python/cleanup_scripterng.py, python/examples/objectexplorer.spy,
- python/init_scripterng.py, python/mikro.py,
- python/sceditor/mainwindow.py, python/scripterng_runtime.py,
- scripterng.cpp, scripterngimpl.cpp, scripterngimpl.h: changed
- object/memory management to prevent segfaults on exit
- fixed focus problem in objectexplorer
- added ScripterNG.activeDocument.activePage.activeItem
- added app as alias for ScripterNG to type less
- added support for with-statement in mikro
-
-2008-08-14 23:28 henning
-
- * doc/AUTHORS, doc/ChangeLog, doc/LICENSE, doc/THANKS,
- doc/research.html, python/sceditor/THANKS: added more
- documentation and the typical gnu-style doc files
-
-2008-08-14 23:05 henning
-
- * python/excepthook.py, python/init_scripterng.py, python/mikro.py,
- python/permitdlg.py, python/scribusscript.py,
- python/scripterng_hooks.py, python/scripterng_runtime.py:
- recfacoring: expand star-imports
-
-2008-08-14 03:37 henning
-
- * apidocs.py, dynapidocs.spy, new_api.py,
- python/cleanup_scripterng.py, python/examples/objectexplorer.spy,
- python/excepthook.py, python/init_scripterng.py, python/mikro.py,
- python/permitdlg.py, python/scribusscript.py,
- python/scripterng_hooks.py, python/scripterng_runtime.py,
- python/update_allowed_scripts.py: added more docs to Python files
- and cleaned up the code
-
-2008-08-13 20:57 henning
-
- * api_ScripterNG.activeDocument.activePage.items.api,
- api_ScripterNG.dialogs.layers.api,
- api_ScripterNG.dialogs.mainWindow.api,
- api_ScripterNG.dialogs.nodes.api,
- api_ScripterNG.dialogs.outline.api,
- api_ScripterNG.dialogs.pages.api,
- api_ScripterNG.dialogs.properties.api,
- api_ScripterNG.dialogs.scrapbook.api, api_dialogs.h,
- api_document.cpp, api_document.h, api_page.cpp, api_prefs.cpp,
- api_prefs.h, api_window.cpp, api_window.h, apidocs.py,
- doc/INSTALL, doc/reference.html, doc/reference_dialogs.html,
- doc/reference_items.html, dynapidocs.spy, scripterng.cpp,
- scripterngimpl.cpp, scripterngimpl.h: lots of documentation,
- fixes and a more complete preferences module
- generate simple reference documentation from source and at
- runtime by introspection
-
-2008-08-13 20:54 henning
-
- * python/autoload/runfile.spy, python/autoload/sceditor.spy,
- python/examples/objectexplorer.spy, python/init_scripterng.py,
- python/mikro.py, python/permitdlg.py, python/scripterng_hooks.py,
- python/scripterng_runtime.py: Changes because of changes in
- preferences API
- using ScipterNG.dialogs.mainWindow instead of
- scripterng_hooks.mainWindow
-
-2008-08-13 04:59 henning
-
- * api_page.cpp, python/mikro.py: re-enabled garbage collection
-
-2008-08-13 04:53 henning
-
- * api_document.cpp, api_document.h, api_item.cpp, api_item.h,
- api_page.cpp, api_page.h, python/examples/objectexplorer.spy,
- python/mikro.py, scripterngimpl.cpp, scripterngimpl.h: added
- support for QVariantList in mikro
- fixed objectexplorer
- added activePage
- and activePage.items with access to all item properties
-
-2008-08-13 01:21 henning
-
- * CMakeLists.txt, new_api.py, scripterngimpl.cpp, scripterngimpl.h:
- fixed typo
-
-2008-08-13 01:19 henning
-
- * new_api.py: stop if file already exists
-
-2008-08-13 00:54 henning
-
- * api_dialogs.cpp, api_dialogs.h: forgot to add new files
-
-2008-08-13 00:47 henning
-
- * CMakeLists.txt, api_document.cpp, api_prefs.cpp,
- python/autoload/runfile.spy, python/mikro.py,
- python/sceditor/console.py, python/scripterng_runtime.py,
- scripterngimpl.cpp, scripterngimpl.h: fixed memory management -
- requires now that every ScripterNG created object is a child
- object ob Scripter NG or Scripter->collector()
- added some debugging output
- ScripterNG.Preferences is now ScripterNG.preferences
- ScritperNG.dialogs gives access to every major dialog
-
-2008-08-12 23:04 henning
-
- * python/examples/objectexplorer.spy: added an object explorer
-
-2008-08-12 05:24 henning
-
- * doc/TUTORIAL: added some words about QtScript and Python
-
-2008-08-12 03:53 henning
-
- * python/autoload/help.spy: moved help into help-menu
-
-2008-08-12 02:50 henning
-
- * CMakeLists.txt, api_document.cpp, api_document.h, api_window.cpp,
- python/autoload/runfile.spy, python/examples,
- python/examples/test.spy, python/examples/test.sqts,
- python/mikro.py, python/scripterng_runtime.py, scripterng.cpp,
- scripterngimpl.cpp, scripterngimpl.h: Large commit:
- garbage collecting C++ objects created from QtScript :-)
- added aboutdata
- realized that cleanup is not called by the plugin-manager
- added examples
- added inspection of dynamic properties
- throw exceptions from Python functions into QtScript
-
-2008-08-12 00:44 henning
-
- * doc/TODO: update
-
-2008-08-12 00:36 henning
-
- * api_document.cpp, api_document.h, api_window.cpp, api_window.h,
- python/scribusscript.py: redraw is now a property to force a
- redraw use
- ScripterNG.activeWindow.update()
-
- margins is now a real property object with "sub-propertys"
-
-2008-08-10 19:08 henning
-
- * CMakeLists.txt: forgot to update CMakeLists for new dockwidget
-
-2008-08-10 17:48 henning
-
- * python/sceditor/arrow-down.png, python/sceditor/arrow-right.png,
- python/sceditor/dockwidget.py: added better dockwidget - will be
- used later
-
-2008-08-10 17:21 henning
-
- * python/init_scripterng.py, python/permitdlg.py,
- python/permitdlg.ui, python/permitdlg_ui.py,
- python/pyqtscript.py, python/safe_eval.py,
- python/scribusscript.py, python/scripterng_runtime.py,
- python/update_allowed_scripts.py: added source checker to warn
- about unsafe scripts
-
-2008-08-10 03:47 henning
-
- * python/autoload/help.spy: added help menu item which opens
- scripterng.blogspot.com (for now..)
-
-2008-08-10 03:46 henning
-
- * python/autoload/runfile.spy: fixed bug
-
-2008-08-10 03:44 henning
-
- * CMakeLists.txt, scripterngimpl.cpp, scripterngimpl.h: added
- api_window dependency
-
-2008-08-10 03:43 henning
-
- * doc/TUTORIAL, new_api.py: corrected scaffolind
-
-2008-08-10 03:42 henning
-
- * python/mikro.py: added more convert-functions for QVariant
-
-2008-08-10 03:41 henning
-
- * api_document.cpp, api_document.h, api_example.cpp,
- api_window.cpp, api_window.h: added activeWindow
- (scroll,zoom,redraw), activeDocument.margins
-
-2008-08-10 01:02 henning
-
- * doc/POSTPONED: added some reasons for changed plans
-
-2008-08-09 23:59 henning
-
- * doc/TUTORIAL, python/init_scripterng.py: I forgot to mention in
- the last commit:
- Now scripts can defined in separate files (documented here in
- doc/TUTORIAL) and will be loaded at start-up.
-
-2008-08-09 23:03 henning
-
- * CMakeLists.txt, new_api.py, python/autoload,
- python/autoload/about.spy, python/autoload/runfile.spy,
- python/autoload/sceditor.spy, python/excepthook.py,
- python/init_scripterng.py, python/scribusscript.py,
- python/scriptdescriptor.py, python/scripterng_hooks.py,
- python/scripterng_runtime.py: error-dialog is now an
- extension-dialog and can be used on demand
-
-2008-08-09 23:01 henning
-
- * python/sceditor/console.py: release stdout after close
-
-2008-08-09 23:00 henning
-
- * BUGS, INSTALL, README, TODO: moved documentation to doc/
-
-2008-08-09 22:59 henning
-
- * doc, doc/BUGS, doc/INSTALL, doc/README, doc/TODO: moved
- documentation
-
-2008-08-08 13:56 henning
-
- * python/scriptdescriptor.py: prepare integration for script
- descriptors
-
-2008-08-08 02:56 henning
-
- * TODO: updated TODO
-
-2008-08-08 02:46 henning
-
- * BUGS, TODO: Some more documentation related to development.
-
-2008-08-07 01:31 henning
-
- * python/init_scripterng.py, python/mikro.py: Make sure that
- QObjects are deleted when corresponding Python objects are
- deleted
-
-2008-08-07 01:01 henning
-
- * api_document.cpp, python/mikro.py, scripterngimpl.cpp,
- scripterngimpl.h: Added property support for QObjects and
- QWidgets
- Now activeDocument is created on the fly via the property-getter.
- This needs some kind of caching.
-
-2008-08-06 15:17 henning
-
- * CMakeLists.txt, api_example.cpp, api_example.h, api_prefs.cpp,
- api_prefs.h, pythonize.cpp, pythonize.h, scripterng.cpp,
- scripterng.h, scripterngimpl.cpp, scripterngimpl.h: Added
- copyright header and fixed indention with astyle
- Forgot to add api_document to CMakeLists
-
-2008-08-06 15:15 henning
-
- * api_document.cpp, api_document.h: Started to change API to be
- more like InDesign object model
-
-2008-08-06 14:31 henning
-
- * INSTALL, api_example.cpp, api_example.h, api_prefs.cpp,
- api_prefs.h, new_api.py: added api template and simple
- scaffolding script
-
-2008-08-06 01:48 henning
-
- * python/scriptdescriptor.py: parser for script descriptor files
-
-2008-06-19 22:55 henning
-
- * scripterngimpl.cpp: forgot to raise error if openDocument fails
-
-2008-06-19 22:55 henning
-
- * python/init_scripterng.py: make mikro.Error class available as
- ScripterNG.Error
-
-2008-06-19 22:06 henning
-
- * api_prefs.cpp, scripterng.cpp, scripterngimpl.cpp,
- scripterngimpl.h: added checkDocument, haveDocument,
- closeDocument, openDocument and setModified
-
-2008-06-19 21:52 henning
-
- * python/init_scripterng.py, python/sceditor/__init__.py,
- python/sceditor/mainwindow.py: menu and mainwindow are now
- attributes of ScripterNG. EditorMainWindow is now a child of
- ScribusMainWindow
-
-2008-06-19 21:50 henning
-
- * python/mikro.py: added exception support. Use RAISE from
- scripterimpl.h
-
-2008-06-19 00:46 henning
-
- * python/sceditor/console.py, python/sceditor/highlighter.py,
- python/sceditor/widget.py: Ported source editor from QTextEdit to
- QPlainTextEdit which is faster.
- Disabled empty_format in highlighter.
-
-2008-06-16 23:05 henning
-
- * python/mikro.py: improved speed of child object access
-
-2008-06-16 01:43 henning
-
- * api_prefs.cpp, python/init_scripterng.py, scripterngimpl.cpp:
- ScripterNG(impl) is now top-level object (from the scripting
- point of view),
- changed parent for ApiPrefs.
- Removed not working reload menu item and added a run script menu
- item
-
-2008-06-14 23:41 henning
-
- * python/excepthook.py, python/excepthook.ui,
- python/excepthook_ui.py, python/init_scripterng.py,
- scripterngimpl.cpp: Added a nice looking error handler if a
- script raises an exception
-
-2008-06-14 05:11 henning
-
- * CMakeLists.txt, python/sandbox.py, python/sceditor,
- python/sceditor/__init__.py, python/sceditor/assist.py,
- python/sceditor/console.py, python/sceditor/highlighter.py,
- python/sceditor/indenter.py, python/sceditor/mainwindow.py,
- python/sceditor/mainwindow.ui, python/sceditor/mainwindow_ui.py,
- python/sceditor/rope.zip, python/sceditor/widget.py: Removed
- sandbox.
- Added a small editor/console for Python and (partly) QtScript
-
-2008-06-14 05:08 henning
-
- * scripterngimpl.cpp: removed a warning
-
-2008-06-14 05:08 henning
-
- * python/init_scripterng.py: cleaner init
-
-2008-06-14 05:07 henning
-
- * python/mikro.py: Better introspection support for ScripterNG
- object (via __members__)
-
-2008-06-12 15:17 henning
-
- * python/mikro.py: Moved mikro test code into separate file
-
-2008-06-12 02:16 henning
-
- * python/mikro.py: Fixed connect and added disconnect
-
-2008-06-12 02:15 henning
-
- * python/init_scripterng.py: Check for PyQt4 and report problems on
- console
-
-2008-06-12 01:52 henning
-
- * python/mikro.py: Named child objects are now available as
- attributes
-
-2008-06-12 00:56 henning
-
- * python/init_scripterng.py, python/mikro.py: First use of PyQt 4.4
- features.
- C++ methods can now be called from Python scripts inside
- ScripterNG.
- This is an important step to make Scribus functionality available
- to
- Python.
- It's not that much code but it required heavy thinking about a
- efficient implementation.
-
-2008-06-10 22:58 henning
-
- * python/init_scripterng.py, python/sandbox.py,
- python/scripterng_hooks.py, scripterngimpl.cpp: Now the plug-in
- can hook into menus and a menu entry in the ScripterNG
- menu with an example editor/shell was added.
-
-2008-06-10 00:13 henning
-
- * README, scripterngimpl.cpp: added README document and unified
- some indentions
-
-2008-06-09 22:21 henning
-
- * ., CMakeLists.txt, INSTALL, api_prefs.cpp, api_prefs.h, python,
- python/cleanup_scripterng.py, python/init_scripterng.py,
- python/mikro.py, python/pyqtscript.py, pythonize.cpp,
- pythonize.h, scripterng.cpp, scripterng.h, scripterngimpl.cpp,
- scripterngimpl.h: first updated version in new repository
-
+2008-08-17 22:00 henning
+
+ * python/sceditor/console.py: updated keywords and added ScripterNG
+ to namespace
+
+2008-08-17 21:51 henning
+
+ * api_page.cpp, api_page.h: added activePage.newText, newRectange,
+ newEllipse, newImage, newLine
+
+2008-08-17 16:48 henning
+
+ * api_document.cpp, api_document.h, api_page.cpp, api_page.h: added
+ selection property to document and page
+
+2008-08-17 04:57 henning
+
+ * api_window.cpp, doc/ChangeLog, doc/python_src.zip,
+ scripterngimpl.cpp: updated documentation
+ make use of COLLECTOR
+
+2008-08-17 04:43 henning
+
+ * python/sceditor/assist.py, python/sceditor/dockwidget.py,
+ python/sceditor/indenter.py, python/sceditor/widget.py: removed
+ unused imports, small fixes
+
+2008-08-17 04:32 henning
+
+ * python/mikro.py, python/sceditor/assist.py,
+ python/sceditor/console.py, python/sceditor/dockwidget.py,
+ python/sceditor/mainwindow.py, python/sceditor/widget.py:
+ refactoring: expand star imports
+ backspace only works beginning with column 4 in console
+
+2008-08-17 03:58 henning
+
+ * python/sceditor/console.py, python/sceditor/highlighter.py,
+ python/sceditor/mainwindow.py, python/sceditor/widget.py: added
+ simple highlighting for QtScript and fixed a console bug
+
+2008-08-16 03:42 henning
+
+ * api_dialogs.cpp, api_document.cpp, api_document.h, api_page.cpp,
+ api_page.h, api_prefs.cpp, python/excepthook.py,
+ python/init_scripterng.py, python/mikro.py, scripterng.cpp,
+ scripterngimpl.cpp, scripterngimpl.h: added activeDocument.items
+ which returns all Item objects of active
+ document
+ there are now #defines SCRIPTERNG for ScripterNGImpl::instance()
+ and COLLECTOR for ScripterNGImpl::instance()->instance()
+
+2008-08-15 14:22 henning
+
+ * doc/BUGS, doc/ChangeLog, doc/TODO: updated docs
+
+2008-08-15 05:25 henning
+
+ * python/examples/objectexplorer.spy, python/mikro.py: add wrapper
+ for dynamic property names
+
+2008-08-15 05:24 henning
+
+ * python/sceditor/console.py, python/sceditor/mainwindow.py: enable
+ redraw and update screen after each run
+
+2008-08-15 02:12 henning
+
+ * python/autoload/fullscreen.spy: added "toggle fullscreen" menu
+ entry - saves a lot of pixels
+
+2008-08-15 02:11 henning
+
+ * api_document.cpp, api_page.cpp, api_page.h,
+ python/cleanup_scripterng.py, python/examples/objectexplorer.spy,
+ python/init_scripterng.py, python/mikro.py,
+ python/sceditor/mainwindow.py, python/scripterng_runtime.py,
+ scripterng.cpp, scripterngimpl.cpp, scripterngimpl.h: changed
+ object/memory management to prevent segfaults on exit
+ fixed focus problem in objectexplorer
+ added ScripterNG.activeDocument.activePage.activeItem
+ added app as alias for ScripterNG to type less
+ added support for with-statement in mikro
+
+2008-08-14 23:28 henning
+
+ * doc/AUTHORS, doc/ChangeLog, doc/LICENSE, doc/THANKS,
+ doc/research.html, python/sceditor/THANKS: added more
+ documentation and the typical gnu-style doc files
+
+2008-08-14 23:05 henning
+
+ * python/excepthook.py, python/init_scripterng.py, python/mikro.py,
+ python/permitdlg.py, python/scribusscript.py,
+ python/scripterng_hooks.py, python/scripterng_runtime.py:
+ recfacoring: expand star-imports
+
+2008-08-14 03:37 henning
+
+ * apidocs.py, dynapidocs.spy, new_api.py,
+ python/cleanup_scripterng.py, python/examples/objectexplorer.spy,
+ python/excepthook.py, python/init_scripterng.py, python/mikro.py,
+ python/permitdlg.py, python/scribusscript.py,
+ python/scripterng_hooks.py, python/scripterng_runtime.py,
+ python/update_allowed_scripts.py: added more docs to Python files
+ and cleaned up the code
+
+2008-08-13 20:57 henning
+
+ * api_ScripterNG.activeDocument.activePage.items.api,
+ api_ScripterNG.dialogs.layers.api,
+ api_ScripterNG.dialogs.mainWindow.api,
+ api_ScripterNG.dialogs.nodes.api,
+ api_ScripterNG.dialogs.outline.api,
+ api_ScripterNG.dialogs.pages.api,
+ api_ScripterNG.dialogs.properties.api,
+ api_ScripterNG.dialogs.scrapbook.api, api_dialogs.h,
+ api_document.cpp, api_document.h, api_page.cpp, api_prefs.cpp,
+ api_prefs.h, api_window.cpp, api_window.h, apidocs.py,
+ doc/INSTALL, doc/reference.html, doc/reference_dialogs.html,
+ doc/reference_items.html, dynapidocs.spy, scripterng.cpp,
+ scripterngimpl.cpp, scripterngimpl.h: lots of documentation,
+ fixes and a more complete preferences module
+ generate simple reference documentation from source and at
+ runtime by introspection
+
+2008-08-13 20:54 henning
+
+ * python/autoload/runfile.spy, python/autoload/sceditor.spy,
+ python/examples/objectexplorer.spy, python/init_scripterng.py,
+ python/mikro.py, python/permitdlg.py, python/scripterng_hooks.py,
+ python/scripterng_runtime.py: Changes because of changes in
+ preferences API
+ using ScipterNG.dialogs.mainWindow instead of
+ scripterng_hooks.mainWindow
+
+2008-08-13 04:59 henning
+
+ * api_page.cpp, python/mikro.py: re-enabled garbage collection
+
+2008-08-13 04:53 henning
+
+ * api_document.cpp, api_document.h, api_item.cpp, api_item.h,
+ api_page.cpp, api_page.h, python/examples/objectexplorer.spy,
+ python/mikro.py, scripterngimpl.cpp, scripterngimpl.h: added
+ support for QVariantList in mikro
+ fixed objectexplorer
+ added activePage
+ and activePage.items with access to all item properties
+
+2008-08-13 01:21 henning
+
+ * CMakeLists.txt, new_api.py, scripterngimpl.cpp, scripterngimpl.h:
+ fixed typo
+
+2008-08-13 01:19 henning
+
+ * new_api.py: stop if file already exists
+
+2008-08-13 00:54 henning
+
+ * api_dialogs.cpp, api_dialogs.h: forgot to add new files
+
+2008-08-13 00:47 henning
+
+ * CMakeLists.txt, api_document.cpp, api_prefs.cpp,
+ python/autoload/runfile.spy, python/mikro.py,
+ python/sceditor/console.py, python/scripterng_runtime.py,
+ scripterngimpl.cpp, scripterngimpl.h: fixed memory management -
+ requires now that every ScripterNG created object is a child
+ object ob Scripter NG or Scripter->collector()
+ added some debugging output
+ ScripterNG.Preferences is now ScripterNG.preferences
+ ScritperNG.dialogs gives access to every major dialog
+
+2008-08-12 23:04 henning
+
+ * python/examples/objectexplorer.spy: added an object explorer
+
+2008-08-12 05:24 henning
+
+ * doc/TUTORIAL: added some words about QtScript and Python
+
+2008-08-12 03:53 henning
+
+ * python/autoload/help.spy: moved help into help-menu
+
+2008-08-12 02:50 henning
+
+ * CMakeLists.txt, api_document.cpp, api_document.h, api_window.cpp,
+ python/autoload/runfile.spy, python/examples,
+ python/examples/test.spy, python/examples/test.sqts,
+ python/mikro.py, python/scripterng_runtime.py, scripterng.cpp,
+ scripterngimpl.cpp, scripterngimpl.h: Large commit:
+ garbage collecting C++ objects created from QtScript :-)
+ added aboutdata
+ realized that cleanup is not called by the plugin-manager
+ added examples
+ added inspection of dynamic properties
+ throw exceptions from Python functions into QtScript
+
+2008-08-12 00:44 henning
+
+ * doc/TODO: update
+
+2008-08-12 00:36 henning
+
+ * api_document.cpp, api_document.h, api_window.cpp, api_window.h,
+ python/scribusscript.py: redraw is now a property to force a
+ redraw use
+ ScripterNG.activeWindow.update()
+
+ margins is now a real property object with "sub-propertys"
+
+2008-08-10 19:08 henning
+
+ * CMakeLists.txt: forgot to update CMakeLists for new dockwidget
+
+2008-08-10 17:48 henning
+
+ * python/sceditor/arrow-down.png, python/sceditor/arrow-right.png,
+ python/sceditor/dockwidget.py: added better dockwidget - will be
+ used later
+
+2008-08-10 17:21 henning
+
+ * python/init_scripterng.py, python/permitdlg.py,
+ python/permitdlg.ui, python/permitdlg_ui.py,
+ python/pyqtscript.py, python/safe_eval.py,
+ python/scribusscript.py, python/scripterng_runtime.py,
+ python/update_allowed_scripts.py: added source checker to warn
+ about unsafe scripts
+
+2008-08-10 03:47 henning
+
+ * python/autoload/help.spy: added help menu item which opens
+ scripterng.blogspot.com (for now..)
+
+2008-08-10 03:46 henning
+
+ * python/autoload/runfile.spy: fixed bug
+
+2008-08-10 03:44 henning
+
+ * CMakeLists.txt, scripterngimpl.cpp, scripterngimpl.h: added
+ api_window dependency
+
+2008-08-10 03:43 henning
+
+ * doc/TUTORIAL, new_api.py: corrected scaffolind
+
+2008-08-10 03:42 henning
+
+ * python/mikro.py: added more convert-functions for QVariant
+
+2008-08-10 03:41 henning
+
+ * api_document.cpp, api_document.h, api_example.cpp,
+ api_window.cpp, api_window.h: added activeWindow
+ (scroll,zoom,redraw), activeDocument.margins
+
+2008-08-10 01:02 henning
+
+ * doc/POSTPONED: added some reasons for changed plans
+
+2008-08-09 23:59 henning
+
+ * doc/TUTORIAL, python/init_scripterng.py: I forgot to mention in
+ the last commit:
+ Now scripts can defined in separate files (documented here in
+ doc/TUTORIAL) and will be loaded at start-up.
+
+2008-08-09 23:03 henning
+
+ * CMakeLists.txt, new_api.py, python/autoload,
+ python/autoload/about.spy, python/autoload/runfile.spy,
+ python/autoload/sceditor.spy, python/excepthook.py,
+ python/init_scripterng.py, python/scribusscript.py,
+ python/scriptdescriptor.py, python/scripterng_hooks.py,
+ python/scripterng_runtime.py: error-dialog is now an
+ extension-dialog and can be used on demand
+
+2008-08-09 23:01 henning
+
+ * python/sceditor/console.py: release stdout after close
+
+2008-08-09 23:00 henning
+
+ * BUGS, INSTALL, README, TODO: moved documentation to doc/
+
+2008-08-09 22:59 henning
+
+ * doc, doc/BUGS, doc/INSTALL, doc/README, doc/TODO: moved
+ documentation
+
+2008-08-08 13:56 henning
+
+ * python/scriptdescriptor.py: prepare integration for script
+ descriptors
+
+2008-08-08 02:56 henning
+
+ * TODO: updated TODO
+
+2008-08-08 02:46 henning
+
+ * BUGS, TODO: Some more documentation related to development.
+
+2008-08-07 01:31 henning
+
+ * python/init_scripterng.py, python/mikro.py: Make sure that
+ QObjects are deleted when corresponding Python objects are
+ deleted
+
+2008-08-07 01:01 henning
+
+ * api_document.cpp, python/mikro.py, scripterngimpl.cpp,
+ scripterngimpl.h: Added property support for QObjects and
+ QWidgets
+ Now activeDocument is created on the fly via the property-getter.
+ This needs some kind of caching.
+
+2008-08-06 15:17 henning
+
+ * CMakeLists.txt, api_example.cpp, api_example.h, api_prefs.cpp,
+ api_prefs.h, pythonize.cpp, pythonize.h, scripterng.cpp,
+ scripterng.h, scripterngimpl.cpp, scripterngimpl.h: Added
+ copyright header and fixed indentation with astyle
+ Forgot to add api_document to CMakeLists
+
+2008-08-06 15:15 henning
+
+ * api_document.cpp, api_document.h: Started to change API to be
+ more like InDesign object model
+
+2008-08-06 14:31 henning
+
+ * INSTALL, api_example.cpp, api_example.h, api_prefs.cpp,
+ api_prefs.h, new_api.py: added api template and simple
+ scaffolding script
+
+2008-08-06 01:48 henning
+
+ * python/scriptdescriptor.py: parser for script descriptor files
+
+2008-06-19 22:55 henning
+
+ * scripterngimpl.cpp: forgot to raise error if openDocument fails
+
+2008-06-19 22:55 henning
+
+ * python/init_scripterng.py: make mikro.Error class available as
+ ScripterNG.Error
+
+2008-06-19 22:06 henning
+
+ * api_prefs.cpp, scripterng.cpp, scripterngimpl.cpp,
+ scripterngimpl.h: added checkDocument, haveDocument,
+ closeDocument, openDocument and setModified
+
+2008-06-19 21:52 henning
+
+ * python/init_scripterng.py, python/sceditor/__init__.py,
+ python/sceditor/mainwindow.py: menu and mainwindow are now
+ attributes of ScripterNG. EditorMainWindow is now a child of
+ ScribusMainWindow
+
+2008-06-19 21:50 henning
+
+ * python/mikro.py: added exception support. Use RAISE from
+ scripterimpl.h
+
+2008-06-19 00:46 henning
+
+ * python/sceditor/console.py, python/sceditor/highlighter.py,
+ python/sceditor/widget.py: Ported source editor from QTextEdit to
+ QPlainTextEdit which is faster.
+ Disabled empty_format in highlighter.
+
+2008-06-16 23:05 henning
+
+ * python/mikro.py: improved speed of child object access
+
+2008-06-16 01:43 henning
+
+ * api_prefs.cpp, python/init_scripterng.py, scripterngimpl.cpp:
+ ScripterNG(impl) is now top-level object (from the scripting
+ point of view),
+ changed parent for ApiPrefs.
+ Removed not working reload menu item and added a run script menu
+ item
+
+2008-06-14 23:41 henning
+
+ * python/excepthook.py, python/excepthook.ui,
+ python/excepthook_ui.py, python/init_scripterng.py,
+ scripterngimpl.cpp: Added a nice looking error handler if a
+ script raises an exception
+
+2008-06-14 05:11 henning
+
+ * CMakeLists.txt, python/sandbox.py, python/sceditor,
+ python/sceditor/__init__.py, python/sceditor/assist.py,
+ python/sceditor/console.py, python/sceditor/highlighter.py,
+ python/sceditor/indenter.py, python/sceditor/mainwindow.py,
+ python/sceditor/mainwindow.ui, python/sceditor/mainwindow_ui.py,
+ python/sceditor/rope.zip, python/sceditor/widget.py: Removed
+ sandbox.
+ Added a small editor/console for Python and (partly) QtScript
+
+2008-06-14 05:08 henning
+
+ * scripterngimpl.cpp: removed a warning
+
+2008-06-14 05:08 henning
+
+ * python/init_scripterng.py: cleaner init
+
+2008-06-14 05:07 henning
+
+ * python/mikro.py: Better introspection support for ScripterNG
+ object (via __members__)
+
+2008-06-12 15:17 henning
+
+ * python/mikro.py: Moved mikro test code into separate file
+
+2008-06-12 02:16 henning
+
+ * python/mikro.py: Fixed connect and added disconnect
+
+2008-06-12 02:15 henning
+
+ * python/init_scripterng.py: Check for PyQt4 and report problems on
+ console
+
+2008-06-12 01:52 henning
+
+ * python/mikro.py: Named child objects are now available as
+ attributes
+
+2008-06-12 00:56 henning
+
+ * python/init_scripterng.py, python/mikro.py: First use of PyQt 4.4
+ features.
+ C++ methods can now be called from Python scripts inside
+ ScripterNG.
+ This is an important step to make Scribus functionality available
+ to
+ Python.
+ It's not that much code but it required heavy thinking about a
+ efficient implementation.
+
+2008-06-10 22:58 henning
+
+ * python/init_scripterng.py, python/sandbox.py,
+ python/scripterng_hooks.py, scripterngimpl.cpp: Now the plug-in
+ can hook into menus and a menu entry in the ScripterNG
+ menu with an example editor/shell was added.
+
+2008-06-10 00:13 henning
+
+ * README, scripterngimpl.cpp: added README document and unified
+ some indentations
+
+2008-06-09 22:21 henning
+
+ * ., CMakeLists.txt, INSTALL, api_prefs.cpp, api_prefs.h, python,
+ python/cleanup_scripterng.py, python/init_scripterng.py,
+ python/mikro.py, python/pyqtscript.py, pythonize.cpp,
+ pythonize.h, scripterng.cpp, scripterng.h, scripterngimpl.cpp,
+ scripterngimpl.h: first updated version in new repository
+
Modified: trunk/Scribus/scribus/plugins/scriptplugin/scripts/Ligatursatz.py
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25027&path=/trunk/Scribus/scribus/plugins/scriptplugin/scripts/Ligatursatz.py
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/scripts/Ligatursatz.py (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/scripts/Ligatursatz.py Sat Mar 12 22:05:49 2022
@@ -263,7 +263,7 @@
uppercase Ạto lowercase Ã. I think the
only relevant application of this âone-to-many
mappingâ for the german language is the sharp
- s. As the patter is generated for
+ s. As the pattern is generated for
both (normal german with à and swiss
german without à but with ss), this âone-to-many
foldingâ is not necessary. A simple
Modified: trunk/Scribus/scribus/plugins/scriptplugin_py2x/scripts/Ligatursatz.py
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25027&path=/trunk/Scribus/scribus/plugins/scriptplugin_py2x/scripts/Ligatursatz.py
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin_py2x/scripts/Ligatursatz.py (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin_py2x/scripts/Ligatursatz.py Sat Mar 12 22:05:49 2022
@@ -263,7 +263,7 @@
uppercase Ạto lowercase Ã. I think the
only relevant application of this âone-to-many
mappingâ for the german language is the sharp
- s. As the patter is generated for
+ s. As the pattern is generated for
both (normal german with à and swiss
german without à but with ss), this âone-to-many
foldingâ is not necessary. A simple
Modified: trunk/Scribus/scribus/plugins/scriptplugin_py2x/scripts/importcsv2table.py
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25027&path=/trunk/Scribus/scribus/plugins/scriptplugin_py2x/scripts/importcsv2table.py
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin_py2x/scripts/importcsv2table.py (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin_py2x/scripts/importcsv2table.py Sat Mar 12 22:05:49 2022
@@ -1,217 +1,217 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-"""
-ABOUT THIS SCRIPT:
-
-Import CSV data files as tables into Scribus
-
-1. Create any frame of any size on your page but positioned
-where you want the table to be located (upper left corner)
-
-2. Make sure it is selected
-
-3. Execute this script:
-
-You will be prompted first for the width of the left column in mm,
-then the right column in mm, then height of all cells, and finally
-for a csv filename
-
-4. The data from the csv file will be imported and a table of
-textboxes will be drawn on the page.
-
-LIMITATIONS:
-
-1. You are limited to two-column CSV data in your file.
-
-2. In Scribus versions 1.3.5svn, when the script ends, you cannot
-adjust text, colors, and line features for a group, whereas in 1.3.3.x,
-all of these can be done without ungrouping.
-
-HINTS:
-
-Postgresql:
-You can easily create a CSV file with a Postgresql database. From Postgresql,
-toggle unaligned output with the '\a' switch, then activate a comma as
-a separator with '\f ,' (without apostrophes). Send output to a file
-with '\o myfile.csv', then query your database.
-
-Sqlite3:
-You can use "sqlite3 -csv" in the command line or ".mode csv" in sqlite's
-interactive shell.
-
-############################
-
-LICENSE:
-
-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 2 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, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-Author: Sebastian Stetter
-
-Modifications: Gregory Pittman
-
-please report bugs to: scribusscript at sebastianstetter.de
-"""
-
-from __future__ import division
-import sys
-
-try:
- # Please do not use 'from scribus import *' . If you must use a 'from import',
- # Do so _after_ the 'import scribus' and only import the names you need, such
- # as commonly used constants.
- import scribus
-except ImportError,err:
- print "This Python script is written for the Scribus scripting interface."
- print "It can only be run from within Scribus."
- sys.exit(1)
-
-#########################
-# YOUR IMPORTS GO HERE #
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+"""
+ABOUT THIS SCRIPT:
+
+Import CSV data files as tables into Scribus
+
+1. Create any frame of any size on your page but positioned
+where you want the table to be located (upper left corner)
+
+2. Make sure it is selected
+
+3. Execute this script:
+
+You will be prompted first for the width of the left column in mm,
+then the right column in mm, then height of all cells, and finally
+for a csv filename
+
+4. The data from the csv file will be imported and a table of
+textboxes will be drawn on the page.
+
+LIMITATIONS:
+
+1. You are limited to two-column CSV data in your file.
+
+2. In Scribus versions 1.3.5svn, when the script ends, you cannot
+adjust text, colors, and line features for a group, whereas in 1.3.3.x,
+all of these can be done without ungrouping.
+
+HINTS:
+
+Postgresql:
+You can easily create a CSV file with a Postgresql database. From Postgresql,
+toggle unaligned output with the '\a' switch, then activate a comma as
+a separator with '\f ,' (without apostrophes). Send output to a file
+with '\o myfile.csv', then query your database.
+
+Sqlite3:
+You can use "sqlite3 -csv" in the command line or ".mode csv" in sqlite's
+interactive shell.
+
+############################
+
+LICENSE:
+
+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 2 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, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+Author: Sebastian Stetter
+
+Modifications: Gregory Pittman
+
+please report bugs to: scribusscript at sebastianstetter.de
+"""
+
+from __future__ import division
+import sys
+
+try:
+ # Please do not use 'from scribus import *' . If you must use a 'from import',
+ # Do so _after_ the 'import scribus' and only import the names you need, such
+ # as commonly used constants.
+ import scribus
+except ImportError,err:
+ print "This Python script is written for the Scribus scripting interface."
+ print "It can only be run from within Scribus."
+ sys.exit(1)
+
+#########################
+# YOUR IMPORTS GO HERE #
#########################
import csv
-#get information about the area where the bale should be drawn
+#get information about the area where the table should be drawn
def getPosition():
if scribus.selectionCount() == 1:
areaname = scribus.getSelectedObject()
- position= scribus.getPosition(areaname)
- vpos = position[1]
- hpos = position[0]
- scribus.deleteObject(areaname)
- return vpos, hpos
-
- else:
- scribus.messageBox("csv2table", "please select ONE Object to mark the drawing area for the table")
- sys.exit()
-
-#get the cvs data
-def getCSVdata():
- """opens a csv file, reads it in and returns a 2 dimensional list with the data"""
- csvfile = scribus.fileDialog("csv2table :: open file", "*.csv")
- if csvfile != "":
- try:
- reader = csv.reader(file(csvfile))
- datalist=[]
- for row in reader:
- rowlist=[]
- for col in row:
- rowlist.append(col)
- datalist.append(rowlist)
- return datalist
- except Exception, e:
- scribus.messageBox("csv2table", "Could not open file %s"%e)
- else:
- sys.exit
-
-def getDataInformation(list):
- """takes a 2 dimensional list object and returns the numbers of rows and cols"""
- datainfo = dict()
- datainfo["rowcount"]=len(list)
- datainfo["colcount"]= len(list[0])
- return datainfo
-
-def cellsize(areainfo, datainfo):
- """"takes the area and data info and calculates the prper cell size"""
- csize=dict()
- csize["v"]= areainfo["vsize"] / datainfo["rowcount"]
- csize["h"]= areainfo["hsize"] / datainfo["colcount"]
- return csize
-
-def main(argv):
- """This is a documentation string. Write a description of what your code
- does here. You should generally put documentation strings ("docstrings")
- on all your Python functions."""
- #########################
- # YOUR CODE GOES HERE #
- #########################
- if not scribus.haveDoc() > 0: #do we have a doc?
- scribus.messageBox("importcvs2table", "No opened document.\nPlease open one first.")
- sys.exit()
- userdim = scribus.getUnit() #get unit and change it to mm
- scribus.setUnit(scribus.UNIT_MILLIMETERS)
- cellwidthleft = 0
- cellwidthright = 0
- cellHeight = 0
- pos = getPosition()
- while cellwidthleft <= 0:
- cellwidthL = scribus.valueDialog('Left Cell Width','How wide (mm) do you wish left cells to be?','30.0')
- if (not cellwidthL) :
- sys.exit()
- cellwidthleft = float(cellwidthL)
- while cellwidthright <= 0:
- cellwidthR = scribus.valueDialog('Right Cell Width','How wide (mm) do you wish right cells to be?','30.0')
- if (not cellwidthR) :
- sys.exit()
- cellwidthright = float(cellwidthR)
- while cellHeight <= 0:
- cellheight = scribus.valueDialog('Cell Height','How tall (mm) do you wish cells to be?','10.0')
- if (not cellheight) :
- sys.exit()
- cellHeight = float(cellheight)
- data = getCSVdata()
- di = getDataInformation(data)
- hposition=pos[1]
- vposition=pos[0]
-
- objectlist=[] # here we keep a record of all the created textboxes so we can group them later
- i=0
- scribus.progressTotal(len(data))
- scribus.setRedraw(False)
- for row in data:
- c=0
- for cell in row:
- cell = cell.strip()
- cellsize=cellwidthleft
- if c == 1: cellsize=cellwidthright
- textbox=scribus.createText(hposition, vposition, cellsize, cellHeight) #create a textbox
- objectlist.append(textbox)
- scribus.insertText(cell,0, textbox)#insert the text into the textbox
- hposition=hposition+cellwidthleft #move the position for the next cell
- c=1
- vposition=vposition+cellHeight #set vertical position for next row
- hposition=pos[1] #reset vertical position for next row
- i=i+1
- scribus.progressSet(i)
-
- scribus.groupObjects(objectlist)
- scribus.progressReset()
- scribus.setUnit(userdim) # reset unit to previous value
- scribus.docChanged(True)
- scribus.statusMessage("Done")
- scribus.setRedraw(True)
-
-def main_wrapper(argv):
- """The main_wrapper() function disables redrawing, sets a sensible generic
- status bar message, and optionally sets up the progress bar. It then runs
- the main() function. Once everything finishes it cleans up after the main()
- function, making sure everything is sane before the script terminates."""
- try:
- scribus.statusMessage("Importing .csv table...")
- scribus.progressReset()
- main(argv)
- finally:
- # Exit neatly even if the script terminated with an exception,
- # so we leave the progress bar and status bar blank and make sure
- # drawing is enabled.
- if scribus.haveDoc() > 0:
- scribus.setRedraw(True)
- scribus.statusMessage("")
- scribus.progressReset()
-
-# This code detects if the script is being run as a script, or imported as a module.
-# It only runs main() if being run as a script. This permits you to import your script
-# and control it manually for debugging.
-if __name__ == '__main__':
- main_wrapper(sys.argv)
+ position= scribus.getPosition(areaname)
+ vpos = position[1]
+ hpos = position[0]
+ scribus.deleteObject(areaname)
+ return vpos, hpos
+
+ else:
+ scribus.messageBox("csv2table", "please select ONE Object to mark the drawing area for the table")
+ sys.exit()
+
+#get the cvs data
+def getCSVdata():
+ """opens a csv file, reads it in and returns a 2 dimensional list with the data"""
+ csvfile = scribus.fileDialog("csv2table :: open file", "*.csv")
+ if csvfile != "":
+ try:
+ reader = csv.reader(file(csvfile))
+ datalist=[]
+ for row in reader:
+ rowlist=[]
+ for col in row:
+ rowlist.append(col)
+ datalist.append(rowlist)
+ return datalist
+ except Exception, e:
+ scribus.messageBox("csv2table", "Could not open file %s"%e)
+ else:
+ sys.exit
+
+def getDataInformation(list):
+ """takes a 2 dimensional list object and returns the numbers of rows and cols"""
+ datainfo = dict()
+ datainfo["rowcount"]=len(list)
+ datainfo["colcount"]= len(list[0])
+ return datainfo
+
+def cellsize(areainfo, datainfo):
+ """"takes the area and data info and calculates the prper cell size"""
+ csize=dict()
+ csize["v"]= areainfo["vsize"] / datainfo["rowcount"]
+ csize["h"]= areainfo["hsize"] / datainfo["colcount"]
+ return csize
+
+def main(argv):
+ """This is a documentation string. Write a description of what your code
+ does here. You should generally put documentation strings ("docstrings")
+ on all your Python functions."""
+ #########################
+ # YOUR CODE GOES HERE #
+ #########################
+ if not scribus.haveDoc() > 0: #do we have a doc?
+ scribus.messageBox("importcvs2table", "No opened document.\nPlease open one first.")
+ sys.exit()
+ userdim = scribus.getUnit() #get unit and change it to mm
+ scribus.setUnit(scribus.UNIT_MILLIMETERS)
+ cellwidthleft = 0
+ cellwidthright = 0
+ cellHeight = 0
+ pos = getPosition()
+ while cellwidthleft <= 0:
+ cellwidthL = scribus.valueDialog('Left Cell Width','How wide (mm) do you wish left cells to be?','30.0')
+ if (not cellwidthL) :
+ sys.exit()
+ cellwidthleft = float(cellwidthL)
+ while cellwidthright <= 0:
+ cellwidthR = scribus.valueDialog('Right Cell Width','How wide (mm) do you wish right cells to be?','30.0')
+ if (not cellwidthR) :
+ sys.exit()
+ cellwidthright = float(cellwidthR)
+ while cellHeight <= 0:
+ cellheight = scribus.valueDialog('Cell Height','How tall (mm) do you wish cells to be?','10.0')
+ if (not cellheight) :
+ sys.exit()
+ cellHeight = float(cellheight)
+ data = getCSVdata()
+ di = getDataInformation(data)
+ hposition=pos[1]
+ vposition=pos[0]
+
+ objectlist=[] # here we keep a record of all the created textboxes so we can group them later
+ i=0
+ scribus.progressTotal(len(data))
+ scribus.setRedraw(False)
+ for row in data:
+ c=0
+ for cell in row:
+ cell = cell.strip()
+ cellsize=cellwidthleft
+ if c == 1: cellsize=cellwidthright
+ textbox=scribus.createText(hposition, vposition, cellsize, cellHeight) #create a textbox
+ objectlist.append(textbox)
+ scribus.insertText(cell,0, textbox)#insert the text into the textbox
+ hposition=hposition+cellwidthleft #move the position for the next cell
+ c=1
+ vposition=vposition+cellHeight #set vertical position for next row
+ hposition=pos[1] #reset vertical position for next row
+ i=i+1
+ scribus.progressSet(i)
+
+ scribus.groupObjects(objectlist)
+ scribus.progressReset()
+ scribus.setUnit(userdim) # reset unit to previous value
+ scribus.docChanged(True)
+ scribus.statusMessage("Done")
+ scribus.setRedraw(True)
+
+def main_wrapper(argv):
+ """The main_wrapper() function disables redrawing, sets a sensible generic
+ status bar message, and optionally sets up the progress bar. It then runs
+ the main() function. Once everything finishes it cleans up after the main()
+ function, making sure everything is sane before the script terminates."""
+ try:
+ scribus.statusMessage("Importing .csv table...")
+ scribus.progressReset()
+ main(argv)
+ finally:
+ # Exit neatly even if the script terminated with an exception,
+ # so we leave the progress bar and status bar blank and make sure
+ # drawing is enabled.
+ if scribus.haveDoc() > 0:
+ scribus.setRedraw(True)
+ scribus.statusMessage("")
+ scribus.progressReset()
+
+# This code detects if the script is being run as a script, or imported as a module.
+# It only runs main() if being run as a script. This permits you to import your script
+# and control it manually for debugging.
+if __name__ == '__main__':
+ main_wrapper(sys.argv)
Modified: trunk/Scribus/scribus/transaction.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25027&path=/trunk/Scribus/scribus/transaction.h
==============================================================================
--- trunk/Scribus/scribus/transaction.h (original)
+++ trunk/Scribus/scribus/transaction.h Sat Mar 12 22:05:49 2022
@@ -1,114 +1,114 @@
-
-/*
- For general Scribus (>=1.3.2) copyright and licensing information please refer
- to the COPYING file provided with the program. Following this notice may exist
- a copyright and/or license notice that predates the release of Scribus 1.3.2
- for which a new license (GPL+exception) is in place.
- */
-/***************************************************************************
-* Copyright (C) 2008 by Andreas Vox *
-* *
-* 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 2 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, write to the *
-* Free Software Foundation, Inc., *
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
-***************************************************************************/
-
-#ifndef TRANSACTION_H
-#define TRANSACTION_H
-
-#include "scribusapi.h"
-
-#include <QSharedData>
-#include <QExplicitlySharedDataPointer>
-
-/**
- Interface class for objects representing a going transaction.
- Will be specialized by classes like Undomanager for use as
- a result type in their beginTransaction() method.
-*/
-class SCRIBUS_API Transaction {
-
-public:
- enum Status {
- STATE_OPEN,
- STATE_WILLFAIL,
- STATE_FAILED,
- STATE_COMMITTED
- };
-
- class TransactionStateBase : public QSharedData
- {
- public:
- virtual ~TransactionStateBase() = default;
-
- Status m_status;
- };
-
- Transaction(TransactionStateBase* data) : m_data(data)
- {
- if (data != 0)
- m_data->m_status = STATE_OPEN;
- }
-
- /**
- Automatically commits if forgotten.
- Override as appropriate. Since the superclass destructor is called last, you
- can cancel in the subclass destructor; the commit here then will do nothing.
- Don't forget to set m_data to NULL if you free the m_data pointer!
- */
- virtual ~Transaction() = default;
-
- /**
- Test if transaction has some valid data
- */
- operator bool() const { return (m_data.constData() != 0); }
-
- /**
- Commits this transaction if in STATE_OPEN.
- If in STATE_WILLFAIL, cancel the transaction instead; otherwise do nothing.
- Returns true iff the transaction was committed or canceled.
- */
- virtual bool commit() = 0;
-
- /**
- Cancels this transaction if in STATE_OPEN or STATE_WILLFAIL; otherwise do nothing
- Returns true iff the transaction was canceled.
- */
- virtual bool cancel() = 0;
-
- /**
- Marks this transaction as failed.
- */
- virtual void markFailed();
-
- /**
- Reset underlyng transaciton data
- */
- virtual void reset();
-
- int getState() const;
-
- bool isNull() const { return (m_data.constData() == 0); }
-
- bool isStarted() const { return (m_data.constData() != 0); }
-
- bool isOpened() const;
-
-protected:
- // if you subclass, do *not* add any data members but use this pointer instead,
- // otherwise the copy initializer will strip your objects.
- QExplicitlySharedDataPointer<TransactionStateBase> m_data;
-};
-
-#endif
+
+/*
+ For general Scribus (>=1.3.2) copyright and licensing information please refer
+ to the COPYING file provided with the program. Following this notice may exist
+ a copyright and/or license notice that predates the release of Scribus 1.3.2
+ for which a new license (GPL+exception) is in place.
+ */
+/***************************************************************************
+* Copyright (C) 2008 by Andreas Vox *
+* *
+* 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 2 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, write to the *
+* Free Software Foundation, Inc., *
+* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+***************************************************************************/
+
+#ifndef TRANSACTION_H
+#define TRANSACTION_H
+
+#include "scribusapi.h"
+
+#include <QSharedData>
+#include <QExplicitlySharedDataPointer>
+
+/**
+ Interface class for objects representing a going transaction.
+ Will be specialized by classes like Undomanager for use as
+ a result type in their beginTransaction() method.
+*/
+class SCRIBUS_API Transaction {
+
+public:
+ enum Status {
+ STATE_OPEN,
+ STATE_WILLFAIL,
+ STATE_FAILED,
+ STATE_COMMITTED
+ };
+
+ class TransactionStateBase : public QSharedData
+ {
+ public:
+ virtual ~TransactionStateBase() = default;
+
+ Status m_status;
+ };
+
+ Transaction(TransactionStateBase* data) : m_data(data)
+ {
+ if (data != 0)
+ m_data->m_status = STATE_OPEN;
+ }
+
+ /**
+ Automatically commits if forgotten.
+ Override as appropriate. Since the superclass destructor is called last, you
+ can cancel in the subclass destructor; the commit here then will do nothing.
+ Don't forget to set m_data to NULL if you free the m_data pointer!
+ */
+ virtual ~Transaction() = default;
+
+ /**
+ Test if transaction has some valid data
+ */
+ operator bool() const { return (m_data.constData() != 0); }
+
+ /**
+ Commits this transaction if in STATE_OPEN.
+ If in STATE_WILLFAIL, cancel the transaction instead; otherwise do nothing.
+ Returns true iff the transaction was committed or canceled.
+ */
+ virtual bool commit() = 0;
+
+ /**
+ Cancels this transaction if in STATE_OPEN or STATE_WILLFAIL; otherwise do nothing
+ Returns true iff the transaction was canceled.
+ */
+ virtual bool cancel() = 0;
+
+ /**
+ Marks this transaction as failed.
+ */
+ virtual void markFailed();
+
+ /**
+ Reset underlying transaction data
+ */
+ virtual void reset();
+
+ int getState() const;
+
+ bool isNull() const { return (m_data.constData() == 0); }
+
+ bool isStarted() const { return (m_data.constData() != 0); }
+
+ bool isOpened() const;
+
+protected:
+ // if you subclass, do *not* add any data members but use this pointer instead,
+ // otherwise the copy initializer will strip your objects.
+ QExplicitlySharedDataPointer<TransactionStateBase> m_data;
+};
+
+#endif
Modified: trunk/Scribus/scribus/ui/loremipsum.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25027&path=/trunk/Scribus/scribus/ui/loremipsum.h
==============================================================================
--- trunk/Scribus/scribus/ui/loremipsum.h (original)
+++ trunk/Scribus/scribus/ui/loremipsum.h Sat Mar 12 22:05:49 2022
@@ -49,7 +49,7 @@
{
public:
/*! parse a XML file with given name
- \param filename string fith the file name with full/relative path */
+ \param filename string of the file name with full/relative path */
LoremParser(const QString& filename);
~LoremParser(){};
More information about the scribus-commit
mailing list