Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 11893 → Rev 11892

/trunk/Scribus/scribus/scribus.cpp
652,7 → 652,6
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");
678,7 → 677,6
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);
1155,8 → 1153,7
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)
1225,6 → 1222,11
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
1247,6 → 1249,11
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;
1873,6 → 1880,7
 
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)
{
2639,7 → 2647,6
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);
4460,7 → 4467,6
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);
5260,13 → 5266,8
}
 
//CB-->Doc ?????
void ScribusMainWindow::SelectAllOnLayer()
void ScribusMainWindow::SelectAll()
{
SelectAll(true);
}
 
void ScribusMainWindow::SelectAll(bool docWideSelect)
{
if (doc->appMode == modeEdit)
{
PageItem *currItem = doc->m_Selection->itemAt(0);
5292,17 → 5293,16
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 (docWideSelect)
if (QApplication::keyboardModifiers() & Qt::ShiftModifier)
doc->m_Selection->addItem(currItem);
else
{
if (currItem->OwnPage==docCurrentPage)
if (currItem->OwnPage == doc->currentPage()->pageNr())
doc->m_Selection->addItem(currItem);
}
}
/trunk/Scribus/scribus/actionmanager.cpp
196,8 → 196,6
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";
229,7 → 227,6
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()) );
1254,7 → 1251,6
(*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..."));
1554,7 → 1550,6
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));
1654,7 → 1649,7
itmenu->second << "fileDocSetup" << "filePreferences" << "filePrint" << "PrintPreview" << "fileQuit";
++itmenu;
//Edit
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";
itmenu->second << "editUndoAction" << "editRedoAction" << "editActionMode" << "editCut" << "editCopy" << "editPaste" << "editCopyContents" << "editPasteContents" << "editPasteContentsAbs" << "editClearContents" << "editSelectAll" << "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,8 → 351,7
void slotEditPasteContents(int absolute=0);
void EnableTxEdit();
void DisableTxEdit();
void SelectAll(bool docWideSelect=false);
void SelectAllOnLayer();
void SelectAll();
void deselectAll();
void ClipChange();
//void clearContents();