summaryrefslogtreecommitdiffstats
path: root/scribus/storyeditor.cpp
diff options
context:
space:
mode:
authorcraig <craig@11d20701-8431-0410-a711-e3c959e3b870>2012-04-30 21:42:55 +0000
committercraig <craig@11d20701-8431-0410-a711-e3c959e3b870>2012-04-30 21:42:55 +0000
commit03f92217ee2336adcbf9b1343ea03edac490ade5 (patch)
tree54300e6b248f5b341d8de29649d4175edfae5742 /scribus/storyeditor.cpp
parent8f5f4c57942487fafbeced90e981810b20c809b5 (diff)
downloadscribus-03f92217ee2336adcbf9b1343ea03edac490ade5.tar.gz
scribus-03f92217ee2336adcbf9b1343ea03edac490ade5.tar.xz
scribus-03f92217ee2336adcbf9b1343ea03edac490ade5.zip
Update hunspell plugin, plugin manager to allow SE to see plugins, scplugin to have SE plugin attributes
git-svn-id: svn://scribus.net/branches/Version14x/Scribus@17485 11d20701-8431-0410-a711-e3c959e3b870
Diffstat (limited to 'scribus/storyeditor.cpp')
-rw-r--r--scribus/storyeditor.cpp84
1 files changed, 48 insertions, 36 deletions
diff --git a/scribus/storyeditor.cpp b/scribus/storyeditor.cpp
index 3859a25..ce9398e 100644
--- a/scribus/storyeditor.cpp
+++ b/scribus/storyeditor.cpp
@@ -1547,6 +1547,7 @@ StoryEditor::StoryEditor(QWidget* parent) : QMainWindow(parent, Qt::Window), //
charSelect(NULL),
charSelectUsed(false)
{
+ m_spellActive=false;
prefsManager=PrefsManager::instance();
#ifdef Q_WS_MAC
noIcon = loadIcon("noicon.xpm");
@@ -1811,6 +1812,9 @@ void StoryEditor::buildMenus()
seMenuMgr->addMenuToMenuBar("Edit");
seMenuMgr->addMenuToMenuBar("Insert");
seMenuMgr->addMenuToMenuBar("Settings");
+
+ ScCore->pluginManager->setupPluginActions(this);
+ ScCore->pluginManager->languageChange();
}
void StoryEditor::buildGUI()
@@ -2105,6 +2109,11 @@ void StoryEditor::setCurrentDocumentAndItem(ScribusDoc *doc, PageItem *item)
seActions["editPaste"]->setEnabled(true);
}
+void StoryEditor::setSpellActive(bool ssa)
+{
+ m_spellActive=ssa;
+}
+
/** 10/12/2004 - pv - #1203: wrong selection on double click
Catch the double click signal - cut the wrong selection (with
whitespaces on the tail) - select only one word - return
@@ -2180,45 +2189,48 @@ void StoryEditor::keyPressEvent (QKeyEvent * e)
bool StoryEditor::eventFilter( QObject* ob, QEvent* ev )
{
- if ( ev->type() == QEvent::WindowDeactivate )
- {
- if ((currItem!=NULL) && (!blockUpdate))
- updateTextFrame();
- activFromApp = false;
-// Editor->getCursorPosition(&CurrPara, &CurrChar);
- }
- if ( ev->type() == QEvent::WindowActivate )
+ if (!m_spellActive)
{
- if ((!activFromApp) && (!textChanged) && (!blockUpdate))
+ if ( ev->type() == QEvent::WindowDeactivate )
+ {
+ if ((currItem!=NULL) && (!blockUpdate))
+ updateTextFrame();
+ activFromApp = false;
+ // Editor->getCursorPosition(&CurrPara, &CurrChar);
+ }
+ if ( ev->type() == QEvent::WindowActivate )
{
- activFromApp = true;
- if (currItem!=NULL)
+ if ((!activFromApp) && (!textChanged) && (!blockUpdate))
{
- //set to false otherwise some dialog properties wont be set correctly
- if (currItem->itemText.length() == 0)
- firstSet = false;
- disconnectSignals();
- Editor->setUndoRedoEnabled(false);
- Editor->setUndoRedoEnabled(true);
- Editor->textCursor().setPosition(0);
- seActions["fileRevert"]->setEnabled(false);
- seActions["editCopy"]->setEnabled(false);
- seActions["editCut"]->setEnabled(false);
- seActions["editClear"]->setEnabled(false);
- textChanged = false;
- FontTools->Fonts->RebuildList(currDoc, currItem->isAnnotation());
- Editor->loadItemText(currItem);
-// Editor->getCursorPosition(&CurrPara, &CurrChar);
- updateStatus();
- textChanged = false;
- Editor->moveCursor(QTextCursor::Start, QTextCursor::MoveAnchor);
- Editor->repaint();
- EditorBar->offs = 0;
-// EditorBar->doMove(0, Editor->contentsY());
- EditorBar->setRepaint(true);
- EditorBar->doRepaint();
- updateProps(0, 0);
- connectSignals();
+ activFromApp = true;
+ if (currItem!=NULL)
+ {
+ //set to false otherwise some dialog properties wont be set correctly
+ if (currItem->itemText.length() == 0)
+ firstSet = false;
+ disconnectSignals();
+ Editor->setUndoRedoEnabled(false);
+ Editor->setUndoRedoEnabled(true);
+ Editor->textCursor().setPosition(0);
+ seActions["fileRevert"]->setEnabled(false);
+ seActions["editCopy"]->setEnabled(false);
+ seActions["editCut"]->setEnabled(false);
+ seActions["editClear"]->setEnabled(false);
+ textChanged = false;
+ FontTools->Fonts->RebuildList(currDoc, currItem->isAnnotation());
+ Editor->loadItemText(currItem);
+ // Editor->getCursorPosition(&CurrPara, &CurrChar);
+ updateStatus();
+ textChanged = false;
+ Editor->moveCursor(QTextCursor::Start, QTextCursor::MoveAnchor);
+ Editor->repaint();
+ EditorBar->offs = 0;
+ // EditorBar->doMove(0, Editor->contentsY());
+ EditorBar->setRepaint(true);
+ EditorBar->doRepaint();
+ updateProps(0, 0);
+ connectSignals();
+ }
}
}
}