Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 460 → Rev 462

/trunk/Scribus/scribus/story.cpp
1457,7 → 1457,7
}
 
/* Main Story Editor Class */
StoryEditor::StoryEditor(QWidget* parent, ScribusDoc *docc, PageItem *ite)
StoryEditor::StoryEditor(QWidget* parent, ScribusDoc *docc, PageItem *ite)
: QMainWindow(parent, "StoryEditor", WShowModal | WType_Dialog)
{
setCaption( tr( "Story Editor" ) );
1494,8 → 1494,9
settingsMenu = new QPopupMenu();
settingsMenu->insertItem( tr("&Background..."), this , SLOT(setBackPref()));
settingsMenu->insertItem( tr("&Display Font..."), this , SLOT(setFontPref()));
smartSelection = new QCheckBox(tr("&Smart text selection"), this);
settingsMenu->insertItem(smartSelection);
smartSel = settingsMenu->insertItem( tr("&Smart text selection"), this, SLOT(ToggleSmart()));
smartSelection = false;
settingsMenu->setItemChecked(smartSel, smartSelection);
menuBar()->insertItem( tr("&File"), fmenu);
menuBar()->insertItem( tr("&Edit"), emenu);
menuBar()->insertItem( tr("&Settings"), settingsMenu );
1545,7 → 1546,7
/* Editor Widget, subclass of QTextEdit */
Editor = new SEditor(EdSplit, docc);
StoryEd2Layout->addWidget( EdSplit );
 
/* Setting up Status Bar */
ButtonGroup1 = new QButtonGroup( statusBar(), "ButtonGroup1" );
ButtonGroup1->setFrameShape( QButtonGroup::NoFrame );
1650,7 → 1651,7
connect(StyleTools, SIGNAL(NewStyle(int )), this, SLOT(newTxStyle(int )));
Editor->setFocus();
}
 
/** 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
1659,8 → 1660,7
{
int paraFrom, indexFrom, paraTo, indexTo;
QString selText = Editor->selectedText();
 
if (selText.length() == 0 || !smartSelection->isChecked())
if (selText.length() == 0 || !smartSelection)
{
updateProps(para, position);
return;
1671,6 → 1671,12
updateProps(para, position);
}
 
void StoryEditor::ToggleSmart()
{
smartSelection = !smartSelection;
settingsMenu->setItemChecked(smartSel, smartSelection);
}
 
int StoryEditor::exec()
{
clearWFlags( WDestructiveClose );
2059,7 → 2065,7
hide();
qApp->exit_loop();
}
 
/*! Saves the document with editation continued. Signal called from menu.
05/28/04 petr vanek
*/
2199,7 → 2205,7
nb2->Dirty = false;
nb2 = nb2->NextBox;
}
doc->ActPage->update();
ScApp->view->DrawNew();
TextChanged = false;
emenu->setItemEnabled(Mupdt, 0);
fmenu->setItemEnabled(fid52, 0);
/trunk/Scribus/scribus/story.h
42,7 → 42,7
#include "alignselect.h"
#include "shadebutton.h"
 
struct PtiSmall {
struct PtiSmall {
int csize;
int cshade;
int cshade2;
124,11 → 124,11
void PasteAvail();
};
 
class SideBar : public QLabel
class SideBar : public QLabel
{
Q_OBJECT
 
public:
public:
SideBar(QWidget *pa);
~SideBar() {};
int offs;
152,11 → 152,11
void setRepaint(bool r);
};
 
class SToolBColorF : public QToolBar
class SToolBColorF : public QToolBar
{
Q_OBJECT
 
public:
public:
SToolBColorF(QMainWindow* parent, ScribusDoc *doc);
~SToolBColorF() {};
QLabel* FillIcon;
172,11 → 172,11
void NewColor(int, int);
};
 
class SToolBColorS : public QToolBar
class SToolBColorS : public QToolBar
{
Q_OBJECT
 
public:
public:
SToolBColorS(QMainWindow* parent, ScribusDoc *doc);
~SToolBColorS() {};
QLabel* StrokeIcon;
192,11 → 192,11
void NewColor(int, int);
};
 
class SToolBStyle : public QToolBar
class SToolBStyle : public QToolBar
{
Q_OBJECT
 
public:
public:
SToolBStyle(QMainWindow* parent);
~SToolBStyle() {};
StyleSelect* SeStyle;
213,11 → 213,11
void NewStyle(int);
};
 
class SToolBAlign : public QToolBar
class SToolBAlign : public QToolBar
{
Q_OBJECT
 
public:
public:
SToolBAlign(QMainWindow* parent);
~SToolBAlign() {};
AlignSelect* GroupAlign;
232,11 → 232,11
void NewStyle(int);
};
 
class SToolBFont : public QToolBar
class SToolBFont : public QToolBar
{
Q_OBJECT
 
public:
public:
SToolBFont(QMainWindow* parent);
~SToolBFont() {};
FontCombo* Fonts;
302,7 → 302,8
QLabel* CharCT2;
QLabel* CharC2;
/*! Enables/disables the "smart" selection (#1203) - 10/16/2004 pv */
QCheckBox* smartSelection;
bool smartSelection;
int smartSel;
 
ScribusDoc* doc;
PageItem* CurrItem;
352,6 → 353,7
void SaveTextFile();
// 10/12/2004 - pv - #1203: wrong selection on double click
void doubleClick(int para, int pos);
void ToggleSmart();
 
signals:
void DocChanged();