Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 11892 → Rev 11893

/trunk/Scribus/scribus/scribus.cpp
652,6 → 652,7
scrMenuMgr->addMenuItem(scrActions["editClearContents"], "EditContents");
scrMenuMgr->addMenuSeparator("Edit");
scrMenuMgr->addMenuItem(scrActions["editSelectAll"], "Edit");
scrMenuMgr->addMenuItem(scrActions["editSelectAllOnLayer"], "Edit");
scrMenuMgr->addMenuItem(scrActions["editDeselectAll"], "Edit");
scrMenuMgr->addMenuSeparator("Edit");
scrMenuMgr->addMenuItem(scrActions["editSearchReplace"], "Edit");
677,6 → 678,7
scrActions["editPasteContentsAbs"]->setEnabled(false);
scrActions["editClearContents"]->setEnabled(false);
scrActions["editSelectAll"]->setEnabled(false);
scrActions["editSelectAllOnLayer"]->setEnabled(false);
scrActions["editDeselectAll"]->setEnabled(false);
scrActions["editSearchReplace"]->setEnabled(false);
scrActions["editPatterns"]->setEnabled(false);
1153,7 → 1155,8
else
return true;
}
if ( e->type() == QEvent::KeyPress ) {
if ( e->type() == QEvent::KeyPress )
{
QKeyEvent *k = (QKeyEvent *)e;
int keyMod=0;
if (k->modifiers() & Qt::ShiftModifier)
1222,11 → 1225,6
else
retVal=false;
}
else if (e->type() == QEvent::KeyRelease)
{
scrActions["editSelectAll"]->setTexts( tr("Select &All"));
retVal=false;
}
else
retVal=false;
//Return false to pass event to object
1249,11 → 1247,6
qApp->changeOverrideCursor(QCursor(loadIcon("LupeZm.xpm")));
return;
}
if ((doc->appMode == modeNormal) && (doc->m_Selection->count() == 0) && (kk == Qt::Key_Shift))
{
scrActions["editSelectAll"]->setTexts( tr("Select All in Document"));
return;
}
}
if (keyrep)
return;
1880,7 → 1873,6
 
void ScribusMainWindow::keyReleaseEvent(QKeyEvent *k)
{
scrActions["editSelectAll"]->setTexts( tr("Select &All"));
//Exit out of panning mode if Control is release while the right mouse button is pressed
if (HaveDoc)
{
2647,6 → 2639,7
scrActions["editPasteContents"]->setEnabled(false);
scrActions["editPasteContentsAbs"]->setEnabled(false);
scrActions["editSelectAll"]->setEnabled(true);
scrActions["editSelectAllOnLayer"]->setEnabled(true);
scrActions["editDeselectAll"]->setEnabled(false);
scrActions["editPatterns"]->setEnabled(true);
scrActions["editStyles"]->setEnabled(true);
4467,6 → 4460,7
scrMenuMgr->setMenuEnabled("EditPasteRecent", false);
scrActions["editClearContents"]->setEnabled(false);
scrActions["editSelectAll"]->setEnabled(false);
scrActions["editSelectAllOnLayer"]->setEnabled(false);
scrActions["editDeselectAll"]->setEnabled(false);
scrActions["editPatterns"]->setEnabled(false);
scrActions["editStyles"]->setEnabled(false);
5266,8 → 5260,13
}
 
//CB-->Doc ?????
void ScribusMainWindow::SelectAll()
void ScribusMainWindow::SelectAllOnLayer()
{
SelectAll(true);
}
 
void ScribusMainWindow::SelectAll(bool docWideSelect)
{
if (doc->appMode == modeEdit)
{
PageItem *currItem = doc->m_Selection->itemAt(0);
5293,16 → 5292,17
view->Deselect();
doc->m_Selection->delaySignalsOn();
uint docItemsCount=doc->Items->count();
int docCurrentPage=doc->currentPageNumber();
for (uint a = 0; a < docItemsCount; ++a)
{
currItem = doc->Items->at(a);
if ((currItem->LayerNr == doc->activeLayer()) && (!doc->layerLocked(currItem->LayerNr)))
{
if (QApplication::keyboardModifiers() & Qt::ShiftModifier)
if (docWideSelect)
doc->m_Selection->addItem(currItem);
else
{
if (currItem->OwnPage == doc->currentPage()->pageNr())
if (currItem->OwnPage==docCurrentPage)
doc->m_Selection->addItem(currItem);
}
}
/trunk/Scribus/scribus/actionmanager.cpp
196,6 → 196,8
scrActions->insert(name, new ScrAction(loadIcon("16/edit-delete.png"), loadIcon("22/edit-delete.png"), "", defaultKey(name), mainWindow));
name="editSelectAll";
scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
name="editSelectAllOnLayer";
scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
name="editDeselectAll";
scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
name="editSearchReplace";
227,6 → 229,7
connect( (*scrActions)["editPasteContents"], SIGNAL(triggeredData(int)), mainWindow, SLOT(slotEditPasteContents(int)) );
connect( (*scrActions)["editPasteContentsAbs"], SIGNAL(triggeredData(int)), mainWindow, SLOT(slotEditPasteContents(int)) );
connect( (*scrActions)["editSelectAll"], SIGNAL(triggered()), mainWindow, SLOT(SelectAll()) );
connect( (*scrActions)["editSelectAllOnLayer"], SIGNAL(triggered()), mainWindow, SLOT(SelectAllOnLayer()) );
connect( (*scrActions)["editDeselectAll"], SIGNAL(triggered()), mainWindow, SLOT(deselectAll()) );
connect( (*scrActions)["editSearchReplace"], SIGNAL(triggered()), mainWindow, SLOT(SearchText()) );
connect( (*scrActions)["editEditWithImageEditor"], SIGNAL(triggered()), mainWindow, SLOT(callImageEditor()) );
1251,6 → 1254,7
(*scrActions)["editPasteContentsAbs"]->setTexts( tr("Paste (&Absolute)"));
(*scrActions)["editClearContents"]->setTexts( tr("C&lear"));
(*scrActions)["editSelectAll"]->setTexts( tr("Select &All"));
(*scrActions)["editSelectAllOnLayer"]->setTexts( tr("Select All On Layer"));
(*scrActions)["editDeselectAll"]->setTexts( tr("&Deselect All"));
(*scrActions)["editSearchReplace"]->setTexts( tr("&Search/Replace..."));
(*scrActions)["editEditWithImageEditor"]->setTexts( tr("Edit Image..."));
1550,6 → 1554,7
defKeys.insert("editPasteContents", Qt::CTRL+Qt::SHIFT+Qt::Key_V);
defKeys.insert("editPasteContentsAbs", Qt::CTRL+Qt::ALT+Qt::SHIFT+Qt::Key_V);
defKeys.insert("editSelectAll", Qt::CTRL+Qt::Key_A);
defKeys.insert("editSelectAllOnLayer", Qt::CTRL+Qt::ALT+Qt::Key_A);
defKeys.insert("editDeselectAll", Qt::CTRL+Qt::SHIFT+Qt::Key_A);
defKeys.insert("editSearchReplace", Qt::CTRL+Qt::Key_F);
defKeys.insert("editStyles", QKeySequence(Qt::Key_F3));
1649,7 → 1654,7
itmenu->second << "fileDocSetup" << "filePreferences" << "filePrint" << "PrintPreview" << "fileQuit";
++itmenu;
//Edit
itmenu->second << "editUndoAction" << "editRedoAction" << "editActionMode" << "editCut" << "editCopy" << "editPaste" << "editCopyContents" << "editPasteContents" << "editPasteContentsAbs" << "editClearContents" << "editSelectAll" << "editDeselectAll" << "editSearchReplace" << "toolsEditWithStoryEditor" << "editEditWithImageEditor" << "editEditWithLatexEditor" << "editExtendedImageProperties" << "editColors" << "editPatterns" << "editStyles" << "editMasterPages" << "editJavascripts";
itmenu->second << "editUndoAction" << "editRedoAction" << "editActionMode" << "editCut" << "editCopy" << "editPaste" << "editCopyContents" << "editPasteContents" << "editPasteContentsAbs" << "editClearContents" << "editSelectAll" << "editSelectAllOnLayer" << "editDeselectAll" << "editSearchReplace" << "toolsEditWithStoryEditor" << "editEditWithImageEditor" << "editEditWithLatexEditor" << "editExtendedImageProperties" << "editColors" << "editPatterns" << "editStyles" << "editMasterPages" << "editJavascripts";
//Style
++itmenu;
int font_sizes[] = {7, 9, 10, 11, 12, 14, 18, 24, 36, 48, 60, 72};
/trunk/Scribus/scribus/scribus.h
351,7 → 351,8
void slotEditPasteContents(int absolute=0);
void EnableTxEdit();
void DisableTxEdit();
void SelectAll();
void SelectAll(bool docWideSelect=false);
void SelectAllOnLayer();
void deselectAll();
void ClipChange();
//void clearContents();