View Issue Details

IDProjectCategoryView StatusLast Update
0002630ScribusScripterpublic2005-11-30 23:39
Reportermikes Assigned Tosubik  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
OSMac OSXOS Version10.3 
Product Version1.3.1cvs 
Fixed in Version1.3.2cvs 
Summary0002630: Constant FIRSTPAGERIGHT/FIRSTPAGELEFT works in the wrong direction
DescriptionWhen I create a new doc with
newDoc((185, 250), (12, 20, 15, 28), PORTRAIT, 1, UNIT_MILLIMETERS, FACINGPAGES, FIRSTPAGELEFT)
I get a right first side and when I use FIRSTPAGERIGHT I get a left first page. When I create it by the New Document Dialog it works in the right way. To confirm ist use my scrips in Scribus WIKI beginners section or the file attachment.
TagsNo tags attached.
Patch

Relationships

related to 0002701 closedsubik Running Font sampler results in 1st page in right hand side of work area 
child of 0003813 acknowledged Metabug: Scripter 

Activities

2005-09-28 19:06

 

fschmid

2005-09-28 22:07

administrator   ~0006813

Yep, the internal page layout engine has changed and this change isn't in the scripter yet.

subik

2005-10-11 18:04

manager   ~0007049

Petr Vane(k schrieb:
> Hi Franz
>
> I've fixed buggy behaviour for mikes's script (just only changed constant
> values as dirty hack).
> http://bugs.scribus.net/view.php?id=2630
>
> Can you provide some humanized info about this new system, please?
> I think there is some dependency between one page layout/2 pages layout etc.
> and firstLeft parameter value...
Hi Petr,

the changes is the layout engine are simple:

There is now a struct for the default page layouts:
struct PageSet
{
        QString Name;
        int FirstPage;
        int Rows;
        int Columns;
        double GapHorizontal;
        double GapVertical;
        double GapBelow;
        QStringList pageNames;
};

The QValueList<PageSet> pageSets contains all defined layouts.

the former FirstPageLeft variable is now the int FirstPage,
allowed values are starting with 0 for the leftmost page upto
the value of colums-1 which represents the rightmost page.

Thus in a three page layout the values would be
0 = left,
1 = middle and
2 for the right page.

For more info see:
ScribusView::reformPages(bool moveObjects)
PrefsManager::initDefaults() starting at line 292

Hope that helps,
Franz

subik

2005-10-11 18:23

manager   ~0007050

[20:28:26] <subik> btw any idea with 0002630?
[20:28:50] <subik> esp. how to map various page format into python constants
[20:29:06] <subik> (classical egg/chicken problem imho)
[20:29:39] * mrdocs looks
[20:31:55] <subik> I have fix for sjc sampler but it's only workaround - not real solution
[20:32:02] <mrdocs> k
[20:34:04] <mrdocs> subik: its better to wait for a real fix imo
[20:35:24] <mrdocs> i would rather that the script work cleanly.. just me, but i use it to beat up on Scribus :)
[20:36:07] <subik> I hope so too
[20:37:25] <subik> but I cannot see any clear solution for it.
[20:37:59] <subik> 1) define a lot of constants FIRSTPAGE0, 1, 2 ....
[20:38:07] <subik> or (I prefer it)
[20:38:26] <subik> 2) rewrite api of the newDoc() procedure
[20:38:40] <subik> but it breaks backward compatibility
[20:38:45] <subik> or...
[20:39:23] <subik> 3) mark newDoc as obsolette and create newDocument() with required new API
[20:39:54] <mrdocs> obsolete will give warnings in the console ?
[20:39:59] <mrdocs> but be usable ?
[20:40:16] <mrdocs> eg with 1.2.x scripts ?
[20:40:35] <subik> yep
[20:40:45] * mrdocs votes for 0000003

subik

2005-10-11 18:28

manager   ~0007051

Last edited: 2005-10-11 18:29

what about:
newDocument(size, margins, orientation, firstPageNumber, unit, pagesInRow, positionOfFirstPage) -> bool
?

cbradney

2005-10-11 18:54

administrator   ~0007052

looks ok

sjc

2005-10-11 20:02

developer   ~0007054

I would go with option 3, newDocument() as probably the best solution

subik

2005-10-30 16:50

manager   ~0007269

Scribus document has been changed - newDoc() is now marked as obsolete, use newDocument() instead. It provides full interface for multiple pages documents (see related bug).

Issue History

Date Modified Username Field Change
2005-09-28 19:06 mikes New Issue
2005-09-28 19:06 mikes File Added: kolumnen_s1.3.1cvs_OSX.py
2005-09-28 22:07 fschmid Note Added: 0006813
2005-09-29 19:13 subik Status new => assigned
2005-09-29 19:13 subik Assigned To => subik
2005-10-10 19:24 subik Relationship added related to 0002701
2005-10-11 18:04 subik Note Added: 0007049
2005-10-11 18:23 subik Note Added: 0007050
2005-10-11 18:28 subik Note Added: 0007051
2005-10-11 18:29 subik Note Edited: 0007051
2005-10-11 18:54 cbradney Note Added: 0007052
2005-10-11 20:02 sjc Note Added: 0007054
2005-10-30 16:50 subik Status assigned => resolved
2005-10-30 16:50 subik Fixed in Version => 1.3.2cvs
2005-10-30 16:50 subik Resolution open => fixed
2005-10-30 16:50 subik Note Added: 0007269
2005-11-30 23:39 cbradney Status resolved => closed
2006-05-13 21:21 christoph_s Relationship added child of 0003813