View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002159 | Scribus | Internal | public | 2005-06-29 15:00 | 2005-07-06 04:42 |
Reporter | jghali | Assigned To | cbradney | ||
Priority | normal | Severity | tweak | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Windows | OS | Windows | OS Version | 2000 SP4 |
Product Version | 1.3.0cvs | ||||
Fixed in Version | 1.3.0cvs | ||||
Summary | 0002159: Naming conflict in scribusstructs.h | ||||
Description | Some value names of AppMode enum conflict with functions defined in windows.h Value names prefixed with "sc" in diff joined. Diffed with -u. If diff format not appropriate, send me an example... | ||||
Tags | No tags attached. | ||||
Patch | |||||
2005-06-29 15:00
|
appMode_enum_13x.diff (65,729 bytes)
Index: actionmanager.cpp =================================================================== RCS file: /cvs/Scribus/scribus/Attic/actionmanager.cpp,v retrieving revision 1.1.2.34 diff -u -r1.1.2.34 actionmanager.cpp --- actionmanager.cpp 28 Jun 2005 19:07:47 -0000 1.1.2.34 +++ actionmanager.cpp 29 Jun 2005 16:45:41 -0000 @@ -410,7 +410,7 @@ scrActions->insert("toolsLayers", new ScrAction("", QKeySequence(Key_F6), ScApp, "toolsLayers")); scrActions->insert("toolsPages", new ScrAction(ScApp, "toolsPages")); scrActions->insert("toolsBookmarks", new ScrAction(ScApp, "toolsBookmarks")); - scrActions->insert("toolsMeasurements", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("dist.png"), loadIcon("dist.png")), "", QKeySequence(), ScApp, "toolsMeasurements", MeasurementTool)); + scrActions->insert("toolsMeasurements", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("dist.png"), loadIcon("dist.png")), "", QKeySequence(), ScApp, "toolsMeasurements", scMeasurementTool)); scrActions->insert("toolsActionHistory", new ScrAction(ScApp, "toolsActionHistory")); scrActions->insert("toolsPreflightVerifier", new ScrAction(QIconSet(loadIcon("launch16.png"), loadIcon("launch.png")),"", QKeySequence(), ScApp, "toolsPreflightVerifier")); scrActions->insert("toolsAlignDistribute", new ScrAction(ScApp, "toolsAlignDistribute")); @@ -418,27 +418,27 @@ scrActions->insert("toolsToolbarPDF", new ScrAction(ScApp, "toolsToolbarPDF")); //toolbar only items - scrActions->insert("toolsSelect", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Kreuz.xpm"), loadIcon("Kreuz.xpm")), "", QKeySequence(Key_C), ScApp, "toolsSelect", NormalMode)); + scrActions->insert("toolsSelect", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Kreuz.xpm"), loadIcon("Kreuz.xpm")), "", QKeySequence(Key_C), ScApp, "toolsSelect", scNormalMode)); - scrActions->insert("toolsInsertTextFrame", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Text16.xpm"), loadIcon("Text.xpm")), "", QKeySequence(Key_T), ScApp, "toolsInsertTextFrame", DrawText)); - scrActions->insert("toolsInsertImageFrame", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Bild16.xpm"), loadIcon("Bild.xpm")), "", QKeySequence(Key_I), ScApp, "toolsInsertImageFrame", DrawPicture)); - scrActions->insert("toolsInsertTableFrame", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("frame_table16.png"), loadIcon("frame_table.png")), "", QKeySequence(Key_A), ScApp, "toolsInsertTableFrame", DrawTable)); - scrActions->insert("toolsInsertShape", new ScrAction(ScrAction::DataInt,QIconSet(), "", QKeySequence(Key_S), ScApp, "toolsInsertShape", DrawShapes)); - scrActions->insert("toolsInsertPolygon", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("spline16.png"), loadIcon("spline.png")), "", QKeySequence(Key_P), ScApp, "toolsInsertPolygon", DrawRegularPolygon)); - scrActions->insert("toolsInsertLine", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Stift16.xpm"), loadIcon("Stift.xpm")), "", QKeySequence(Key_L), ScApp, "toolsInsertLine", DrawLine)); - scrActions->insert("toolsInsertBezier", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("beziertool16.png"), loadIcon("beziertool.png")), "", QKeySequence(Key_B), ScApp, "toolsInsertBezier", DrawBezierLine)); - scrActions->insert("toolsInsertFreehandLine", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Stiftalt16.xpm"), loadIcon("Stiftalt.xpm")), "", QKeySequence(Key_F), ScApp, "toolsInsertFreehandLine", DrawFreehandLine)); + scrActions->insert("toolsInsertTextFrame", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Text16.xpm"), loadIcon("Text.xpm")), "", QKeySequence(Key_T), ScApp, "toolsInsertTextFrame", scDrawText)); + scrActions->insert("toolsInsertImageFrame", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Bild16.xpm"), loadIcon("Bild.xpm")), "", QKeySequence(Key_I), ScApp, "toolsInsertImageFrame", scDrawPicture)); + scrActions->insert("toolsInsertTableFrame", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("frame_table16.png"), loadIcon("frame_table.png")), "", QKeySequence(Key_A), ScApp, "toolsInsertTableFrame", scDrawTable)); + scrActions->insert("toolsInsertShape", new ScrAction(ScrAction::DataInt,QIconSet(), "", QKeySequence(Key_S), ScApp, "toolsInsertShape", scDrawShapes)); + scrActions->insert("toolsInsertPolygon", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("spline16.png"), loadIcon("spline.png")), "", QKeySequence(Key_P), ScApp, "toolsInsertPolygon", scDrawRegularPolygon)); + scrActions->insert("toolsInsertLine", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Stift16.xpm"), loadIcon("Stift.xpm")), "", QKeySequence(Key_L), ScApp, "toolsInsertLine", scDrawLine)); + scrActions->insert("toolsInsertBezier", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("beziertool16.png"), loadIcon("beziertool.png")), "", QKeySequence(Key_B), ScApp, "toolsInsertBezier", scDrawBezierLine)); + scrActions->insert("toolsInsertFreehandLine", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Stiftalt16.xpm"), loadIcon("Stiftalt.xpm")), "", QKeySequence(Key_F), ScApp, "toolsInsertFreehandLine", scDrawFreehandLine)); - scrActions->insert("toolsRotate", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Rotieren.xpm"), loadIcon("Rotieren.xpm")), "", QKeySequence(Key_R), ScApp, "toolsRotate", Rotation)); - scrActions->insert("toolsZoom", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Lupe.xpm"), loadIcon("Lupe.xpm")), "", QKeySequence(Key_Z), ScApp, "toolsZoom", Magnifier)); + scrActions->insert("toolsRotate", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Rotieren.xpm"), loadIcon("Rotieren.xpm")), "", QKeySequence(Key_R), ScApp, "toolsRotate", scRotation)); + scrActions->insert("toolsZoom", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Lupe.xpm"), loadIcon("Lupe.xpm")), "", QKeySequence(Key_Z), ScApp, "toolsZoom", scMagnifier)); scrActions->insert("toolsZoomIn", new ScrAction(QIconSet(loadIcon("Gross.xpm"), loadIcon("Gross.xpm")), "", QKeySequence(CTRL+Key_Plus), ScApp, "toolsZoomIn")); scrActions->insert("toolsZoomOut", new ScrAction(QIconSet(loadIcon("Klein.xpm"), loadIcon("Klein.xpm")), "", QKeySequence(CTRL+Key_Minus), ScApp, "toolsZoomOut")); - scrActions->insert("toolsEditContents", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Editm.xpm"), loadIcon("Editm.xpm")), "", QKeySequence(Key_E), ScApp, "toolsEditContents", EditMode)); - scrActions->insert("toolsEditWithStoryEditor", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("signature.png"), loadIcon("signature.png")), "", QKeySequence(CTRL+Key_Y), ScApp, "toolsEditWithStoryEditor", StartStoryEditor)); - scrActions->insert("toolsLinkTextFrame", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Lock.xpm"), loadIcon("Lock.xpm")), "", QKeySequence(Key_N), ScApp, "toolsLinkTextFrame", LinkFrames)); - scrActions->insert("toolsUnlinkTextFrame", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Unlock.xpm"), loadIcon("Unlock.xpm")), "", QKeySequence(Key_U), ScApp, "toolsUnlinkTextFrame", UnlinkFrames)); - scrActions->insert("toolsEyeDropper", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("colorpicker.png"), loadIcon("colorpicker.png")), "", QKeySequence(Key_Y), ScApp, "toolsEyeDropper", EyeDropper)); - scrActions->insert("toolsCopyProperties", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("wizard.png"), loadIcon("wizard.png")), "", QKeySequence(), ScApp, "toolsCopyProperties", CopyProperties)); + scrActions->insert("toolsEditContents", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Editm.xpm"), loadIcon("Editm.xpm")), "", QKeySequence(Key_E), ScApp, "toolsEditContents", scEditMode)); + scrActions->insert("toolsEditWithStoryEditor", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("signature.png"), loadIcon("signature.png")), "", QKeySequence(CTRL+Key_Y), ScApp, "toolsEditWithStoryEditor", scStartStoryEditor)); + scrActions->insert("toolsLinkTextFrame", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Lock.xpm"), loadIcon("Lock.xpm")), "", QKeySequence(Key_N), ScApp, "toolsLinkTextFrame", scLinkFrames)); + scrActions->insert("toolsUnlinkTextFrame", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Unlock.xpm"), loadIcon("Unlock.xpm")), "", QKeySequence(Key_U), ScApp, "toolsUnlinkTextFrame", scUnlinkFrames)); + scrActions->insert("toolsEyeDropper", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("colorpicker.png"), loadIcon("colorpicker.png")), "", QKeySequence(Key_Y), ScApp, "toolsEyeDropper", scEyeDropper)); + scrActions->insert("toolsCopyProperties", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("wizard.png"), loadIcon("wizard.png")), "", QKeySequence(), ScApp, "toolsCopyProperties", scCopyProperties)); (*scrActions)["toolsProperties"]->setToggleAction(true); (*scrActions)["toolsOutline"]->setToggleAction(true); Index: mpalette.cpp =================================================================== RCS file: /cvs/Scribus/scribus/mpalette.cpp,v retrieving revision 1.110.2.83 diff -u -r1.110.2.83 mpalette.cpp --- mpalette.cpp 22 Jun 2005 21:14:54 -0000 1.110.2.83 +++ mpalette.cpp 29 Jun 2005 16:45:41 -0000 @@ -2203,7 +2203,7 @@ return; if ((HaveDoc) && (HaveItem)) { - if ((CurItem->HasSel) || (doc->appMode == NormalMode)) + if ((CurItem->HasSel) || (doc->appMode == scNormalMode)) { ScApp->view->chKerning(qRound(Extra->value() * 10.0)); emit DocChanged(); @@ -2877,9 +2877,9 @@ if ((HaveDoc) && (HaveItem)) { if (Cpal->gradEditButton->isOn()) - ScApp->setAppMode(EditGradientVectors); + ScApp->setAppMode(scEditGradientVectors); else - ScApp->setAppMode(NormalMode); + ScApp->setAppMode(scNormalMode); ScApp->view->RefreshItem(CurItem); } } Index: pageitem.cpp =================================================================== RCS file: /cvs/Scribus/scribus/pageitem.cpp,v retrieving revision 1.121.2.177 diff -u -r1.121.2.177 pageitem.cpp --- pageitem.cpp 26 Jun 2005 21:20:48 -0000 1.121.2.177 +++ pageitem.cpp 29 Jun 2005 16:45:41 -0000 @@ -2049,7 +2049,7 @@ } desc = Zli2->ZFo->numDescender * (-Zli2->Siz / 10.0); asce = Zli2->ZFo->numAscent * (Zli2->Siz / 10.0); - if ((((Zli2->Sele) && (Select)) || (((NextBox != 0) || (BackBox != 0)) && (Zli2->Sele))) && (Doc->appMode == EditMode)) + if ((((Zli2->Sele) && (Select)) || (((NextBox != 0) || (BackBox != 0)) && (Zli2->Sele))) && (Doc->appMode == scEditMode)) { wide = Zli2->wide; p->setFillMode(1); @@ -2327,7 +2327,7 @@ } desc = Zli2->ZFo->numDescender * (-Zli2->Siz / 10.0); asce = Zli2->ZFo->numAscent * (Zli2->Siz / 10.0); - if ((((Zli2->Sele) && (Select)) || (((NextBox != 0) || (BackBox != 0)) && (Zli2->Sele))) && (Doc->appMode == EditMode)) + if ((((Zli2->Sele) && (Select)) || (((NextBox != 0) || (BackBox != 0)) && (Zli2->Sele))) && (Doc->appMode == scEditMode)) { wide = Zli2->wide; p->setFillMode(1); @@ -2467,7 +2467,7 @@ { int nCP = CPos - nrc; CPos = nrc; - if ((Doc->appMode == EditMode) && (Tinput)) + if ((Doc->appMode == scEditMode) && (Tinput)) { // OwnPage->Deselect(true); NextBox->CPos = QMAX(nCP, 1); @@ -4678,7 +4678,7 @@ case Polygon: ScApp->view->ToPolyFrame(); break; case PolyLine: ScApp->view->ToBezierFrame(); break; } - ScApp->setAppMode(NormalMode); + ScApp->setAppMode(scNormalMode); } void PageItem::restoreTextFlowing(SimpleState *state, bool isUndo) Index: scribus.cpp =================================================================== RCS file: /cvs/Scribus/scribus/scribus.cpp,v retrieving revision 1.228.2.391 diff -u -r1.228.2.391 scribus.cpp --- scribus.cpp 28 Jun 2005 23:19:54 -0000 1.228.2.391 +++ scribus.cpp 29 Jun 2005 16:45:42 -0000 @@ -1518,7 +1518,7 @@ { if (HaveDoc) { - if (doc->appMode==EditMode) + if (doc->appMode==scEditMode) { if (view->SelItem.count() == 1) { @@ -1681,7 +1681,7 @@ currItem = view->SelItem.at(0); switch (doc->appMode) { - case NormalMode: + case scNormalMode: currItem->Sizing = false; if (doc->SubMode != -1) { @@ -1689,14 +1689,14 @@ doc->Items.remove(currItem->ItemNr); } break; - case LinkFrames: - case UnlinkFrames: - case EditMode: - case Rotation: + case scLinkFrames: + case scUnlinkFrames: + case scEditMode: + case scRotation: view->Deselect(false); - case PanningMode: + case scPanningMode: break; - case DrawBezierLine: + case scDrawBezierLine: currItem->PoLine.resize(currItem->PoLine.size()-2); if (currItem->PoLine.size() < 4) { @@ -1736,17 +1736,17 @@ ButtonState buttonState = k->state(); if ((HaveDoc) && (!view->LE->hasFocus()) && (!view->PGS->PageCombo->hasFocus())) { - if ((doc->appMode != EditMode) && (view->SelItem.count() == 0)) + if ((doc->appMode != scEditMode) && (view->SelItem.count() == 0)) { switch (kk) { case Key_Space: keyrep = false; - if (doc->appMode == PanningMode) - setAppMode(NormalMode); + if (doc->appMode == scPanningMode) + setAppMode(scNormalMode); else { - setAppMode(PanningMode); + setAppMode(scPanningMode); qApp->setOverrideCursor(QCursor(loadIcon("HandC.xpm")), true); } return; @@ -1792,7 +1792,7 @@ PageItem *currItem = view->SelItem.at(0); switch (doc->appMode) { - case NormalMode: + case scNormalMode: switch (kk) { case Key_Backspace: @@ -1869,7 +1869,7 @@ break; } break; - case EditMode: + case scEditMode: int oldPos = currItem->CPos; // 15-mar-2004 jjsa for cursor movement with Shift + Arrow key view->oldCp = currItem->CPos; if (currItem->itemType() == PageItem::ImageFrame) @@ -2781,7 +2781,7 @@ doc->ActiveLayer = 0; HaveDoc++; DocNr++; - doc->appMode = NormalMode; + doc->appMode = scNormalMode; doc->PageColors = Prefs.DColors; doc->loading = true; ScribusWin* w = new ScribusWin(wsp, doc); @@ -3754,8 +3754,8 @@ scrActions["itemConvertToBezierCurve"]->setEnabled(false); scrActions["itemConvertToImageFrame"]->setEnabled(false); scrActions["itemConvertToOutlines"]->setEnabled(false); - scrActions["itemConvertToPolygon"]->setEnabled(!currItem->isTableItem && doc->appMode != EditMode); - scrActions["itemConvertToTextFrame"]->setEnabled(doc->appMode != EditMode); + scrActions["itemConvertToPolygon"]->setEnabled(!currItem->isTableItem && doc->appMode != scEditMode); + scrActions["itemConvertToTextFrame"]->setEnabled(doc->appMode != scEditMode); scrMenuMgr->clearMenu("Style"); scrMenuMgr->addMenuToMenu("Color","Style"); if (currItem->isRaster) @@ -3788,9 +3788,9 @@ scrMenuMgr->setMenuEnabled("ItemShapes", !(currItem->isTableItem && currItem->isSingleSel)); scrMenuMgr->setMenuEnabled("ItemConvertTo", true); scrActions["itemConvertToBezierCurve"]->setEnabled(false); - scrActions["itemConvertToImageFrame"]->setEnabled(doc->appMode != EditMode); - scrActions["itemConvertToOutlines"]->setEnabled(!currItem->isTableItem && doc->appMode != EditMode); - scrActions["itemConvertToPolygon"]->setEnabled(!currItem->isTableItem && doc->appMode != EditMode); + scrActions["itemConvertToImageFrame"]->setEnabled(doc->appMode != scEditMode); + scrActions["itemConvertToOutlines"]->setEnabled(!currItem->isTableItem && doc->appMode != scEditMode); + scrActions["itemConvertToPolygon"]->setEnabled(!currItem->isTableItem && doc->appMode != scEditMode); scrActions["itemConvertToTextFrame"]->setEnabled(false); scrMenuMgr->clearMenu("Style"); scrMenuMgr->addMenuToMenu("Font","Style"); @@ -3819,7 +3819,7 @@ scrActions["toolsLinkTextFrame"]->setEnabled(true); if (doc->MasterP) scrActions["toolsLinkTextFrame"]->setEnabled(false); - if (doc->appMode == EditMode) + if (doc->appMode == scEditMode) { setTBvals(currItem); scrActions["editSelectAll"]->setEnabled(true); @@ -3918,7 +3918,7 @@ scrActions["toolsEditWithStoryEditor"]->setEnabled(true); scrActions["toolsLinkTextFrame"]->setEnabled(false); scrActions["toolsUnlinkTextFrame"]->setEnabled(false); - if (doc->appMode == EditMode) + if (doc->appMode == scEditMode) setTBvals(currItem); else { @@ -3971,11 +3971,11 @@ { scrMenuMgr->setMenuEnabled("ItemShapes", true); scrMenuMgr->setMenuEnabled("ItemConvertTo", true); - scrActions["itemConvertToBezierCurve"]->setEnabled(doc->appMode != EditMode); - scrActions["itemConvertToImageFrame"]->setEnabled(doc->appMode != EditMode); + scrActions["itemConvertToBezierCurve"]->setEnabled(doc->appMode != scEditMode); + scrActions["itemConvertToImageFrame"]->setEnabled(doc->appMode != scEditMode); scrActions["itemConvertToOutlines"]->setEnabled(false); scrActions["itemConvertToPolygon"]->setEnabled(false); - scrActions["itemConvertToTextFrame"]->setEnabled(doc->appMode != EditMode); + scrActions["itemConvertToTextFrame"]->setEnabled(doc->appMode != scEditMode); } scrActions["toolsEditContents"]->setEnabled(false); scrActions["toolsEditWithStoryEditor"]->setEnabled(false); @@ -4513,7 +4513,7 @@ Prefs.AvailFonts.updateFontMap(); doc=new ScribusDoc(&Prefs); doc->is12doc=is12doc; - doc->appMode = NormalMode; + doc->appMode = scNormalMode; doc->HasCMS = false; doc->ActiveLayer = 0; doc->OpenNodes.clear(); @@ -5154,7 +5154,7 @@ ActWin->muster->close(); qApp->processEvents(); } - setAppMode(NormalMode); + setAppMode(scNormalMode); disconnect(fileWatcher, SIGNAL(fileChanged(QString )), view, SLOT(updatePict(QString))); disconnect(fileWatcher, SIGNAL(fileDeleted(QString )), view, SLOT(removePict(QString))); view->close(); @@ -5170,7 +5170,7 @@ ActWin->muster->close(); qApp->processEvents(); } - setAppMode(NormalMode); + setAppMode(scNormalMode); doc->ASaveTimer->stop(); disconnect(doc->ASaveTimer, SIGNAL(timeout()), doc->WinHan, SLOT(slotAutoSave())); disconnect(doc->WinHan, SIGNAL(AutoSaved()), this, SLOT(slotAutoSaved())); @@ -5516,7 +5516,7 @@ } Buffer2 = "<SCRIBUSTEXT>"; currItem = view->SelItem.at(0); - if (doc->appMode == EditMode) + if (doc->appMode == scEditMode) { if ((currItem->itemText.count() == 0) || (!currItem->HasSel)) return; @@ -5603,7 +5603,7 @@ { Buffer2 = "<SCRIBUSTEXT>"; PageItem *currItem = view->SelItem.at(0); - if ((doc->appMode == EditMode) && (currItem->HasSel)) + if ((doc->appMode == scEditMode) && (currItem->HasSel)) { Buffer2 += ""; PageItem *nextItem = currItem; @@ -5683,7 +5683,7 @@ { if (Buffer2.isNull()) return; - if (doc->appMode == EditMode) + if (doc->appMode == scEditMode) { PageItem *currItem = view->SelItem.at(0); if (currItem->HasSel) @@ -5864,7 +5864,7 @@ void ScribusApp::SelectAll() { - if (doc->appMode == EditMode) + if (doc->appMode == scEditMode) { PageItem *currItem = view->SelItem.at(0); PageItem *nextItem = currItem; @@ -5950,12 +5950,12 @@ { if (cc.startsWith("<SCRIBUSELEM")) { -// if (doc->appMode != EditMode) +// if (doc->appMode != scEditMode) scrActions["editPaste"]->setEnabled(true); } else { - if (doc->appMode == EditMode) + if (doc->appMode == scEditMode) scrActions["editPaste"]->setEnabled(true); } } @@ -6548,7 +6548,7 @@ WerkToolsP->PDFTool->setOn(false); WerkToolsP->PDFaTool->setOn(false); //scrActions["toolsMeasurements"]->setOn(false); - setAppMode(NormalMode); + setAppMode(scNormalMode); } void ScribusApp::setAppModeByToggle(bool isOn, int newMode) @@ -6558,7 +6558,7 @@ if (isOn) setAppMode(newMode); else - setAppMode(NormalMode); + setAppMode(scNormalMode); } void ScribusApp::setAppMode(int mode) @@ -6566,23 +6566,23 @@ //disconnect the tools actions so we dont fire them off actionManager->disconnectModeActions(); //set the actions state based on incoming mode - scrActions["toolsSelect"]->setOn(mode==NormalMode); - scrActions["toolsInsertTextFrame"]->setOn(mode==DrawText); - scrActions["toolsInsertImageFrame"]->setOn(mode==DrawPicture); - scrActions["toolsInsertTableFrame"]->setOn(mode==DrawTable); - scrActions["toolsInsertShape"]->setOn(mode==DrawShapes); - scrActions["toolsInsertPolygon"]->setOn(mode==DrawRegularPolygon); - scrActions["toolsInsertLine"]->setOn(mode==DrawLine); - scrActions["toolsInsertBezier"]->setOn(mode==DrawBezierLine); - scrActions["toolsInsertFreehandLine"]->setOn(mode==DrawFreehandLine); - scrActions["toolsRotate"]->setOn(mode==Rotation); - scrActions["toolsZoom"]->setOn(mode==Magnifier); - scrActions["toolsEditContents"]->setOn(mode==EditMode); - scrActions["toolsEditWithStoryEditor"]->setOn(mode==StartStoryEditor); - scrActions["toolsLinkTextFrame"]->setOn(mode==LinkFrames); - scrActions["toolsUnlinkTextFrame"]->setOn(mode==UnlinkFrames); - scrActions["toolsEyeDropper"]->setOn(mode==EyeDropper); - scrActions["toolsCopyProperties"]->setOn(mode==CopyProperties); + scrActions["toolsSelect"]->setOn(mode==scNormalMode); + scrActions["toolsInsertTextFrame"]->setOn(mode==scDrawText); + scrActions["toolsInsertImageFrame"]->setOn(mode==scDrawPicture); + scrActions["toolsInsertTableFrame"]->setOn(mode==scDrawTable); + scrActions["toolsInsertShape"]->setOn(mode==scDrawShapes); + scrActions["toolsInsertPolygon"]->setOn(mode==scDrawRegularPolygon); + scrActions["toolsInsertLine"]->setOn(mode==scDrawLine); + scrActions["toolsInsertBezier"]->setOn(mode==scDrawBezierLine); + scrActions["toolsInsertFreehandLine"]->setOn(mode==scDrawFreehandLine); + scrActions["toolsRotate"]->setOn(mode==scRotation); + scrActions["toolsZoom"]->setOn(mode==scMagnifier); + scrActions["toolsEditContents"]->setOn(mode==scEditMode); + scrActions["toolsEditWithStoryEditor"]->setOn(mode==scStartStoryEditor); + scrActions["toolsLinkTextFrame"]->setOn(mode==scLinkFrames); + scrActions["toolsUnlinkTextFrame"]->setOn(mode==scUnlinkFrames); + scrActions["toolsEyeDropper"]->setOn(mode==scEyeDropper); + scrActions["toolsCopyProperties"]->setOn(mode==scCopyProperties); PageItem *currItem; setActiveWindow(); @@ -6595,21 +6595,21 @@ currItem = 0; int oldMode = doc->appMode; doc->appMode = mode; - if (oldMode == MeasurementTool) + if (oldMode == scMeasurementTool) disconnect(view, SIGNAL(MVals(double, double, double, double, double, double, int )), measurementPalette, SLOT(setValues(double, double, double, double, double, double, int ))); - if (mode != EditMode && doc->CurTimer!=NULL) + if (mode != scEditMode && doc->CurTimer!=NULL) { disconnect(doc->CurTimer, SIGNAL(timeout()), view, SLOT(BlinkCurs())); doc->CurTimer->stop(); delete doc->CurTimer; doc->CurTimer = NULL; } - if (mode!=EditMode && oldMode==EditMode) + if (mode!=scEditMode && oldMode==scEditMode) actionManager->restoreActionShortcutsPostEditMode(); else - if (mode==EditMode && oldMode!=EditMode) + if (mode==scEditMode && oldMode!=scEditMode) actionManager->saveActionShortcutsPreEditMode(); - if (oldMode == EditMode) + if (oldMode == scEditMode) { view->LE->setFocusPolicy(QWidget::ClickFocus); view->PGS->PageCombo->setFocusPolicy(QWidget::ClickFocus); @@ -6626,7 +6626,7 @@ view->horizRuler->repX = false; view->horizRuler->repaint(); } - if (mode == EditMode) + if (mode == scEditMode) { view->LE->setFocusPolicy(QWidget::NoFocus); view->PGS->PageCombo->setFocusPolicy(QWidget::NoFocus); @@ -6671,60 +6671,60 @@ view->RefreshItem(currItem); } } - if (mode == DrawBezierLine) + if (mode == scDrawBezierLine) { if (view->SelItem.count() != 0) view->Deselect(true); view->FirstPoly = true; } - if (mode == EditGradientVectors) + if (mode == scEditGradientVectors) propertiesPalette->Cpal->gradEditButton->setOn(true); - if (mode == MeasurementTool) + if (mode == scMeasurementTool) { measurementPalette->show(); connect(view, SIGNAL(MVals(double, double, double, double, double, double, int)), measurementPalette, SLOT(setValues(double, double, double, double, double, double, int ))); } switch (mode) { - case DrawShapes: + case scDrawShapes: if (view->SelItem.count() != 0) view->Deselect(true); qApp->setOverrideCursor(QCursor(loadIcon("DrawFrame.xpm")), true); break; - case DrawPicture: + case scDrawPicture: if (view->SelItem.count() != 0) view->Deselect(true); qApp->setOverrideCursor(QCursor(loadIcon("DrawImageFrame.xpm")), true); break; - case DrawText: + case scDrawText: if (view->SelItem.count() != 0) view->Deselect(true); qApp->setOverrideCursor(QCursor(loadIcon("DrawTextFrame.xpm")), true); break; - case DrawTable: + case scDrawTable: if (view->SelItem.count() != 0) view->Deselect(true); qApp->setOverrideCursor(QCursor(loadIcon("DrawTable.xpm")), true); break; - case DrawRegularPolygon: + case scDrawRegularPolygon: if (view->SelItem.count() != 0) view->Deselect(true); qApp->setOverrideCursor(QCursor(loadIcon("DrawPolylineFrame.xpm")), true); break; - case Magnifier: + case scMagnifier: if (view->SelItem.count() != 0) view->Deselect(true); qApp->setOverrideCursor(QCursor(loadIcon("LupeZ.xpm")), true); break; - case DrawLine: - case InsertPDFButton: - case InsertPDFTextfield: - case InsertPDFCheckbox: - case InsertPDFCombobox: - case InsertPDFListbox: - case InsertPDFTextAnnotation: - case InsertPDFLinkAnnotation: - case DrawFreehandLine: + case scDrawLine: + case scInsertPDFButton: + case scInsertPDFTextfield: + case scInsertPDFCheckbox: + case scInsertPDFCombobox: + case scInsertPDFListbox: + case scInsertPDFTextAnnotation: + case scInsertPDFLinkAnnotation: + case scDrawFreehandLine: if (view->SelItem.count() != 0) view->Deselect(true); qApp->setOverrideCursor(QCursor(ArrowCursor), true); @@ -6733,7 +6733,7 @@ qApp->setOverrideCursor(QCursor(ArrowCursor), true); break; } - if (mode == DrawShapes) + if (mode == scDrawShapes) { doc->SubMode = WerkTools->SubMode; doc->ShapeValues = WerkTools->ShapeVals; @@ -6743,22 +6743,22 @@ } else doc->SubMode = -1; - if (mode == NormalMode) + if (mode == scNormalMode) { WerkToolsP->PDFTool->setOn(false); WerkToolsP->PDFaTool->setOn(false); propertiesPalette->Cpal->gradEditButton->setOn(false); } - if (mode == LinkFrames) + if (mode == scLinkFrames) doc->ElemToLink = view->SelItem.at(0); - if ((mode == LinkFrames) || (mode == UnlinkFrames)) + if ((mode == scLinkFrames) || (mode == scUnlinkFrames)) view->updateContents(); - if (mode == StartStoryEditor) + if (mode == scStartStoryEditor) { slotStoryEditor(); slotSelect(); } - if (mode == EyeDropper) + if (mode == scEyeDropper) { grabMouse(); //grabKeyboard(); @@ -6768,7 +6768,7 @@ releaseMouse(); //releaseKeyboard(); } - if (mode == CopyProperties) + if (mode == scCopyProperties) { if (view->SelItem.count() != 0) { @@ -7281,7 +7281,7 @@ currItem = view->SelItem.at(0); if ((currItem->itemType() == PageItem::TextFrame) || (currItem->itemType() == PageItem::PathText)) { - if ((doc->appMode == EditMode) && (currItem->itemText.count() != 0)) + if ((doc->appMode == scEditMode) && (currItem->itemText.count() != 0)) { la = currItem->itemText.at(QMIN(currItem->CPos, static_cast<int>(currItem->itemText.count()-1)))->ccolor; lb = currItem->itemText.at(QMIN(currItem->CPos, static_cast<int>(currItem->itemText.count()-1)))->cshade; @@ -8172,7 +8172,7 @@ { //reset the appMode so we restore our tools shortcuts double UmReFaktor; - setAppMode(NormalMode); + setAppMode(scNormalMode); bool zChange = false; Preferences *dia = new Preferences(this, &Prefs); if (dia->exec()) @@ -10695,7 +10695,7 @@ void ScribusApp::SearchText() { PageItem *currItem = view->SelItem.at(0); - setAppMode(EditMode); + setAppMode(scEditMode); currItem->CPos = 0; SearchReplace* dia = new SearchReplace(this, doc, &Prefs, currItem); connect(dia, SIGNAL(NewFont(QString)), this, SLOT(SetNewFont(QString))); @@ -10757,7 +10757,7 @@ if ((HaveDoc) && (view->SelItem.count() != 0)) { PageItem *currItem = view->SelItem.at(0); - if ((currItem->itemType() == PageItem::TextFrame) && (doc->appMode == EditMode)) + if ((currItem->itemType() == PageItem::TextFrame) && (doc->appMode == scEditMode)) { CharSelect *dia = new CharSelect(this, currItem, this); dia->exec(); @@ -10824,7 +10824,7 @@ bool sendToSuper=true; if (HaveDoc) { - if (doc->appMode == EyeDropper) + if (doc->appMode == scEyeDropper) { releaseMouse(); //releaseKeyboard(); @@ -10891,7 +10891,7 @@ } //propertiesPalette->Cpal->SetColors(ScApp->doc->PageColors); //propertiesPalette->updateCList(); - setAppMode(NormalMode); + setAppMode(scNormalMode); } } if (sendToSuper) Index: scribusstructs.h =================================================================== RCS file: /cvs/Scribus/scribus/Attic/scribusstructs.h,v retrieving revision 1.1.2.68 diff -u -r1.1.2.68 scribusstructs.h --- scribusstructs.h 12 Jun 2005 12:31:35 -0000 1.1.2.68 +++ scribusstructs.h 29 Jun 2005 16:45:41 -0000 @@ -553,33 +553,33 @@ enum AppMode { - NormalMode, - DrawShapes, - StartStoryEditor, - DrawPicture, - DrawText, - Magnifier, - EditMode, - DrawLine, - Rotation, - LinkFrames, - UnlinkFrames, - DrawRegularPolygon, - DrawBezierLine, - InsertPDFButton, - InsertPDFTextfield, - InsertPDFCheckbox, - InsertPDFCombobox, - InsertPDFListbox, - InsertPDFTextAnnotation, - InsertPDFLinkAnnotation, - DrawFreehandLine, - DrawTable, - PanningMode, - MeasurementTool, - EditGradientVectors, - EyeDropper, - CopyProperties + scNormalMode, + scDrawShapes, + scStartStoryEditor, + scDrawPicture, + scDrawText, + scMagnifier, + scEditMode, + scDrawLine, + scRotation, + scLinkFrames, + scUnlinkFrames, + scDrawRegularPolygon, + scDrawBezierLine, + scInsertPDFButton, + scInsertPDFTextfield, + scInsertPDFCheckbox, + scInsertPDFCombobox, + scInsertPDFListbox, + scInsertPDFTextAnnotation, + scInsertPDFLinkAnnotation, + scDrawFreehandLine, + scDrawTable, + scPanningMode, + scMeasurementTool, + scEditGradientVectors, + scEyeDropper, + scCopyProperties }; struct AlignObjs Index: scribusview.cpp =================================================================== RCS file: /cvs/Scribus/scribus/scribusview.cpp,v retrieving revision 1.76.2.225 diff -u -r1.76.2.225 scribusview.cpp --- scribusview.cpp 26 Jun 2005 21:20:48 -0000 1.76.2.225 +++ scribusview.cpp 29 Jun 2005 16:45:42 -0000 @@ -289,7 +289,7 @@ else currItem = SelItem.at(0); } - if ((((Doc->appMode == LinkFrames) || (Doc->appMode == UnlinkFrames)) + if ((((Doc->appMode == scLinkFrames) || (Doc->appMode == scUnlinkFrames)) && (currItem->itemType() == PageItem::TextFrame)) || (Doc->guidesSettings.linkShown)) { PageItem *nextItem = currItem; @@ -437,9 +437,9 @@ paintGroupRect(); } } - if (Doc->appMode == EditMode) + if (Doc->appMode == scEditMode) slotDoCurs(true); - if (Doc->appMode == EditGradientVectors) + if (Doc->appMode == scEditGradientVectors) { PageItem *currItem = SelItem.at(0); QPainter p; @@ -636,7 +636,7 @@ if (linkedFramesToShow.find(nextItem) == -1) linkedFramesToShow.append(nextItem); } - if ((Doc->appMode == EditMode) && (currItem->Select) && (currItem->itemType() == PageItem::TextFrame)) + if ((Doc->appMode == scEditMode) && (currItem->Select) && (currItem->itemType() == PageItem::TextFrame)) { //CB 230305 Stop redrawing the horizontal ruler if it hasnt changed when typing text!!! if ((qRound(horizRuler->ItemPos*10000) != qRound((currItem->Xpos - Doc->ScratchLeft)*10000)) || (qRound(horizRuler->ItemEndPos*10000) != qRound(((currItem->Xpos+currItem->Width) - Doc->ScratchLeft)*10000))) @@ -1157,9 +1157,9 @@ emit EndNodeEdit(); return; } - if ((GroupSel) || (Doc->appMode != NormalMode)) + if ((GroupSel) || (Doc->appMode != scNormalMode)) { - if ((GroupSel) && (Doc->appMode == NormalMode)) + if ((GroupSel) && (Doc->appMode == scNormalMode)) { if (GetItem(&currItem)) { @@ -1191,12 +1191,12 @@ if ((currItem->itemType() == PageItem::ImageFrame) && (currItem->Pfile=="")) emit LoadPic(); else - emit Amode(EditMode); + emit Amode(scEditMode); } else if (currItem->itemType() == PageItem::TextFrame) { - emit currItem->isAnnotation ? AnnotProps() : Amode(EditMode); + emit currItem->isAnnotation ? AnnotProps() : Amode(scEditMode); contentsMousePressEvent(m); } } @@ -1260,11 +1260,11 @@ return; } } - if (Doc->appMode == EditGradientVectors) + if (Doc->appMode == scEditGradientVectors) return; - if (Doc->appMode == CopyProperties) + if (Doc->appMode == scCopyProperties) return; - if (Doc->appMode == MeasurementTool) + if (Doc->appMode == scMeasurementTool) { QPainter p; p.begin(viewport()); @@ -1277,9 +1277,9 @@ //emit PaintingDone(); return; } - if (Doc->appMode == PanningMode) + if (Doc->appMode == scPanningMode) return; - if (Doc->appMode == DrawTable) + if (Doc->appMode == scDrawTable) { if ((SelItem.count() == 0) && (HaveSelRect) && (!MidButt)) { @@ -1315,7 +1315,7 @@ { p.drawRect(AreaR); p.end(); - Doc->appMode = NormalMode; + Doc->appMode = scNormalMode; emit PaintingDone(); return; } @@ -1324,7 +1324,7 @@ { p.drawRect(AreaR); p.end(); - Doc->appMode = NormalMode; + Doc->appMode = scNormalMode; emit PaintingDone(); delete dia; return; @@ -1381,15 +1381,15 @@ if (UndoManager::undoEnabled()) undoManager->commit(); } - Doc->appMode = NormalMode; + Doc->appMode = scNormalMode; emit PaintingDone(); emit DocChanged(); updateContents(); return; } - if (Doc->appMode == DrawFreehandLine) + if (Doc->appMode == scDrawFreehandLine) { - Doc->appMode = NormalMode; + Doc->appMode = scNormalMode; if (RecordP.size() > 1) { uint z = PaintPolyLine(0, 0, 1, 1, Doc->toolSettings.dWidth, "None", Doc->toolSettings.dPenLine); @@ -1507,7 +1507,7 @@ updateContents(); return; } - if ((!GetItem(&currItem)) && (m->button() == RightButton) && (!Doc->DragP) && (Doc->appMode == NormalMode)) + if ((!GetItem(&currItem)) && (m->button() == RightButton) && (!Doc->DragP) && (Doc->appMode == scNormalMode)) { QPopupMenu *pmen = new QPopupMenu(); if (ScApp->Buffer2.startsWith("<SCRIBUSELEM")) @@ -1536,7 +1536,7 @@ delete pmen; return; } - if ((Doc->appMode != Magnifier) && (!Doc->EditClip) && (Doc->appMode != DrawBezierLine)) + if ((Doc->appMode != scMagnifier) && (!Doc->EditClip) && (Doc->appMode != scDrawBezierLine)) { if ((GetItem(&currItem)) && (m->button() == RightButton) && (!Doc->DragP)) { @@ -1734,7 +1734,7 @@ ScApp->scrActions["itemLowerToBottom"]->addTo(pmenLevel); } } - if (Doc->appMode != EditMode) //Create convertTo Menu + if (Doc->appMode != scEditMode) //Create convertTo Menu { bool insertConvertToMenu=false; if (currItem->itemType() == PageItem::TextFrame) @@ -1771,7 +1771,7 @@ ScApp->scrActions["editCut"]->addTo(pmen); if (!(currItem->isTableItem && currItem->isSingleSel)) ScApp->scrActions["editCopy"]->addTo(pmen); - if ((Doc->appMode == EditMode) && (ScApp->Buffer2.startsWith("<SCRIBUSTEXT")) && (currItem->itemType() == PageItem::TextFrame)) + if ((Doc->appMode == scEditMode) && (ScApp->Buffer2.startsWith("<SCRIBUSTEXT")) && (currItem->itemType() == PageItem::TextFrame)) ScApp->scrActions["editPaste"]->addTo(pmen); if (!currItem->locked() && (Doc->appMode != 7) && (!(currItem->isTableItem && currItem->isSingleSel))) pmen->insertItem( tr("&Delete"), this, SLOT(DeleteItem())); @@ -1790,20 +1790,20 @@ delete pmenPDF; delete pmenResolution; } - if (Doc->appMode == LinkFrames) + if (Doc->appMode == scLinkFrames) { updateContents(); if (Doc->ElemToLink != 0) return; else { - Doc->appMode = NormalMode; + Doc->appMode = scNormalMode; qApp->setOverrideCursor(QCursor(ArrowCursor), true); emit PaintingDone(); return; } } - if (Doc->appMode == DrawRegularPolygon) + if (Doc->appMode == scDrawRegularPolygon) { currItem = SelItem.at(0); FPoint np1 = FPoint(m->x() / Scale, m->y() / Scale); @@ -1836,7 +1836,7 @@ currItem->OwnPage = OnPage(currItem); updateContents(); } - if (Doc->appMode == DrawLine) + if (Doc->appMode == scDrawLine) { currItem = SelItem.at(0); QPainter p; @@ -2553,11 +2553,11 @@ } HaveSelRect = false; } - if (Doc->appMode != EditMode) + if (Doc->appMode != scEditMode) { - if (Doc->appMode == Rotation) + if (Doc->appMode == scRotation) Doc->RotMode = RotMode; - Doc->appMode = NormalMode; + Doc->appMode = scNormalMode; qApp->setOverrideCursor(QCursor(ArrowCursor), true); emit PaintingDone(); } @@ -2580,7 +2580,7 @@ } } } - if ((Doc->appMode == EditMode) && !HanMove) + if ((Doc->appMode == scEditMode) && !HanMove) { currItem = SelItem.at(0); uint a; @@ -2598,7 +2598,7 @@ else emit DocChanged(); } - if (Doc->appMode == Magnifier) + if (Doc->appMode == scMagnifier) { double sc = Scale; if (HaveSelRect) @@ -2623,7 +2623,7 @@ { SetCPo(Mxp, Myp); HaveSelRect = false; - Doc->appMode = NormalMode; + Doc->appMode = scNormalMode; qApp->setOverrideCursor(QCursor(ArrowCursor), true); emit PaintingDone(); } @@ -2636,7 +2636,7 @@ if (sc == Scale) { HaveSelRect = false; - Doc->appMode = NormalMode; + Doc->appMode = scNormalMode; qApp->setOverrideCursor(QCursor(ArrowCursor), true); emit PaintingDone(); } @@ -2644,7 +2644,7 @@ qApp->setOverrideCursor(QCursor(loadIcon("LupeZ.xpm")), true); } } - if ((Doc->appMode == DrawBezierLine) && (m->button() == LeftButton)) + if ((Doc->appMode == scDrawBezierLine) && (m->button() == LeftButton)) { currItem = SelItem.at(0); currItem->ClipEdited = true; @@ -2696,7 +2696,7 @@ } p.end(); } - if ((Doc->appMode == DrawBezierLine) && (m->button() == RightButton)) + if ((Doc->appMode == scDrawBezierLine) && (m->button() == RightButton)) { currItem = SelItem.at(0); currItem->PoLine.resize(currItem->PoLine.size()-2); @@ -2714,7 +2714,7 @@ AdjustItemSize(currItem); currItem->ContourLine = currItem->PoLine.copy(); } - Doc->appMode = NormalMode; + Doc->appMode = scNormalMode; qApp->setOverrideCursor(QCursor(ArrowCursor), true); emit PaintingDone(); emit DocChanged(); @@ -2737,7 +2737,7 @@ for (uint i = 0; i < SelItem.count(); ++i) SelItem.at(i)->checkChanges(); - if (_itemCreationTransactionStarted && Doc->appMode != DrawBezierLine) + if (_itemCreationTransactionStarted && Doc->appMode != scDrawBezierLine) { PageItem *ite = SelItem.at(0); if (ite!=NULL) @@ -2814,7 +2814,7 @@ else BlockLeave = false; } */ - if (Mpressed && (Doc->appMode == EditGradientVectors)) + if (Mpressed && (Doc->appMode == scEditGradientVectors)) { PageItem *currItem = SelItem.at(0); newX = m->x(); @@ -2841,7 +2841,7 @@ currItem->Width * Doc->unitRatio, currItem->Height * Doc->unitRatio); return; } - if (Mpressed && (Doc->appMode == MeasurementTool)) + if (Mpressed && (Doc->appMode == scMeasurementTool)) { newX = m->x(); newY = m->y(); @@ -2861,7 +2861,7 @@ emit MVals(dxp, dyp, nxp, nyp, -xy2Deg(newX/sc - Dxp*sc, newY/sc - Dyp/sc), sqrt(pow(newX/sc - Dxp/sc,2)+pow(newY/sc - Dyp/sc,2)), Doc->docUnitIndex); return; } - if (Mpressed && (Doc->appMode == PanningMode)) + if (Mpressed && (Doc->appMode == scPanningMode)) { int scroX = m->x() - qRound((Mxp * sc)); int scroY = m->y() - qRound((Myp * sc)); @@ -2870,7 +2870,7 @@ Myp = static_cast<int>((m->y()-scroY)/sc); return; } - if (Mpressed && (Doc->appMode == DrawFreehandLine)) + if (Mpressed && (Doc->appMode == scDrawFreehandLine)) { newX = m->x(); newY = m->y(); @@ -2899,7 +2899,7 @@ { newX = static_cast<int>(m->x()/sc); newY = static_cast<int>(m->y()/sc); - if ((Mpressed) && (m->state() == RightButton) && (!Doc->DragP) && (Doc->appMode == NormalMode) && (!currItem->locked()) && (!(currItem->isTableItem && currItem->isSingleSel))) + if ((Mpressed) && (m->state() == RightButton) && (!Doc->DragP) && (Doc->appMode == scNormalMode) && (!currItem->locked()) && (!(currItem->isTableItem && currItem->isSingleSel))) { if ((abs(Dxp - newX) > 10) || (abs(Dyp - newY) > 10)) { @@ -2924,7 +2924,7 @@ } if (Doc->DragP) return; - if (Mpressed && (Doc->appMode == Rotation)) + if (Mpressed && (Doc->appMode == scRotation)) { double newW = xy2Deg(m->x()/sc - RCenter.x(), m->y()/sc - RCenter.y()); if (GroupSel) @@ -2934,7 +2934,7 @@ oldW = newW; emit DocChanged(); } - if (Doc->appMode == DrawBezierLine) + if (Doc->appMode == scDrawBezierLine) { p.begin(viewport()); ToView(&p); @@ -2981,7 +2981,7 @@ Mxp = newX; Myp = newY; } - if (Mpressed && (Doc->appMode == DrawRegularPolygon)) + if (Mpressed && (Doc->appMode == scDrawRegularPolygon)) { p.begin(viewport()); ToView(&p); @@ -3007,7 +3007,7 @@ Mxp = newX; Myp = newY; } - if (Mpressed && (Doc->appMode == DrawLine)) + if (Mpressed && (Doc->appMode == scDrawLine)) { p.begin(viewport()); ToView(&p); @@ -3026,7 +3026,7 @@ Mxp = newX; Myp = newY; } - if (Mpressed && (Doc->appMode == EditMode) && (!HanMove)) + if (Mpressed && (Doc->appMode == scEditMode) && (!HanMove)) { if (currItem->itemType() == PageItem::ImageFrame) { @@ -3063,7 +3063,7 @@ emit currItem->HasSel ? HasTextSel() : HasNoTextSel(); } } - if (Mpressed && (m->state() & LeftButton) && ((Doc->appMode == NormalMode) || ((Doc->appMode == EditMode) && HanMove)) && (!currItem->locked())) + if (Mpressed && (m->state() & LeftButton) && ((Doc->appMode == scNormalMode) || ((Doc->appMode == scEditMode) && HanMove)) && (!currItem->locked())) { if (Doc->EditClip) { @@ -3422,9 +3422,9 @@ } } } - if ((!Mpressed) && (Doc->appMode != DrawBezierLine)) + if ((!Mpressed) && (Doc->appMode != scDrawBezierLine)) { - if (Doc->appMode == Magnifier) + if (Doc->appMode == scMagnifier) { qApp->setOverrideCursor(QCursor(loadIcon("LupeZ.xpm")), true); return; @@ -3435,7 +3435,7 @@ double gx, gy, gh, gw; getGroupRect(&gx, &gy, &gw, &gh); if ((QRect(static_cast<int>(gx), static_cast<int>(gy), static_cast<int>(gw), static_cast<int>(gh)).intersects(mpo)) - && ((Doc->appMode == NormalMode) || (Doc->appMode == Rotation))) + && ((Doc->appMode == scNormalMode) || (Doc->appMode == scRotation))) { int how = 0; QMap<double,int> distance; @@ -3490,26 +3490,26 @@ break; } } - if (Doc->appMode == Rotation) + if (Doc->appMode == scRotation) qApp->setOverrideCursor(QCursor(loadIcon("Rotieren2.xpm")), true); } else { switch (Doc->appMode) { - case DrawShapes: + case scDrawShapes: qApp->setOverrideCursor(QCursor(loadIcon("DrawFrame.xpm")), true); break; - case DrawPicture: + case scDrawPicture: qApp->setOverrideCursor(QCursor(loadIcon("DrawImageFrame.xpm")), true); break; - case DrawText: + case scDrawText: qApp->setOverrideCursor(QCursor(loadIcon("DrawTextFrame.xpm")), true); break; - case DrawTable: + case scDrawTable: qApp->setOverrideCursor(QCursor(loadIcon("DrawTable.xpm")), true); break; - case DrawRegularPolygon: + case scDrawRegularPolygon: qApp->setOverrideCursor(QCursor(loadIcon("DrawPolylineFrame.xpm")), true); break; default: @@ -3584,15 +3584,15 @@ } } if ((QRegion(p.xForm(QPointArray(QRect(-3, -3, static_cast<int>(currItem->Width+6), static_cast<int>(currItem->Height+6))))).contains(mpo)) - && ((Doc->appMode == NormalMode) || (Doc->appMode == Rotation) || (Doc->appMode == EditMode))) + && ((Doc->appMode == scNormalMode) || (Doc->appMode == scRotation) || (Doc->appMode == scEditMode))) { tx = p.xForm(QRect(0, 0, static_cast<int>(currItem->Width), static_cast<int>(currItem->Height))); if ((tx.intersects(mpo)) && (!currItem->locked())) { qApp->setOverrideCursor(QCursor(SizeAllCursor), true); - if (Doc->appMode == Rotation) + if (Doc->appMode == scRotation) qApp->setOverrideCursor(QCursor(loadIcon("Rotieren2.xpm")), true); - if (Doc->appMode == EditMode) + if (Doc->appMode == scEditMode) { if (currItem->itemType() == PageItem::TextFrame) qApp->setOverrideCursor(QCursor(ibeamCursor), true); @@ -3607,19 +3607,19 @@ { switch (Doc->appMode) { - case DrawShapes: + case scDrawShapes: qApp->setOverrideCursor(QCursor(loadIcon("DrawFrame.xpm")), true); break; - case DrawPicture: + case scDrawPicture: qApp->setOverrideCursor(QCursor(loadIcon("DrawImageFrame.xpm")), true); break; - case DrawText: + case scDrawText: qApp->setOverrideCursor(QCursor(loadIcon("DrawTextFrame.xpm")), true); break; - case DrawTable: + case scDrawTable: qApp->setOverrideCursor(QCursor(loadIcon("DrawTable.xpm")), true); break; - case DrawRegularPolygon: + case scDrawRegularPolygon: qApp->setOverrideCursor(QCursor(loadIcon("DrawPolylineFrame.xpm")), true); break; default: @@ -3649,7 +3649,7 @@ SeRy = newY; HaveSelRect = true; } - if ((Doc->guidesSettings.guidesShown) && (Doc->appMode == NormalMode) && (!Doc->GuideLock) && (OnPage(m->x()/sc, m->y()/sc) != -1) && (!GetItem(&currItem))) + if ((Doc->guidesSettings.guidesShown) && (Doc->appMode == scNormalMode) && (!Doc->GuideLock) && (OnPage(m->x()/sc, m->y()/sc) != -1) && (!GetItem(&currItem))) { if (Doc->currentPage->YGuides.count() != 0) { @@ -3719,7 +3719,7 @@ Mxp = qRound(m->x()/Scale); Myp = qRound(m->y()/Scale); mpo = QRect(m->x()-Doc->guidesSettings.grabRad, m->y()-Doc->guidesSettings.grabRad, Doc->guidesSettings.grabRad*2, Doc->guidesSettings.grabRad*2); - if (Doc->appMode != EditMode) + if (Doc->appMode != scEditMode) { Rxp = ApplyGrid(QPoint(Mxp, Myp)).x(); Rxpd = Mxp - Rxp; @@ -3735,7 +3735,7 @@ } switch (Doc->appMode) { - case NormalMode: + case scNormalMode: if ((Doc->EditClip) && (SelItem.count() != 0)) { currItem = SelItem.at(0); @@ -4106,7 +4106,7 @@ Dyp = Myp; } break; - case DrawShapes: + case scDrawShapes: selectPage(m); switch (Doc->SubMode) { @@ -4127,26 +4127,26 @@ } emit HaveSel(PageItem::Polygon); break; - case DrawPicture: + case scDrawPicture: selectPage(m); z = PaintPict(Rxp, Ryp, 1+Rxpd, 1+Rypd); SetupDraw(z); emit HaveSel(PageItem::ImageFrame); break; - case DrawText: + case scDrawText: selectPage(m); z = PaintText(Rxp, Ryp, 1+Rxpd, 1+Rypd, Doc->toolSettings.dWidth, Doc->toolSettings.dPenText); SetupDraw(z); emit HaveSel(PageItem::TextFrame); break; - case Magnifier: + case scMagnifier: Mpressed = true; if ((m->state() == ShiftButton) || (m->button() == RightButton)) Magnify = false; else Magnify = true; break; - case EditMode: + case scEditMode: HowTo = 0; HanMove = false; // slotDoCurs(false); @@ -4172,7 +4172,7 @@ { Deselect(true); slotDoCurs(true); - emit Amode(NormalMode); + emit Amode(scNormalMode); return; } currItem = SelItem.at(0); @@ -4185,7 +4185,7 @@ { currItem = SelItem.at(0); if ((currItem->itemType() == PageItem::TextFrame) || (currItem->itemType() == PageItem::ImageFrame)) - emit Amode(EditMode); + emit Amode(scEditMode); else { emit PaintingDone(); @@ -4241,7 +4241,7 @@ } } break; - case DrawLine: + case scDrawLine: selectPage(m); z = PaintLine(Rxp, Ryp, 1+Rxpd, Rypd, Doc->toolSettings.dWidthLine, Doc->toolSettings.dPenLine); currItem = Doc->Items.at(z); @@ -4259,7 +4259,7 @@ emit ItemTrans(currItem->fillTransparency(), currItem->lineTransparency()); emit HaveSel(PageItem::Line); break; - case Rotation: + case scRotation: if (GetItem(&currItem)) { RotMode = Doc->RotMode; @@ -4315,7 +4315,7 @@ } } break; - case LinkFrames: + case scLinkFrames: currItem = Doc->ElemToLink; if (currItem==NULL) break; @@ -4349,7 +4349,7 @@ else Doc->DocItems = Doc->Items; break; - case UnlinkFrames: + case scUnlinkFrames: SeleItem(m); if (GetItem(&currItem)) { @@ -4380,7 +4380,7 @@ else Doc->DocItems = Doc->Items; break; - case DrawRegularPolygon: + case scDrawRegularPolygon: { selectPage(m); z = PaintPoly(Rxp, Ryp, 1+Rxpd, 1+Rypd, Doc->toolSettings.dWidth, Doc->toolSettings.dBrush, Doc->toolSettings.dPen); @@ -4413,7 +4413,7 @@ emit HaveSel(PageItem::Polygon); break; } - case DrawBezierLine: + case scDrawBezierLine: if (m->button() == RightButton) break; if (FirstPoly) @@ -4455,40 +4455,40 @@ emit ItemTrans(currItem->fillTransparency(), currItem->lineTransparency()); emit HaveSel(PageItem::PolyLine); break; - case InsertPDFButton: - case InsertPDFTextfield: - case InsertPDFCheckbox: - case InsertPDFCombobox: - case InsertPDFListbox: - case InsertPDFTextAnnotation: - case InsertPDFLinkAnnotation: + case scInsertPDFButton: + case scInsertPDFTextfield: + case scInsertPDFCheckbox: + case scInsertPDFCombobox: + case scInsertPDFListbox: + case scInsertPDFTextAnnotation: + case scInsertPDFLinkAnnotation: selectPage(m); z = PaintText(Rxp, Ryp, 1+Rxpd, 1+Rypd, Doc->toolSettings.dWidth, Doc->toolSettings.dPenText); currItem = Doc->Items.at(z); currItem->isAnnotation = true; switch (Doc->appMode) { - case InsertPDFButton: + case scInsertPDFButton: currItem->AnType = 2; currItem->AnFlag = 65536; break; - case InsertPDFTextfield: + case scInsertPDFTextfield: currItem->AnType = 3; break; - case InsertPDFCheckbox: + case scInsertPDFCheckbox: currItem->AnType = 4; break; - case InsertPDFCombobox: + case scInsertPDFCombobox: currItem->AnType = 5; currItem->AnFlag = 131072; break; - case InsertPDFListbox: + case scInsertPDFListbox: currItem->AnType = 6; break; - case InsertPDFTextAnnotation: + case scInsertPDFTextAnnotation: currItem->AnType = 10; break; - case InsertPDFLinkAnnotation: + case scInsertPDFLinkAnnotation: currItem->AnType = 11; currItem->AnZiel = Doc->currentPage->PageNr; currItem->AnAction = "0 0"; @@ -4498,17 +4498,17 @@ SetupDraw(z); emit HaveSel(PageItem::TextFrame); break; - case DrawFreehandLine: + case scDrawFreehandLine: RecordP.resize(0); Deselect(false); break; - case DrawTable: + case scDrawTable: Deselect(false); break; - case PanningMode: + case scPanningMode: break; - case MeasurementTool: - case EditGradientVectors: + case scMeasurementTool: + case scEditGradientVectors: Mpressed = true; qApp->setOverrideCursor(QCursor(CrossCursor), true); Dxp = m->x(); @@ -4516,7 +4516,7 @@ Mxp = m->x(); Myp = m->y(); break; - case CopyProperties: + case scCopyProperties: SeleItem(m); if (GetItem(&currItem)) { @@ -4550,7 +4550,7 @@ else { Doc->ElemToLink = NULL; - Doc->appMode = NormalMode; + Doc->appMode = scNormalMode; emit PaintingDone(); } break; @@ -4924,7 +4924,7 @@ currItem->Xpos = qRound(currItem->Xpos / Doc->guidesSettings.minorGrid) * Doc->guidesSettings.minorGrid; currItem->Ypos = qRound(currItem->Ypos / Doc->guidesSettings.minorGrid) * Doc->guidesSettings.minorGrid; } - if ((Doc->SnapGuides) && (!Imoved) && (Doc->appMode == NormalMode) && (!Doc->EditClip) && (!fromMP)) + if ((Doc->SnapGuides) && (!Imoved) && (Doc->appMode == scNormalMode) && (!Doc->EditClip) && (!fromMP)) SnapToGuides(currItem); if ((currItem->Xpos != oldx) || (currItem->Ypos != oldy)) retw = true; @@ -5000,7 +5000,7 @@ void ScribusView::UpdateClip(PageItem* currItem) { - if (Doc->appMode == DrawBezierLine) + if (Doc->appMode == scDrawBezierLine) return; int ph = static_cast<int>(QMAX(1.0, currItem->Pwidth / 2.0)); switch (currItem->itemType()) @@ -6796,7 +6796,7 @@ tx2 = p->xForm(QPoint(0, static_cast<int>(currItem->Height))); if (mpo.contains(tx) || mpo.contains(tx2)) { - if (Doc->appMode == Rotation) + if (Doc->appMode == scRotation) qApp->setOverrideCursor(QCursor(loadIcon("Rotieren2.xpm")), true); else { @@ -6831,7 +6831,7 @@ tx2 = p->xForm(QPoint(0, 0)); if (mpo.contains(tx) || mpo.contains(tx2)) { - if (Doc->appMode == Rotation) + if (Doc->appMode == scRotation) qApp->setOverrideCursor(QCursor(loadIcon("Rotieren2.xpm")), true); else { @@ -7141,7 +7141,7 @@ { if (!currItem->Select) { - if ((m->state() != ShiftButton) || (Doc->appMode == LinkFrames) || (Doc->appMode == UnlinkFrames)) + if ((m->state() != ShiftButton) || (Doc->appMode == scLinkFrames) || (Doc->appMode == scUnlinkFrames)) Deselect(false); if (currItem->Groups.count() != 0) { @@ -7280,7 +7280,7 @@ { if (!currItem->Select) { - if ((m->state() != ShiftButton) || (Doc->appMode == LinkFrames) || (Doc->appMode == UnlinkFrames)) + if ((m->state() != ShiftButton) || (Doc->appMode == scLinkFrames) || (Doc->appMode == scUnlinkFrames)) Deselect(false); if (currItem->Groups.count() != 0) { @@ -7381,7 +7381,7 @@ } currItem = Doc->Items.prev(); } - if ((Doc->guidesSettings.guidesShown) && (Doc->appMode == NormalMode) && (!Doc->GuideLock) && (OnPage(Mxp, Myp) != -1)) + if ((Doc->guidesSettings.guidesShown) && (Doc->appMode == scNormalMode) && (!Doc->GuideLock) && (OnPage(Mxp, Myp) != -1)) { GxM = -1; GyM = -1; @@ -7597,7 +7597,7 @@ SelItem.append(currItem); currItem->paintObj(); Imoved = true; - Doc->appMode = NormalMode; + Doc->appMode = scNormalMode; emit DocChanged(); currItem->Sizing = currItem->itemType() == PageItem::Line ? false : true; EmitValues(currItem); @@ -7618,7 +7618,7 @@ emit ItemTextUSval(currItem->ExtraV); emit SetDistValues(currItem->Extra, currItem->TExtra, currItem->BExtra, currItem->RExtra); emit ItemTextCols(currItem->Cols, currItem->ColGap); - if (Doc->appMode != EditMode) + if (Doc->appMode != scEditMode) { emit ItemTextAbs(currItem->textAlignment); emit ItemTextFont(currItem->IFont); @@ -9735,7 +9735,7 @@ for (uint aa = 0; aa < SelItem.count(); ++aa) { PageItem *currItem = SelItem.at(aa); - if (Doc->appMode == NormalMode) + if (Doc->appMode == scNormalMode) { currItem->setFont(fon); if (currItem->itemText.count() != 0) @@ -9752,7 +9752,7 @@ RefreshItem(currItem); } } - if ((currItem->HasSel) && (Doc->appMode == EditMode)) + if ((currItem->HasSel) && (Doc->appMode == scEditMode)) { if (currItem->itemText.count() != 0) { @@ -9809,11 +9809,11 @@ currItem = SelItem.at(a); if ((currItem->itemType() == PageItem::TextFrame) || (currItem->itemType() == PageItem::PathText)) { - if (Doc->appMode != EditMode) + if (Doc->appMode != scEditMode) currItem->setFontFillColor(farbe); for (uint i=0; i<currItem->itemText.count(); ++i) { - if (Doc->appMode == EditMode) + if (Doc->appMode == scEditMode) { if (currItem->itemText.at(i)->cselect) currItem->itemText.at(i)->ccolor = farbe; @@ -9843,11 +9843,11 @@ currItem = SelItem.at(a); if (currItem->itemType() == PageItem::TextFrame) { - if (Doc->appMode != EditMode) + if (Doc->appMode != scEditMode) currItem->setFontFillShade(sha); for (uint i=0; i<currItem->itemText.count(); ++i) { - if (Doc->appMode == EditMode) + if (Doc->appMode == scEditMode) { if (currItem->itemText.at(i)->cselect) currItem->itemText.at(i)->cshade = sha; @@ -9879,11 +9879,11 @@ currItem = SelItem.at(a); if ((currItem->itemType() == PageItem::TextFrame) || (currItem->itemType() == PageItem::PathText)) { - if (Doc->appMode != EditMode) + if (Doc->appMode != scEditMode) currItem->setFontStrokeColor(farbe); for (uint i=0; i<currItem->itemText.count(); ++i) { - if (Doc->appMode == EditMode) + if (Doc->appMode == scEditMode) { if (currItem->itemText.at(i)->cselect) currItem->itemText.at(i)->cstroke = farbe; @@ -9912,11 +9912,11 @@ currItem = SelItem.at(a); if (currItem->itemType() == PageItem::TextFrame) { - if (Doc->appMode != EditMode) + if (Doc->appMode != scEditMode) currItem->setFontStrokeShade(sha); for (uint i=0; i<currItem->itemText.count(); ++i) { - if (Doc->appMode == EditMode) + if (Doc->appMode == scEditMode) { if (currItem->itemText.at(i)->cselect) currItem->itemText.at(i)->cshade2 = sha; @@ -9944,11 +9944,11 @@ currItem = SelItem.at(a); if ((currItem->itemType() == PageItem::TextFrame) || (currItem->itemType() == PageItem::PathText)) { - if (Doc->appMode != EditMode) + if (Doc->appMode != scEditMode) currItem->setFontHeight(sha); for (uint i=0; i<currItem->itemText.count(); ++i) { - if (Doc->appMode == EditMode) + if (Doc->appMode == scEditMode) { if (currItem->itemText.at(i)->cselect) currItem->itemText.at(i)->cscalev = sha; @@ -9977,11 +9977,11 @@ currItem = SelItem.at(a); if ((currItem->itemType() == PageItem::TextFrame) || (currItem->itemType() == PageItem::PathText)) { - if (Doc->appMode != EditMode) + if (Doc->appMode != scEditMode) currItem->setFontWidth(sha); for (uint i=0; i<currItem->itemText.count(); ++i) { - if (Doc->appMode == EditMode) + if (Doc->appMode == scEditMode) { if (currItem->itemText.at(i)->cselect) currItem->itemText.at(i)->cscale = sha; @@ -10007,14 +10007,14 @@ currItem = SelItem.at(a); if ((currItem->itemType() == PageItem::TextFrame) || (currItem->itemType() == PageItem::PathText)) { - if (Doc->appMode != EditMode) + if (Doc->appMode != scEditMode) { currItem->TxtShadowX = shx; currItem->TxtShadowY = shy; } for (uint i=0; i<currItem->itemText.count(); ++i) { - if (Doc->appMode == EditMode) + if (Doc->appMode == scEditMode) { if (currItem->itemText.at(i)->cselect) { @@ -10044,14 +10044,14 @@ currItem = SelItem.at(a); if ((currItem->itemType() == PageItem::TextFrame) || (currItem->itemType() == PageItem::PathText)) { - if (Doc->appMode != EditMode) + if (Doc->appMode != scEditMode) { currItem->TxtUnderPos = pos; currItem->TxtUnderWidth = wid; } for (uint i=0; i<currItem->itemText.count(); ++i) { - if (Doc->appMode == EditMode) + if (Doc->appMode == scEditMode) { if (currItem->itemText.at(i)->cselect) { @@ -10081,14 +10081,14 @@ currItem = SelItem.at(a); if ((currItem->itemType() == PageItem::TextFrame) || (currItem->itemType() == PageItem::PathText)) { - if (Doc->appMode != EditMode) + if (Doc->appMode != scEditMode) { currItem->TxtStrikePos = pos; currItem->TxtStrikeWidth = wid; } for (uint i=0; i<currItem->itemText.count(); ++i) { - if (Doc->appMode == EditMode) + if (Doc->appMode == scEditMode) { if (currItem->itemText.at(i)->cselect) { @@ -10118,11 +10118,11 @@ currItem = SelItem.at(a); if ((currItem->itemType() == PageItem::TextFrame) || (currItem->itemType() == PageItem::PathText)) { - if (Doc->appMode != EditMode) + if (Doc->appMode != scEditMode) currItem->TxtBase = sha; for (uint i=0; i<currItem->itemText.count(); ++i) { - if (Doc->appMode == EditMode) + if (Doc->appMode == scEditMode) { if (currItem->itemText.at(i)->cselect) currItem->itemText.at(i)->cbase = sha; @@ -10146,11 +10146,11 @@ currItem = SelItem.at(a); if ((currItem->itemType() == PageItem::TextFrame) || (currItem->itemType() == PageItem::PathText)) { - if (Doc->appMode != EditMode) + if (Doc->appMode != scEditMode) currItem->TxtOutline = sha; for (uint i=0; i<currItem->itemText.count(); ++i) { - if (Doc->appMode == EditMode) + if (Doc->appMode == scEditMode) { if (currItem->itemText.at(i)->cselect) currItem->itemText.at(i)->coutline = sha; @@ -10251,11 +10251,11 @@ for (uint aa = 0; aa < SelItem.count(); ++aa) { PageItem *currItem = SelItem.at(aa); - if (Doc->appMode != EditMode) + if (Doc->appMode != scEditMode) currItem->setFontEffects(s); if (currItem->itemText.count() != 0) { - if (Doc->appMode == EditMode) + if (Doc->appMode == scEditMode) { for (uint a = 0; a < currItem->itemText.count(); ++a) { @@ -10294,7 +10294,7 @@ int a, ax; PageItem *nextItem; bool cr = true; - if (Doc->appMode == EditMode) + if (Doc->appMode == scEditMode) { nextItem = currItem; a = currItem->CPos; @@ -10529,7 +10529,7 @@ for (uint aa = 0; aa < SelItem.count(); ++aa) { PageItem *currItem = SelItem.at(aa); - if ((currItem->HasSel) && (Doc->appMode == EditMode)) + if ((currItem->HasSel) && (Doc->appMode == scEditMode)) { if (currItem->itemText.count() != 0) { @@ -10543,7 +10543,7 @@ } else { - if (Doc->appMode != EditMode) + if (Doc->appMode != scEditMode) currItem->setKerning(us); if (currItem->itemText.count() != 0) { @@ -10562,7 +10562,7 @@ void ScribusView::ChLineSpaMode(int w) { - if (Doc->appMode != EditMode) + if (Doc->appMode != scEditMode) { if (SelItem.count() != 0) { @@ -10605,7 +10605,7 @@ { PageItem *currItem = SelItem.at(0); Doc->CurrFontSize = size; - if (Doc->appMode != EditMode) + if (Doc->appMode != scEditMode) { if (currItem->LineSpMode == 0) { @@ -10630,7 +10630,7 @@ } if (currItem->itemText.count() != 0) { - if (Doc->appMode == EditMode) + if (Doc->appMode == scEditMode) { for (uint a = 0; a < currItem->itemText.count(); ++a) { Index: werktoolb.cpp =================================================================== RCS file: /cvs/Scribus/scribus/werktoolb.cpp,v retrieving revision 1.14.2.14 diff -u -r1.14.2.14 werktoolb.cpp --- werktoolb.cpp 9 Jun 2005 00:07:02 -0000 1.14.2.14 +++ werktoolb.cpp 29 Jun 2005 16:45:42 -0000 @@ -161,7 +161,7 @@ } PDFTool->setOn(false); PDFaTool->setOn(true); - emit NewMode(InsertPDFTextAnnotation+PDFnotiz); + emit NewMode(scInsertPDFTextAnnotation+PDFnotiz); } void WerkToolBP::setPDFtool(int id) @@ -172,7 +172,7 @@ PDFTool->setPixmap(loadIcon(tmp[c])); PDFTool->setOn(true); PDFaTool->setOn(false); - emit NewMode(InsertPDFButton+PDFwerkz); + emit NewMode(scInsertPDFButton+PDFwerkz); } void WerkToolBP::Docken(QDockWindow::Place ) @@ -193,12 +193,12 @@ if (PDFTool == sender()) { PDFTool->setOn(true); - emit NewMode(InsertPDFButton+PDFwerkz); + emit NewMode(scInsertPDFButton+PDFwerkz); } if (PDFaTool == sender()) { PDFaTool->setOn(true); - emit NewMode(InsertPDFTextAnnotation+PDFnotiz); + emit NewMode(scInsertPDFTextAnnotation+PDFnotiz); } } |
|
I dont really like just prefixing everything with "sc". Its going to get way overused. What about modeBlah? eg enum AppMode { NormalMode, DrawShapes, StartStoryEditor, DrawPicture, DrawText, Magnifier, EditMode, DrawLine, Rotation, LinkFrames, UnlinkFrames, DrawRegularPolygon, DrawBezierLine, InsertPDFButton, InsertPDFTextfield, InsertPDFCheckbox, InsertPDFCombobox, InsertPDFListbox, InsertPDFTextAnnotation, InsertPDFLinkAnnotation, DrawFreehandLine, DrawTable, PanningMode, MeasurementTool, EditGradientVectors, EyeDropper, CopyProperties }; becomes enum AppMode { modeNormal, modeDrawShapes, modeStoryEditor, modeDrawPicture, modeDrawText, modeMagnifier, modeEdit, modeDrawLine, modeRotation, modeLinkFrames, modeUnlinkFrames, modeDrawRegularPolygon, modeDrawBezierLine, modeInsertPDFButton, modeInsertPDFTextfield, modeInsertPDFCheckbox, modeInsertPDFCombobox, modeInsertPDFListbox, modeInsertPDFTextAnnotation, modeInsertPDFLinkAnnotation, modeDrawFreehandLine, modeDrawTable, modePanning, modeMeasurementTool, modeEditGradientVectors, modeEyeDropper, modeCopyProperties }; Please check these are ok as I'd prefer these. |
|
Ok! Going to do it later tonight! |
|
Going to check it, or going to change your code? If you think those strings are ok, then do not worry about making a diff, I will change our code and commit to CVS. Just let me know you think they are ok. |
|
Meant changing my code and check it. I think this strings are ok. |
|
I changed my code : new value names are ok. |
|
Ok, thanks. Will do the changes here too. |
Date Modified | Username | Field | Change |
---|---|---|---|
2005-06-29 15:00 | jghali | New Issue | |
2005-06-29 15:00 | jghali | File Added: appMode_enum_13x.diff | |
2005-06-29 15:13 | cbradney | Status | new => assigned |
2005-06-29 15:13 | cbradney | Assigned To | => cbradney |
2005-06-29 15:16 | cbradney | Note Added: 0005220 | |
2005-06-29 15:22 | jghali | Note Added: 0005221 | |
2005-06-29 15:33 | cbradney | Note Added: 0005222 | |
2005-06-29 15:39 | jghali | Note Added: 0005223 | |
2005-06-29 16:09 | jghali | Note Added: 0005224 | |
2005-06-29 16:37 | cbradney | Note Added: 0005225 | |
2005-06-29 17:19 | cbradney | Status | assigned => resolved |
2005-06-29 17:19 | cbradney | Fixed in Version | => 1.3.0cvs |
2005-06-29 17:19 | cbradney | Resolution | open => fixed |
2005-06-29 17:21 | cbradney | Status | resolved => closed |
2005-07-06 04:42 |
|
Relationship added | parent of 0000015 |