[scribus] DockWidgets and Workspaces

Henning Schröder henning.schroeder at gmail.com
Mon Aug 30 18:17:28 CEST 2010


On Thu, Aug 26, 2010 at 11:17 PM, Rob Oakes <lyx-devel at oak-tree.us> wrote:
> Using the awesome power of the Scripter plugin (and a very good example
> written by one of the develoeprs), I created a series of scripts to mimic
> the "Workspaces" feature of the Adobe Creative Suite.  In case you've never
> used the Creative Suite apps before, Adobe has included the ability to save
> save your window layout as a "Workspace."  This means that you can configure
> certain toolbars and palettes and then load them whenever you are working on
> a particular type of content.  It can be a wonderful time saver.
Looks cool, nice to see how my proof of concept code is used :-)

But DockWidgets.py will only work with English language settings because
it looks for the window title. E.g. "Properties" becomes
"Eigenschaften" in German.
There are two solutions:
 1) Add setObjectName in the C++ constructor of each Dialog and
compare by objectName instead of windowTitle
 2) Use Object.tr to translate the titles to the current language.
       dockables = [unicode(qApp.tr(t)) for t in ["Properties",
"Outline", "Layers", "Arrange Pages",
	 "Scrapbook", "Bookmarks", "Align and Distribute"] ]
      And replace  title = str(tlw.windowTitle())
      with  title = unicode(tlw.windowTitle())


More information about the scribus mailing list