Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 2621 → Rev 2620

/branches/Version13x/Scribus/scribus/about.cpp
51,7 → 51,7
tabLayout1->addWidget( pixmapLabel1 );
buildID = new QLabel( tab, "BB" );
buildID->setAlignment(Qt::AlignCenter);
QString bu = tr("%1 %2 %3 ").arg("30").arg("June").arg("2005");
QString bu = tr("%1 %2 %3 ").arg("29").arg("June").arg("2005");
#ifdef HAVE_CMS
bu += "C";
#else
/branches/Version13x/Scribus/scribus/scribus.cpp
1310,12 → 1310,10
scrMenuMgr->createMenu("Extras", tr("E&xtras"));
scrMenuMgr->addMenuItem(scrActions["extrasManagePictures"], "Extras");
scrMenuMgr->addMenuItem(scrActions["extrasHyphenateText"], "Extras");
scrMenuMgr->addMenuItem(scrActions["extrasDeHyphenateText"], "Extras");
scrMenuMgr->addMenuItem(scrActions["extrasGenerateTableOfContents"], "Extras");
 
scrMenuMgr->setMenuEnabled("Extras", false);
scrActions["extrasHyphenateText"]->setEnabled(false);
scrActions["extrasDeHyphenateText"]->setEnabled(false);
 
//Window menu
scrMenuMgr->createMenu("Windows", tr("&Windows"));
3733,7 → 3731,6
scrActions["editClearContents"]->setEnabled(false);
scrActions["editSearchReplace"]->setEnabled(false);
scrActions["extrasHyphenateText"]->setEnabled(false);
scrActions["extrasDeHyphenateText"]->setEnabled(false);
scrMenuMgr->clearMenu("Style");
 
scrActions["toolsUnlinkTextFrame"]->setEnabled(false);
3754,7 → 3751,6
scrActions["editClearContents"]->setEnabled(true);
scrActions["editSearchReplace"]->setEnabled(false);
scrActions["extrasHyphenateText"]->setEnabled(false);
scrActions["extrasDeHyphenateText"]->setEnabled(false);
scrMenuMgr->setMenuEnabled("Style", true);
scrMenuMgr->setMenuEnabled("Item", true);
scrMenuMgr->setMenuEnabled("ItemShapes", !(currItem->isTableItem && currItem->isSingleSel));
3791,7 → 3787,6
scrActions["editClearContents"]->setEnabled(true);
scrActions["editSearchReplace"]->setEnabled(currItem->itemText.count() != 0);
scrActions["extrasHyphenateText"]->setEnabled(true);
scrActions["extrasDeHyphenateText"]->setEnabled(true);
scrMenuMgr->setMenuEnabled("Style", true);
scrMenuMgr->setMenuEnabled("Item", true);
scrMenuMgr->setMenuEnabled("ItemShapes", !(currItem->isTableItem && currItem->isSingleSel));
3903,7 → 3898,6
scrActions["editClearContents"]->setEnabled(false);
scrActions["editSearchReplace"]->setEnabled(false);
scrActions["extrasHyphenateText"]->setEnabled(false);
scrActions["extrasDeHyphenateText"]->setEnabled(false);
scrMenuMgr->setMenuEnabled("Item", true);
scrMenuMgr->setMenuEnabled("ItemShapes", false);
scrActions["itemDetachTextFromPath"]->setEnabled(true);
3972,7 → 3966,6
scrActions["editSearchReplace"]->setEnabled(false);
 
scrActions["extrasHyphenateText"]->setEnabled(false);
scrActions["extrasDeHyphenateText"]->setEnabled(false);
scrMenuMgr->setMenuEnabled("Style", true);
scrMenuMgr->setMenuEnabled("Item", true);
scrMenuMgr->clearMenu("Style");
5252,7 → 5245,6
//scrActions["toolsPreflightVerifier"]->setEnabled(false);
 
scrActions["extrasHyphenateText"]->setEnabled(false);
scrActions["extrasDeHyphenateText"]->setEnabled(false);
scrMenuMgr->setMenuEnabled("View", false);
scrMenuMgr->setMenuEnabled("Windows", false);
scrActions["viewSnapToGuides"]->setOn(false);
10164,26 → 10156,10
if (doc->docHyphenator->Language != currItem->Language)
doc->docHyphenator->slotNewDict(currItem->Language);
doc->docHyphenator->slotHyphenate(currItem);
view->DrawNew();
slotDocCh();
}
}
}
 
void ScribusApp::doDeHyphenate()
{
if (HaveDoc)
{
if (view->SelItem.count() != 0)
{
PageItem *currItem = view->SelItem.at(0);
doc->docHyphenator->slotDeHyphenate(currItem);
view->DrawNew();
slotDocCh();
}
}
}
 
void ScribusApp::ManageGuides()
{
if (HaveDoc)
10625,6 → 10601,29
storyEditor->activFromApp = true;
return;
}
/*
if (currItemSE!=NULL && currDocSE!=NULL)
{
QString msg=tr("Story Editor is currently editing the text in the frame named %1 from the document %2.<br/>").arg(currItemSE->itemName()).arg(currDocSE->DocName);
if (storyEditor->textDataChanged())
{
msg+=tr("You have edited the data and it has not been saved.");
int retVal=QMessageBox::warning(this, tr("Warning"), "<qt>" + msg + "</qt>", tr("&Abort"), tr("&Ignore Changes"), tr("&Keep Changes and Continue"), 0, 0);
if (retVal == 0)
return;
if (retVal == 2)
storyEditor->updateTextFrame();
}
else
{
msg+=tr("The data has either not been modified or has already been saved.");
int retVal=QMessageBox::question(this, tr("Information"), "<qt>" + msg + "</qt>",
tr("C&ontinue"), tr("&Cancel"), 0, 0, 0);
if (retVal == 1)
return;
}
} */
storyEditor->activFromApp = true;
storyEditor->setCurrentDocumentAndItem(doc, currItem);
CurrStED = storyEditor;
10635,6 → 10634,14
storyEditor->activFromApp = true;
storyEditor->raise();
storyEditor->activFromApp = true;
//dia->show();
/*
view->DrawNew();
buildFontMenu();
CurrStED = NULL;
//delete dia;
dia=NULL;
*/
}
}
 
/branches/Version13x/Scribus/scribus/actionmanager.cpp
489,12 → 489,10
{
scrActions->insert("extrasManagePictures", new ScrAction(ScApp, "extrasManagePictures"));
scrActions->insert("extrasHyphenateText", new ScrAction(ScApp, "extrasHyphenateText"));
scrActions->insert("extrasDeHyphenateText", new ScrAction(ScApp, "extrasDeHyphenateText"));
scrActions->insert("extrasGenerateTableOfContents", new ScrAction(ScApp, "extrasGenerateTableOfContents"));
 
connect( (*scrActions)["extrasManagePictures"], SIGNAL(activated()), ScApp, SLOT(StatusPic()) );
connect( (*scrActions)["extrasHyphenateText"], SIGNAL(activated()), ScApp, SLOT(doHyphenate()) );
connect( (*scrActions)["extrasDeHyphenateText"], SIGNAL(activated()), ScApp, SLOT(doDeHyphenate()) );
connect( (*scrActions)["extrasGenerateTableOfContents"], SIGNAL(activated()), ScApp, SLOT(generateTableOfContents()) );
}
 
957,7 → 955,6
//Extras Menu
(*scrActions)["extrasManagePictures"]->setTexts( tr("&Manage Pictures"));
(*scrActions)["extrasHyphenateText"]->setTexts( tr("&Hyphenate Text"));
(*scrActions)["extrasDeHyphenateText"]->setTexts( tr("Dehyphenate Text"));
(*scrActions)["extrasGenerateTableOfContents"]->setTexts( tr("&Generate Table Of Contents"));
 
//Help Menu
/branches/Version13x/Scribus/scribus/scribus.h
260,7 → 260,6
void UnDoAction();
void RedoAction();
void doHyphenate();
void doDeHyphenate();
void slotTest();
void slotTest2();
void PutScrap();
/branches/Version13x/Scribus/scribus/util.cpp
197,7 → 197,7
 
// then add any user specified args and run gs
cmd1 += " " + args_in + " -c showpage -c quit";
// qDebug("Calling gs as: %s", cmd1.ascii());
qDebug("Calling gs as: %s", cmd1.ascii());
return system(cmd1);
}
 
/branches/Version13x/Scribus/scribus/hyphenator.cpp
370,50 → 370,5
}
qApp->setOverrideCursor(QCursor(ArrowCursor), true);
doc->DoDrawing = true;
// nb1->OwnPage->RefreshItem(nb1);
}
 
/*!
\fn void Hyphenator::slotDeHyphenate(PageItem* it)
\brief Removes hyphenation either for the whole text frame or the selected text if there is a selection.
\date
\author Franz Schmid
\param it references \see PageItem - text frame.
\retval None
*/
void Hyphenator::slotDeHyphenate(PageItem* it)
{
PageItem *nextItem = it;
PageItem *nb1;
if ((it->itemType() != PageItem::TextFrame) || (it ->itemText.count() == 0))
return;
while (nextItem != 0)
{
if (nextItem->BackBox != 0)
nextItem = nextItem->BackBox;
else
break;
}
nb1 = nextItem;
while (nextItem != 0)
{
uint a = nextItem->itemText.count();
for (uint s = 0; s < a; ++s)
nb1->itemText.append(nextItem->itemText.take(0));
nextItem->MaxChars = 0;
nextItem->CPos = 0;
nextItem = nextItem->NextBox;
}
doc->DoDrawing = false;
for (uint a = 0; a < nb1->itemText.count(); ++a)
{
if (nb1->HasSel)
{
if (nb1->itemText.at(a)->cselect)
nb1->itemText.at(a)->cstyle &= 1919;
}
else
nb1->itemText.at(a)->cstyle &= 1919;
}
qApp->setOverrideCursor(QCursor(ArrowCursor), true);
doc->DoDrawing = true;
}
/branches/Version13x/Scribus/scribus/hyphenator.h
47,6 → 47,5
void slotNewSettings(int Wordlen, bool Autom, bool ACheck, int Num);
void slotHyphenateWord(PageItem* it, QString text, int firstC);
void slotHyphenate(PageItem *it);
void slotDeHyphenate(PageItem *it);
};
#endif