r15107 by cbradney - Add current doc's size to active list for current doc setup/insert page/page properties
scribus-commit
scribus-commit at lists.scribus.net
Tue May 25 09:20:24 CEST 2010
Revision: 15107
Author: cbradney
Date: 2010-05-25T07:18:05.986504Z
Commit message: Add current doc's size to active list for current doc setup/insert page/page properties
Changeset:
M /trunk/Scribus/scribus/ui/margindialog.cpp
M /trunk/Scribus/scribus/ui/prefs_documentsetup.cpp
M /trunk/Scribus/scribus/ui/inspage.cpp
Diffs:
Index: scribus/ui/prefs_documentsetup.cpp
===================================================================
--- scribus/ui/prefs_documentsetup.cpp (revision 15106)
+++ scribus/ui/prefs_documentsetup.cpp (revision 15107)
@@ -221,9 +221,14 @@
{
prefsPageSizeName = prefsData->docSetupPrefs.pageSize;
PageSize *ps=new PageSize(prefsPageSizeName);
+ QStringList insertList(ps->activeSizeTRList());
+ if (insertList.indexOf(prefsPageSizeName)==-1)
+ insertList<<prefsPageSizeName;
+ insertList.sort();
+ insertList<<CommonStrings::trCustomPageSize;
pageSizeComboBox->clear();
- pageSizeComboBox->addItems(ps->activeSizeTRList());
- pageSizeComboBox->addItem( CommonStrings::trCustomPageSize );
+ pageSizeComboBox->addItems(insertList);
+
if (prefsData->docSetupPrefs.pageSize == CommonStrings::customPageSize)
setCurrentComboItem(pageSizeComboBox, CommonStrings::trCustomPageSize);
else
Index: scribus/ui/margindialog.cpp
===================================================================
--- scribus/ui/margindialog.cpp (revision 15106)
+++ scribus/ui/margindialog.cpp (revision 15107)
@@ -43,18 +43,22 @@
dsGroupBox7Layout->setMargin( 10 );
TextLabel1 = new QLabel( tr( "&Size:" ), dsGroupBox7 );
dsGroupBox7Layout->addWidget( TextLabel1, 0, 0, 1, 2 );
+
PageSize *ps=new PageSize(doc->currentPage()->m_pageSize);
- sizeQComboBox = new QComboBox( dsGroupBox7 );
- sizeQComboBox->setEditable(false);
- QStringList pageSizes=ps->activeSizeList();
- sizeQComboBox->addItems(ps->activeSizeTRList());
- sizeQComboBox->addItem( CommonStrings::trCustomPageSize );
prefsPageSizeName=ps->name();
- int sizeIndex = pageSizes.indexOf(ps->nameTR());
+ sizeQComboBox = new QComboBox(dsGroupBox7);
+ QStringList insertList(ps->activeSizeTRList());
+ if (insertList.indexOf(prefsPageSizeName)==-1)
+ insertList<<prefsPageSizeName;
+ insertList.sort();
+ insertList<<CommonStrings::trCustomPageSize;
+ sizeQComboBox->addItems(insertList);
+ int sizeIndex = insertList.indexOf(ps->nameTR());
if (sizeIndex != -1)
sizeQComboBox->setCurrentIndex(sizeIndex);
else
sizeQComboBox->setCurrentIndex(sizeQComboBox->count()-1);
+
TextLabel1->setBuddy(sizeQComboBox);
dsGroupBox7Layout->addWidget(sizeQComboBox, 0, 2, 1, 2);
TextLabel2 = new QLabel( tr( "Orie&ntation:" ), dsGroupBox7 );
Index: scribus/ui/inspage.cpp
===================================================================
--- scribus/ui/inspage.cpp (revision 15106)
+++ scribus/ui/inspage.cpp (revision 15107)
@@ -212,16 +212,23 @@
TextLabel1 = new QLabel( tr( "&Size:" ), dsGroupBox7);
dsGroupBox7Layout->addWidget( TextLabel1, 0, 0);
PageSize *ps=new PageSize(currentDoc->pageSize());
+ prefsPageSizeName=ps->name();
sizeQComboBox = new QComboBox(dsGroupBox7);
- QStringList pageSizes=ps->activeSizeList();
- sizeQComboBox->addItems(ps->activeSizeTRList());
- sizeQComboBox->addItem(CommonStrings::trCustomPageSize);
- prefsPageSizeName=ps->name();
- int sizeIndex = pageSizes.indexOf(ps->nameTR());
+ QStringList insertList(ps->activeSizeTRList());
+ if (insertList.indexOf(prefsPageSizeName)==-1)
+ insertList<<prefsPageSizeName;
+ insertList.sort();
+ insertList<<CommonStrings::trCustomPageSize;
+ sizeQComboBox->addItems(insertList);
+
+ int sizeIndex = insertList.indexOf(ps->nameTR());
if (sizeIndex != -1)
sizeQComboBox->setCurrentIndex(sizeIndex);
else
sizeQComboBox->setCurrentIndex(sizeQComboBox->count()-1);
+
+
+
TextLabel1->setBuddy(sizeQComboBox);
dsGroupBox7Layout->addWidget(sizeQComboBox, 0, 1, 1, 3);
TextLabel2 = new QLabel( tr( "Orie&ntation:" ), dsGroupBox7);
More information about the scribus-commit
mailing list