mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
Remove quite a few compiler warnings:
- Change unsigned -> signed - Change signed -> unsigned - Add a cast or two (really few of those) - Remove/comment out unused variables - Comment out unused arguments - Add missing cases to switches. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14344 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a54d3e83bd
commit
1afb2a6b05
@ -68,14 +68,14 @@ Gui & LyXView::gui()
|
|||||||
|
|
||||||
|
|
||||||
LyXView::LyXView(Gui & owner)
|
LyXView::LyXView(Gui & owner)
|
||||||
: owner_(owner),
|
: work_area_(0),
|
||||||
|
owner_(owner),
|
||||||
toolbars_(new Toolbars(*this)),
|
toolbars_(new Toolbars(*this)),
|
||||||
intl_(new Intl),
|
intl_(new Intl),
|
||||||
autosave_timeout_(new Timeout(5000)),
|
autosave_timeout_(new Timeout(5000)),
|
||||||
lyxfunc_(new LyXFunc(this)),
|
lyxfunc_(new LyXFunc(this)),
|
||||||
dialogs_(new Dialogs(*this)),
|
dialogs_(new Dialogs(*this)),
|
||||||
controlcommand_(new ControlCommandBuffer(*this)),
|
controlcommand_(new ControlCommandBuffer(*this))
|
||||||
work_area_(0)
|
|
||||||
{
|
{
|
||||||
lyxerr[Debug::INIT] << "Initializing LyXFunc" << endl;
|
lyxerr[Debug::INIT] << "Initializing LyXFunc" << endl;
|
||||||
}
|
}
|
||||||
|
@ -31,14 +31,14 @@ ControlViewSource::ControlViewSource(Dialog & parent)
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
bool ControlViewSource::initialiseParams(string const & source)
|
bool ControlViewSource::initialiseParams(string const & /*source*/)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
string const ControlViewSource::updateContent()
|
string const ControlViewSource::updateContent()
|
||||||
{
|
{
|
||||||
// get the *top* level paragraphs that contain the cursor,
|
// get the *top* level paragraphs that contain the cursor,
|
||||||
// or the selected text
|
// or the selected text
|
||||||
lyx::pit_type par_begin;
|
lyx::pit_type par_begin;
|
||||||
lyx::pit_type par_end;
|
lyx::pit_type par_end;
|
||||||
@ -67,7 +67,7 @@ void ControlViewSource::clearParams()
|
|||||||
string const ControlViewSource::title() const
|
string const ControlViewSource::title() const
|
||||||
{
|
{
|
||||||
string source_type;
|
string source_type;
|
||||||
|
|
||||||
Kernel::DocType doctype = kernel().docType();
|
Kernel::DocType doctype = kernel().docType();
|
||||||
switch (doctype) {
|
switch (doctype) {
|
||||||
case Kernel::LATEX:
|
case Kernel::LATEX:
|
||||||
|
@ -567,12 +567,13 @@ void Dialogs::toggleTooltips()
|
|||||||
{
|
{
|
||||||
// Turning off tooltips is not necessary and will
|
// Turning off tooltips is not necessary and will
|
||||||
// not be implemented by me - jcs
|
// not be implemented by me - jcs
|
||||||
// Tooltips::toggleEnabled();
|
//Tooltips::toggleEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Are the tooltips on or off?
|
/// Are the tooltips on or off?
|
||||||
bool Dialogs::tooltipsEnabled()
|
bool Dialogs::tooltipsEnabled()
|
||||||
{
|
{
|
||||||
// return Tooltips::enabled();
|
//return Tooltips::enabled();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -245,7 +245,7 @@ void GBibtex::browse()
|
|||||||
string const filen = changeExtension(file, "");
|
string const filen = changeExtension(file, "");
|
||||||
bool present = false;
|
bool present = false;
|
||||||
|
|
||||||
for (int i = 0; i < stylecombo_.get_model()->children().size(); ++i) {
|
for (unsigned int i = 0; i < stylecombo_.get_model()->children().size(); ++i) {
|
||||||
stylecombo_.set_active(i);
|
stylecombo_.set_active(i);
|
||||||
Glib::ustring const item = stylecombo_.get_active_text ();
|
Glib::ustring const item = stylecombo_.get_active_text ();
|
||||||
if (item == filen) {
|
if (item == filen) {
|
||||||
|
@ -70,6 +70,14 @@ void GNote::update()
|
|||||||
bc().refreshReadOnly();
|
bc().refreshReadOnly();
|
||||||
|
|
||||||
switch (controller().params().type) {
|
switch (controller().params().type) {
|
||||||
|
case InsetNoteParams::Framed:
|
||||||
|
//framedradio_->set_active(true);
|
||||||
|
greyedoutradio_->set_active(true);
|
||||||
|
break;
|
||||||
|
case InsetNoteParams::Shaded:
|
||||||
|
//shadedradio_->set_active(true);
|
||||||
|
greyedoutradio_->set_active(true);
|
||||||
|
break;
|
||||||
case InsetNoteParams::Note:
|
case InsetNoteParams::Note:
|
||||||
lyxnoteradio_->set_active(true);
|
lyxnoteradio_->set_active(true);
|
||||||
break;
|
break;
|
||||||
@ -79,7 +87,7 @@ void GNote::update()
|
|||||||
case InsetNoteParams::Greyedout:
|
case InsetNoteParams::Greyedout:
|
||||||
greyedoutradio_->set_active(true);
|
greyedoutradio_->set_active(true);
|
||||||
break;
|
break;
|
||||||
// FIXME add Framed, Shaded
|
// FIXME: Framed and Shaded not handled properly
|
||||||
}
|
}
|
||||||
|
|
||||||
applylock_ = false;
|
applylock_ = false;
|
||||||
|
@ -352,7 +352,7 @@ void GTabular::updateHorzAlignCombo(bool extraoption)
|
|||||||
|
|
||||||
//FIXME: check if we really need to completely rewrite combo data
|
//FIXME: check if we really need to completely rewrite combo data
|
||||||
// Deprecated in favor of clear_items in gtkmm >= 2.8
|
// Deprecated in favor of clear_items in gtkmm >= 2.8
|
||||||
int const oldselection = horzaligncombo_->get_active_row_number();
|
unsigned int const oldselection = horzaligncombo_->get_active_row_number();
|
||||||
horzaligncombo_->clear();
|
horzaligncombo_->clear();
|
||||||
horzaligncombo_->append_text(_("Left"));
|
horzaligncombo_->append_text(_("Left"));
|
||||||
horzaligncombo_->append_text(_("Center"));
|
horzaligncombo_->append_text(_("Center"));
|
||||||
|
@ -112,7 +112,7 @@ void GTexinfo::onItemActivate(
|
|||||||
file = getTexFileFromList(data[choice],
|
file = getTexFileFromList(data[choice],
|
||||||
controller().getFileType(activeStyle));
|
controller().getFileType(activeStyle));
|
||||||
|
|
||||||
if (choice >= 0 && choice <= data.size() - 1)
|
if (choice >= 0 && choice <= int(data.size() - 1))
|
||||||
controller().viewFile(file);
|
controller().viewFile(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* \file GtkLengthEntry.C
|
* \file GtkLengthEntry.C
|
||||||
* This file is part of LyX, the document processor.
|
* This file is part of LyX, the document processor.
|
||||||
@ -71,7 +70,7 @@ void populateUnitCombo(Gtk::ComboBoxText & combo, bool const userelative)
|
|||||||
|
|
||||||
GtkLengthEntry::GtkLengthEntry(
|
GtkLengthEntry::GtkLengthEntry(
|
||||||
BaseObjectType* cobject,
|
BaseObjectType* cobject,
|
||||||
const Glib::RefPtr<Gnome::Glade::Xml>& refGlade)
|
const Glib::RefPtr<Gnome::Glade::Xml>& /*refGlade*/)
|
||||||
: Gtk::HBox(cobject), adj_(666.0, 0.0, 99999.0, 0.1, 1, 0.0), spin_(adj_, 0.1, 2)
|
: Gtk::HBox(cobject), adj_(666.0, 0.0, 99999.0, 0.1, 1, 0.0), spin_(adj_, 0.1, 2)
|
||||||
{
|
{
|
||||||
populateUnitCombo (combo_, true);
|
populateUnitCombo (combo_, true);
|
||||||
|
@ -141,8 +141,8 @@ void lyx_gui::parse_lyxrc()
|
|||||||
|
|
||||||
|
|
||||||
int lyx_gui::start(string const & batch, std::vector<string> const & files,
|
int lyx_gui::start(string const & batch, std::vector<string> const & files,
|
||||||
unsigned int width, unsigned int height, int posx,
|
unsigned int width, unsigned int height,
|
||||||
int posy, bool)
|
int /*posx*/, int /*posy*/, bool)
|
||||||
{
|
{
|
||||||
int view_id = theApp->gui().newView(width, height);
|
int view_id = theApp->gui().newView(width, height);
|
||||||
GView & view = static_cast<GView &> (theApp->gui().view(view_id));
|
GView & view = static_cast<GView &> (theApp->gui().view(view_id));
|
||||||
|
@ -84,6 +84,9 @@ void QNote::apply()
|
|||||||
type = InsetNoteParams::Framed;
|
type = InsetNoteParams::Framed;
|
||||||
else if (dialog_->shadedRB->isChecked())
|
else if (dialog_->shadedRB->isChecked())
|
||||||
type = InsetNoteParams::Shaded;
|
type = InsetNoteParams::Shaded;
|
||||||
|
else
|
||||||
|
// Something bad in the gui, nothing set
|
||||||
|
type = InsetNoteParams::Note;
|
||||||
|
|
||||||
controller().params().type = type;
|
controller().params().type = type;
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ int const statusbar_timer_value = 3000;
|
|||||||
|
|
||||||
Action::Action(LyXView & lyxView, string const & text,
|
Action::Action(LyXView & lyxView, string const & text,
|
||||||
FuncRequest const & func, string const & tooltip)
|
FuncRequest const & func, string const & tooltip)
|
||||||
: QAction(this), lyxView_(lyxView), func_(func)
|
: QAction(this), func_(func), lyxView_(lyxView)
|
||||||
{
|
{
|
||||||
setText(tr(toqstr(text)));
|
setText(tr(toqstr(text)));
|
||||||
setToolTip(tr(toqstr(tooltip)));
|
setToolTip(tr(toqstr(tooltip)));
|
||||||
@ -52,7 +52,7 @@ Action::Action(LyXView & lyxView, string const & text,
|
|||||||
|
|
||||||
Action::Action(LyXView & lyxView, string const & icon, string const & text,
|
Action::Action(LyXView & lyxView, string const & icon, string const & text,
|
||||||
FuncRequest const & func, string const & tooltip)
|
FuncRequest const & func, string const & tooltip)
|
||||||
: QAction(this), lyxView_(lyxView), func_(func)
|
: QAction(this), func_(func), lyxView_(lyxView)
|
||||||
{
|
{
|
||||||
setIcon(QPixmap(icon.c_str()));
|
setIcon(QPixmap(icon.c_str()));
|
||||||
setText(tr(toqstr(text)));
|
setText(tr(toqstr(text)));
|
||||||
|
@ -30,7 +30,8 @@ using lyx::support::libFileSearch;
|
|||||||
using std::string;
|
using std::string;
|
||||||
|
|
||||||
|
|
||||||
BulletsModule::BulletsModule(QWidget * parent, const char * name, Qt::WFlags fl)
|
BulletsModule::BulletsModule(QWidget * /*parent*/,
|
||||||
|
char const * /*name*/, Qt::WFlags /*fl*/)
|
||||||
: bullet_pressed_(0)
|
: bullet_pressed_(0)
|
||||||
{
|
{
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
@ -41,12 +42,13 @@ BulletsModule::BulletsModule(QWidget * parent, const char * name, Qt::WFlags fl
|
|||||||
|
|
||||||
QMenu * pm = new QMenu(this);
|
QMenu * pm = new QMenu(this);
|
||||||
|
|
||||||
QMenu * pm1 = new QMenu(pm);
|
// FIXME: Need to verify that this does not leak memory.
|
||||||
QMenu * pm2 = new QMenu(pm);
|
/*QMenu * pm1 =*/ new QMenu(pm);
|
||||||
QMenu * pm3 = new QMenu(pm);
|
/*QMenu * pm2 =*/ new QMenu(pm);
|
||||||
QMenu * pm4 = new QMenu(pm);
|
/*QMenu * pm3 =*/ new QMenu(pm);
|
||||||
QMenu * pm5 = new QMenu(pm);
|
/*QMenu * pm4 =*/ new QMenu(pm);
|
||||||
QMenu * pm6 = new QMenu(pm);
|
/*QMenu * pm5 =*/ new QMenu(pm);
|
||||||
|
/*QMenu * pm6 =*/ new QMenu(pm);
|
||||||
|
|
||||||
// FIXME: We need a Qt4 compatible browsebox type widget
|
// FIXME: We need a Qt4 compatible browsebox type widget
|
||||||
// which can act as a popup to a toolbutton
|
// which can act as a popup to a toolbutton
|
||||||
@ -149,7 +151,7 @@ BulletsModule::~BulletsModule()
|
|||||||
|
|
||||||
void BulletsModule::updateSizes()
|
void BulletsModule::updateSizes()
|
||||||
{
|
{
|
||||||
// emit signal
|
// emit signal
|
||||||
changed();
|
changed();
|
||||||
|
|
||||||
// -1 apparently means default...
|
// -1 apparently means default...
|
||||||
@ -193,7 +195,7 @@ void BulletsModule::selected1()
|
|||||||
tmpbulletset = false;
|
tmpbulletset = false;
|
||||||
bullets_[0] = tmpbullet;
|
bullets_[0] = tmpbullet;
|
||||||
setBullet(bullet1PB, bulletsize1CO, bullets_[0]);
|
setBullet(bullet1PB, bulletsize1CO, bullets_[0]);
|
||||||
// emit signal
|
// emit signal
|
||||||
changed();
|
changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -205,7 +207,7 @@ void BulletsModule::selected2()
|
|||||||
tmpbulletset = false;
|
tmpbulletset = false;
|
||||||
bullets_[1] = tmpbullet;
|
bullets_[1] = tmpbullet;
|
||||||
setBullet(bullet2PB, bulletsize2CO, bullets_[1]);
|
setBullet(bullet2PB, bulletsize2CO, bullets_[1]);
|
||||||
// emit signal
|
// emit signal
|
||||||
changed();
|
changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -217,7 +219,7 @@ void BulletsModule::selected3()
|
|||||||
tmpbulletset = false;
|
tmpbulletset = false;
|
||||||
bullets_[2] = tmpbullet;
|
bullets_[2] = tmpbullet;
|
||||||
setBullet(bullet3PB, bulletsize3CO, bullets_[2]);
|
setBullet(bullet3PB, bulletsize3CO, bullets_[2]);
|
||||||
// emit signal
|
// emit signal
|
||||||
changed();
|
changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -229,15 +231,15 @@ void BulletsModule::selected4()
|
|||||||
tmpbulletset = false;
|
tmpbulletset = false;
|
||||||
bullets_[3] = tmpbullet;
|
bullets_[3] = tmpbullet;
|
||||||
setBullet(bullet4PB, bulletsize4CO, bullets_[3]);
|
setBullet(bullet4PB, bulletsize4CO, bullets_[3]);
|
||||||
// emit signal
|
// emit signal
|
||||||
changed();
|
changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QPixmap BulletsModule::getPixmap(int font, int character)
|
QPixmap BulletsModule::getPixmap(int /*font*/, int /*character*/)
|
||||||
{
|
{
|
||||||
int col = character % 6;
|
//int col = character % 6;
|
||||||
int row = (character - col) / 6;
|
//int row = (character - col) / 6;
|
||||||
|
|
||||||
/* switch (font) {
|
/* switch (font) {
|
||||||
case 0:
|
case 0:
|
||||||
|
@ -108,11 +108,11 @@ void GuiView::init()
|
|||||||
|
|
||||||
// make sure the buttons are disabled if needed
|
// make sure the buttons are disabled if needed
|
||||||
updateToolbars();
|
updateToolbars();
|
||||||
|
|
||||||
LyXView::init();
|
LyXView::init();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GuiView::updateMenu(QAction *action)
|
void GuiView::updateMenu(QAction * /*action*/)
|
||||||
{
|
{
|
||||||
menubar_->update();
|
menubar_->update();
|
||||||
}
|
}
|
||||||
@ -183,7 +183,7 @@ bool GuiView::hasFocus() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GuiView::updateFloatingGeometry()
|
void GuiView::updateFloatingGeometry()
|
||||||
{
|
{
|
||||||
if (!isMaximized())
|
if (!isMaximized())
|
||||||
floatingGeometry_ = QRect(x(), y(), width(), height());
|
floatingGeometry_ = QRect(x(), y(), width(), height());
|
||||||
@ -204,7 +204,7 @@ void GuiView::moveEvent(QMoveEvent *)
|
|||||||
|
|
||||||
void GuiView::closeEvent(QCloseEvent *)
|
void GuiView::closeEvent(QCloseEvent *)
|
||||||
{
|
{
|
||||||
// FIXME:
|
// FIXME:
|
||||||
// change the ifdef to 'geometry = normalGeometry();' only
|
// change the ifdef to 'geometry = normalGeometry();' only
|
||||||
// when Trolltech has fixed the broken normalGeometry on X11:
|
// when Trolltech has fixed the broken normalGeometry on X11:
|
||||||
// http://www.trolltech.com/developer/task-tracker/index_html?id=119684+&method=entry
|
// http://www.trolltech.com/developer/task-tracker/index_html?id=119684+&method=entry
|
||||||
@ -215,9 +215,9 @@ void GuiView::closeEvent(QCloseEvent *)
|
|||||||
QRect geometry = normalGeometry();
|
QRect geometry = normalGeometry();
|
||||||
#else
|
#else
|
||||||
updateFloatingGeometry();
|
updateFloatingGeometry();
|
||||||
QRect geometry = floatingGeometry_;
|
QRect geometry = floatingGeometry_;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// save windows size and position
|
// save windows size and position
|
||||||
Session & session = LyX::ref().session();
|
Session & session = LyX::ref().session();
|
||||||
session.saveSessionInfo("WindowWidth", convert<string>(geometry.width()));
|
session.saveSessionInfo("WindowWidth", convert<string>(geometry.width()));
|
||||||
|
@ -55,7 +55,7 @@ void InsertTableWidget::show(bool show)
|
|||||||
init();
|
init();
|
||||||
resetGeometry();
|
resetGeometry();
|
||||||
setVisible(true);
|
setVisible(true);
|
||||||
// emit signal
|
// emit signal
|
||||||
visible(true);
|
visible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ void InsertTableWidget::show(bool show)
|
|||||||
void InsertTableWidget::resetGeometry()
|
void InsertTableWidget::resetGeometry()
|
||||||
{
|
{
|
||||||
QPoint p = parentWidget()->mapToGlobal(parentWidget()->geometry().bottomLeft());
|
QPoint p = parentWidget()->mapToGlobal(parentWidget()->geometry().bottomLeft());
|
||||||
setGeometry(p.x() - parentWidget()->pos().x(),
|
setGeometry(p.x() - parentWidget()->pos().x(),
|
||||||
p.y() - parentWidget()->pos().y(),
|
p.y() - parentWidget()->pos().y(),
|
||||||
cols_ * colwidth_ + 1, rows_ * rowheight_ + 1);
|
cols_ * colwidth_ + 1, rows_ * rowheight_ + 1);
|
||||||
}
|
}
|
||||||
@ -104,25 +104,25 @@ void InsertTableWidget::mouseMoveEvent(QMouseEvent * event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void InsertTableWidget::mouseReleaseEvent(QMouseEvent * event)
|
void InsertTableWidget::mouseReleaseEvent(QMouseEvent * /*event*/)
|
||||||
{
|
{
|
||||||
if (underMouse_) {
|
if (underMouse_) {
|
||||||
QString const data = QString("%1 %2").arg(bottom_).arg(right_);
|
QString const data = QString("%1 %2").arg(bottom_).arg(right_);
|
||||||
lyxView_.getLyXFunc().dispatch(FuncRequest(LFUN_TABULAR_INSERT, fromqstr(data)));
|
lyxView_.getLyXFunc().dispatch(FuncRequest(LFUN_TABULAR_INSERT, fromqstr(data)));
|
||||||
}
|
}
|
||||||
// emit signal
|
// emit signal
|
||||||
visible(false);
|
visible(false);
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void InsertTableWidget::mousePressEvent(QMouseEvent * event)
|
void InsertTableWidget::mousePressEvent(QMouseEvent * /*event*/)
|
||||||
{
|
{
|
||||||
// swallow this one
|
// swallow this one
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void InsertTableWidget::paintEvent(QPaintEvent * event)
|
void InsertTableWidget::paintEvent(QPaintEvent * /*event*/)
|
||||||
{
|
{
|
||||||
drawGrid(rows_, cols_, Qt::white);
|
drawGrid(rows_, cols_, Qt::white);
|
||||||
if (underMouse_)
|
if (underMouse_)
|
||||||
|
@ -15,12 +15,12 @@
|
|||||||
namespace lyx {
|
namespace lyx {
|
||||||
namespace frontend {
|
namespace frontend {
|
||||||
|
|
||||||
QAboutDialog::QAboutDialog(QWidget * parent, const char * name,
|
QAboutDialog::QAboutDialog(QWidget * /*parent*/, char const * /*name*/,
|
||||||
bool modal, Qt::WFlags fl)
|
bool /*modal*/, Qt::WFlags /*fl*/)
|
||||||
{
|
{
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
|
|
||||||
connect( closePB, SIGNAL( clicked() ),
|
connect( closePB, SIGNAL( clicked() ),
|
||||||
this, SLOT( reject() ) );
|
this, SLOT( reject() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,23 +45,23 @@ QBibtexDialog::QBibtexDialog(QBibtex * form)
|
|||||||
setupUi(this);
|
setupUi(this);
|
||||||
QDialog::setModal(true);
|
QDialog::setModal(true);
|
||||||
|
|
||||||
connect(okPB, SIGNAL(clicked()),
|
connect(okPB, SIGNAL(clicked()),
|
||||||
form, SLOT(slotOK()));
|
form, SLOT(slotOK()));
|
||||||
connect(closePB, SIGNAL(clicked()),
|
connect(closePB, SIGNAL(clicked()),
|
||||||
form, SLOT(slotClose()));
|
form, SLOT(slotClose()));
|
||||||
connect(stylePB, SIGNAL( clicked() ),
|
connect(stylePB, SIGNAL( clicked() ),
|
||||||
this, SLOT( browsePressed() ) );
|
this, SLOT( browsePressed() ) );
|
||||||
connect(deletePB, SIGNAL( clicked() ),
|
connect(deletePB, SIGNAL( clicked() ),
|
||||||
this, SLOT( deletePressed() ) );
|
this, SLOT( deletePressed() ) );
|
||||||
connect(styleCB, SIGNAL( textChanged(const QString&) ),
|
connect(styleCB, SIGNAL( textChanged(const QString&) ),
|
||||||
this, SLOT( change_adaptor() ) );
|
this, SLOT( change_adaptor() ) );
|
||||||
connect(databaseLW, SIGNAL( selectionChanged() ),
|
connect(databaseLW, SIGNAL( selectionChanged() ),
|
||||||
this, SLOT( databaseChanged() ) );
|
this, SLOT( databaseChanged() ) );
|
||||||
connect(bibtocCB, SIGNAL( toggled(bool) ),
|
connect(bibtocCB, SIGNAL( toggled(bool) ),
|
||||||
this, SLOT( change_adaptor() ) );
|
this, SLOT( change_adaptor() ) );
|
||||||
connect(btPrintCO, SIGNAL( activated(int) ),
|
connect(btPrintCO, SIGNAL( activated(int) ),
|
||||||
this, SLOT( change_adaptor() ) );
|
this, SLOT( change_adaptor() ) );
|
||||||
connect(addBibPB, SIGNAL( clicked() ),
|
connect(addBibPB, SIGNAL( clicked() ),
|
||||||
this, SLOT( addPressed() ) );
|
this, SLOT( addPressed() ) );
|
||||||
|
|
||||||
add_ = new UiDialog<Ui::QBibtexAddUi>(this, true);
|
add_ = new UiDialog<Ui::QBibtexAddUi>(this, true);
|
||||||
@ -78,9 +78,9 @@ QBibtexDialog::QBibtexDialog(QBibtex * form)
|
|||||||
|
|
||||||
connect(add_->bibED, SIGNAL(textChanged(const QString&)),
|
connect(add_->bibED, SIGNAL(textChanged(const QString&)),
|
||||||
this, SLOT(bibEDChanged()));
|
this, SLOT(bibEDChanged()));
|
||||||
connect(add_->addPB, SIGNAL(clicked()),
|
connect(add_->addPB, SIGNAL(clicked()),
|
||||||
this, SLOT(addDatabase()));
|
this, SLOT(addDatabase()));
|
||||||
connect(add_->addPB, SIGNAL(clicked()),
|
connect(add_->addPB, SIGNAL(clicked()),
|
||||||
add_, SLOT(accept()) );
|
add_, SLOT(accept()) );
|
||||||
connect(add_->bibLW, SIGNAL(itemActivated(QListWidgetItem *)),
|
connect(add_->bibLW, SIGNAL(itemActivated(QListWidgetItem *)),
|
||||||
this, SLOT(addDatabase()));
|
this, SLOT(addDatabase()));
|
||||||
@ -88,9 +88,9 @@ QBibtexDialog::QBibtexDialog(QBibtex * form)
|
|||||||
add_, SLOT(accept()));
|
add_, SLOT(accept()));
|
||||||
connect(add_->bibLW, SIGNAL(itemChanged(QListWidgetItem *)),
|
connect(add_->bibLW, SIGNAL(itemChanged(QListWidgetItem *)),
|
||||||
this, SLOT(availableChanged()));
|
this, SLOT(availableChanged()));
|
||||||
connect(add_->browsePB, SIGNAL(clicked()),
|
connect(add_->browsePB, SIGNAL(clicked()),
|
||||||
this, SLOT(browseBibPressed()));
|
this, SLOT(browseBibPressed()));
|
||||||
connect(add_->closePB, SIGNAL( clicked() ),
|
connect(add_->closePB, SIGNAL( clicked() ),
|
||||||
add_, SLOT( reject() ) );
|
add_, SLOT( reject() ) );
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -148,7 +148,7 @@ void QBibtexDialog::browseBibPressed()
|
|||||||
QString const f = toqstr(changeExtension(file, ""));
|
QString const f = toqstr(changeExtension(file, ""));
|
||||||
bool present = false;
|
bool present = false;
|
||||||
|
|
||||||
for (unsigned int i = 0; i != add_->bibLW->count(); i++) {
|
for (int i = 0; i < add_->bibLW->count(); ++i) {
|
||||||
if (add_->bibLW->item(i)->text() == f)
|
if (add_->bibLW->item(i)->text() == f)
|
||||||
present = true;
|
present = true;
|
||||||
}
|
}
|
||||||
@ -180,11 +180,11 @@ void QBibtexDialog::addDatabase()
|
|||||||
|
|
||||||
// Add the selected browser_bib keys to browser_database
|
// Add the selected browser_bib keys to browser_database
|
||||||
// multiple selections are possible
|
// multiple selections are possible
|
||||||
for (unsigned int i = 0; i != add_->bibLW->count(); i++) {
|
for (int i = 0; i != add_->bibLW->count(); ++i) {
|
||||||
QListWidgetItem * const item = add_->bibLW->item(i);
|
QListWidgetItem * const item = add_->bibLW->item(i);
|
||||||
if (add_->bibLW->isItemSelected(item)) {
|
if (add_->bibLW->isItemSelected(item)) {
|
||||||
add_->bibLW->setItemSelected(item, false);
|
add_->bibLW->setItemSelected(item, false);
|
||||||
QList<QListWidgetItem *> matches =
|
QList<QListWidgetItem *> matches =
|
||||||
databaseLW->findItems(item->text(), Qt::MatchExactly);
|
databaseLW->findItems(item->text(), Qt::MatchExactly);
|
||||||
if (matches.empty())
|
if (matches.empty())
|
||||||
databaseLW->addItem(item->text());
|
databaseLW->addItem(item->text());
|
||||||
@ -194,7 +194,7 @@ void QBibtexDialog::addDatabase()
|
|||||||
if (!file.empty()) {
|
if (!file.empty()) {
|
||||||
add_->bibED->clear();
|
add_->bibED->clear();
|
||||||
QString const f = toqstr(changeExtension(file, ""));
|
QString const f = toqstr(changeExtension(file, ""));
|
||||||
QList<QListWidgetItem *> matches =
|
QList<QListWidgetItem *> matches =
|
||||||
databaseLW->findItems(f, Qt::MatchExactly);
|
databaseLW->findItems(f, Qt::MatchExactly);
|
||||||
if (matches.empty())
|
if (matches.empty())
|
||||||
databaseLW->addItem(f);
|
databaseLW->addItem(f);
|
||||||
|
@ -86,7 +86,7 @@ void QBranches::update()
|
|||||||
if (bname == sel_branch)
|
if (bname == sel_branch)
|
||||||
branchesTW->setItemSelected(newItem, true);
|
branchesTW->setItemSelected(newItem, true);
|
||||||
}
|
}
|
||||||
// emit signal
|
// emit signal
|
||||||
changed();
|
changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -127,7 +127,7 @@ void QBranches::on_activatePB_pressed()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void QBranches::on_branchesTW_itemDoubleClicked(QTreeWidgetItem * item, int col)
|
void QBranches::on_branchesTW_itemDoubleClicked(QTreeWidgetItem * item, int /*col*/)
|
||||||
{
|
{
|
||||||
toggleBranch(item);
|
toggleBranch(item);
|
||||||
}
|
}
|
||||||
|
@ -46,9 +46,18 @@ void QNote::build_dialog()
|
|||||||
|
|
||||||
void QNote::update_contents()
|
void QNote::update_contents()
|
||||||
{
|
{
|
||||||
|
// FIXME: This needs fixing. Framed and Shaded is not working.
|
||||||
QRadioButton * rb = 0;
|
QRadioButton * rb = 0;
|
||||||
|
|
||||||
switch (controller().params().type) {
|
switch (controller().params().type) {
|
||||||
|
case InsetNoteParams::Framed:
|
||||||
|
//rb = dialog_->framedRB;
|
||||||
|
rb = dialog_->greyedoutRB;
|
||||||
|
break;
|
||||||
|
case InsetNoteParams::Shaded:
|
||||||
|
//rb = dialog_->shadedRB;
|
||||||
|
rb = dialog_->greyedoutRB;
|
||||||
|
break;
|
||||||
case InsetNoteParams::Note:
|
case InsetNoteParams::Note:
|
||||||
rb = dialog_->noteRB;
|
rb = dialog_->noteRB;
|
||||||
break;
|
break;
|
||||||
|
@ -523,28 +523,29 @@ PrefColors::PrefColors(QPrefs * form, QWidget * parent)
|
|||||||
prefcolors_.push_back(color.name());
|
prefcolors_.push_back(color.name());
|
||||||
QPixmap coloritem(32, 32);
|
QPixmap coloritem(32, 32);
|
||||||
coloritem.fill(color);
|
coloritem.fill(color);
|
||||||
QListWidgetItem * newItem = new QListWidgetItem(QIcon(coloritem),
|
#warning Is this a leak or not? (Lgb)
|
||||||
|
/*QListWidgetItem * newItem =*/ new QListWidgetItem(QIcon(coloritem),
|
||||||
toqstr(lcolor.getGUIName(lc)), lyxObjectsLW);
|
toqstr(lcolor.getGUIName(lc)), lyxObjectsLW);
|
||||||
}
|
}
|
||||||
newcolors_ = prefcolors_;
|
newcolors_ = prefcolors_;
|
||||||
|
|
||||||
connect(colorChangePB, SIGNAL(clicked()),
|
connect(colorChangePB, SIGNAL(clicked()),
|
||||||
this, SLOT(change_color()));
|
this, SLOT(change_color()));
|
||||||
connect(lyxObjectsLW, SIGNAL(itemActivated(QListWidgetItem*)),
|
connect(lyxObjectsLW, SIGNAL(itemActivated(QListWidgetItem*)),
|
||||||
this, SLOT(change_color()));
|
this, SLOT(change_color()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PrefColors::apply(LyXRC & rc) const
|
void PrefColors::apply(LyXRC & /*rc*/) const
|
||||||
{
|
{
|
||||||
for (int i = 0; i < lcolors_.size(); ++i) {
|
for (unsigned int i = 0; i < lcolors_.size(); ++i) {
|
||||||
if (prefcolors_[i]!=newcolors_[i])
|
if (prefcolors_[i]!=newcolors_[i])
|
||||||
form_->controller().setColor(lcolors_[i], fromqstr(newcolors_[i]));
|
form_->controller().setColor(lcolors_[i], fromqstr(newcolors_[i]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PrefColors::update(LyXRC const & rc)
|
void PrefColors::update(LyXRC const & /*rc*/)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -552,7 +553,7 @@ void PrefColors::change_color()
|
|||||||
{
|
{
|
||||||
int const row = lyxObjectsLW->currentRow();
|
int const row = lyxObjectsLW->currentRow();
|
||||||
QString color = newcolors_[row];
|
QString color = newcolors_[row];
|
||||||
QColor c(QColorDialog::getColor(QColor(color),
|
QColor c(QColorDialog::getColor(QColor(color),
|
||||||
qApp->focusWidget() ? qApp->focusWidget() : qApp->mainWidget()));
|
qApp->focusWidget() ? qApp->focusWidget() : qApp->mainWidget()));
|
||||||
|
|
||||||
if (c.name()!=color) {
|
if (c.name()!=color) {
|
||||||
@ -560,7 +561,7 @@ void PrefColors::change_color()
|
|||||||
QPixmap coloritem(32, 32);
|
QPixmap coloritem(32, 32);
|
||||||
coloritem.fill(c);
|
coloritem.fill(c);
|
||||||
lyxObjectsLW->currentItem()->setIcon(QIcon(coloritem));
|
lyxObjectsLW->currentItem()->setIcon(QIcon(coloritem));
|
||||||
// emit signal
|
// emit signal
|
||||||
changed();
|
changed();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -849,37 +850,37 @@ PrefConverters::PrefConverters(QPrefs * form, QWidget * parent)
|
|||||||
{
|
{
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
|
|
||||||
connect(converterNewPB, SIGNAL(clicked()),
|
connect(converterNewPB, SIGNAL(clicked()),
|
||||||
this, SLOT(new_converter()));
|
this, SLOT(new_converter()));
|
||||||
connect(converterRemovePB, SIGNAL(clicked()),
|
connect(converterRemovePB, SIGNAL(clicked()),
|
||||||
this, SLOT(remove_converter()));
|
this, SLOT(remove_converter()));
|
||||||
connect(converterModifyPB, SIGNAL(clicked()),
|
connect(converterModifyPB, SIGNAL(clicked()),
|
||||||
this, SLOT(modify_converter()));
|
this, SLOT(modify_converter()));
|
||||||
connect(convertersLW, SIGNAL(currentRowChanged(int)),
|
connect(convertersLW, SIGNAL(currentRowChanged(int)),
|
||||||
this, SLOT(switch_converter(int)));
|
this, SLOT(switch_converter(int)));
|
||||||
connect(converterFromCO, SIGNAL(activated(const QString&)),
|
connect(converterFromCO, SIGNAL(activated(const QString&)),
|
||||||
this, SLOT(converter_changed()));
|
this, SLOT(converter_changed()));
|
||||||
connect(converterToCO, SIGNAL(activated(const QString&)),
|
connect(converterToCO, SIGNAL(activated(const QString&)),
|
||||||
this, SLOT(converter_changed()));
|
this, SLOT(converter_changed()));
|
||||||
connect(converterED, SIGNAL(textChanged(const QString&)),
|
connect(converterED, SIGNAL(textChanged(const QString&)),
|
||||||
this, SLOT(converter_changed()));
|
this, SLOT(converter_changed()));
|
||||||
connect(converterFlagED, SIGNAL(textChanged(const QString&)),
|
connect(converterFlagED, SIGNAL(textChanged(const QString&)),
|
||||||
this, SLOT(converter_changed()));
|
this, SLOT(converter_changed()));
|
||||||
connect(converterNewPB, SIGNAL(clicked()),
|
connect(converterNewPB, SIGNAL(clicked()),
|
||||||
this, SIGNAL(changed()));
|
this, SIGNAL(changed()));
|
||||||
connect(converterRemovePB, SIGNAL(clicked()),
|
connect(converterRemovePB, SIGNAL(clicked()),
|
||||||
this, SIGNAL(changed()));
|
this, SIGNAL(changed()));
|
||||||
connect(converterModifyPB, SIGNAL(clicked()),
|
connect(converterModifyPB, SIGNAL(clicked()),
|
||||||
this, SIGNAL(changed()));
|
this, SIGNAL(changed()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PrefConverters::apply(LyXRC & rc) const
|
void PrefConverters::apply(LyXRC & /*rc*/) const
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PrefConverters::update(LyXRC const & rc)
|
void PrefConverters::update(LyXRC const & /*rc*/)
|
||||||
{
|
{
|
||||||
updateGui();
|
updateGui();
|
||||||
}
|
}
|
||||||
@ -915,7 +916,7 @@ void PrefConverters::updateGui()
|
|||||||
|
|
||||||
// restore selection
|
// restore selection
|
||||||
if (!current.isEmpty()) {
|
if (!current.isEmpty()) {
|
||||||
QList<QListWidgetItem *> const item =
|
QList<QListWidgetItem *> const item =
|
||||||
convertersLW->findItems(current, Qt::MatchExactly);
|
convertersLW->findItems(current, Qt::MatchExactly);
|
||||||
if (item.size()>0)
|
if (item.size()>0)
|
||||||
convertersLW->setCurrentItem(item.at(0));
|
convertersLW->setCurrentItem(item.at(0));
|
||||||
@ -1041,7 +1042,7 @@ PrefCopiers::PrefCopiers(QPrefs * form, QWidget * parent)
|
|||||||
connect(copierNewPB, SIGNAL(clicked()), this, SLOT(new_copier()));
|
connect(copierNewPB, SIGNAL(clicked()), this, SLOT(new_copier()));
|
||||||
connect(copierRemovePB, SIGNAL(clicked()), this, SLOT(remove_copier()));
|
connect(copierRemovePB, SIGNAL(clicked()), this, SLOT(remove_copier()));
|
||||||
connect(copierModifyPB, SIGNAL(clicked()), this, SLOT(modify_copier()));
|
connect(copierModifyPB, SIGNAL(clicked()), this, SLOT(modify_copier()));
|
||||||
connect(AllCopiersLW, SIGNAL(currentRowChanged(int)),
|
connect(AllCopiersLW, SIGNAL(currentRowChanged(int)),
|
||||||
this, SLOT(switch_copierLB(int)));
|
this, SLOT(switch_copierLB(int)));
|
||||||
connect(copierFormatCO, SIGNAL(activated(int)), this, SLOT(switch_copierCO(int)));
|
connect(copierFormatCO, SIGNAL(activated(int)), this, SLOT(switch_copierCO(int)));
|
||||||
connect(copierNewPB, SIGNAL(clicked()),
|
connect(copierNewPB, SIGNAL(clicked()),
|
||||||
@ -1055,12 +1056,12 @@ PrefCopiers::PrefCopiers(QPrefs * form, QWidget * parent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PrefCopiers::apply(LyXRC & rc) const
|
void PrefCopiers::apply(LyXRC & /*rc*/) const
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PrefCopiers::update(LyXRC const & rc)
|
void PrefCopiers::update(LyXRC const & /*rc*/)
|
||||||
{
|
{
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
@ -1095,7 +1096,7 @@ void PrefCopiers::update()
|
|||||||
|
|
||||||
// restore selection
|
// restore selection
|
||||||
if (!current.isEmpty()) {
|
if (!current.isEmpty()) {
|
||||||
QList<QListWidgetItem *> item =
|
QList<QListWidgetItem *> item =
|
||||||
AllCopiersLW->findItems(current, Qt::MatchExactly);
|
AllCopiersLW->findItems(current, Qt::MatchExactly);
|
||||||
if (item.size()>0)
|
if (item.size()>0)
|
||||||
AllCopiersLW->setCurrentItem(item.at(0));
|
AllCopiersLW->setCurrentItem(item.at(0));
|
||||||
@ -1202,7 +1203,7 @@ void PrefCopiers::updateButtons()
|
|||||||
QString selected = copierFormatCO->currentText();
|
QString selected = copierFormatCO->currentText();
|
||||||
|
|
||||||
bool known = false;
|
bool known = false;
|
||||||
for (unsigned int i = 0; i != AllCopiersLW->count(); i++) {
|
for (int i = 0; i < AllCopiersLW->count(); ++i) {
|
||||||
if (AllCopiersLW->item(i)->text() == selected)
|
if (AllCopiersLW->item(i)->text() == selected)
|
||||||
known = true;
|
known = true;
|
||||||
}
|
}
|
||||||
@ -1284,7 +1285,7 @@ PrefFileformats::PrefFileformats(QPrefs * form, QWidget * parent)
|
|||||||
connect(formatNewPB, SIGNAL(clicked()), this, SLOT(new_format()));
|
connect(formatNewPB, SIGNAL(clicked()), this, SLOT(new_format()));
|
||||||
connect(formatRemovePB, SIGNAL(clicked()), this, SLOT(remove_format()));
|
connect(formatRemovePB, SIGNAL(clicked()), this, SLOT(remove_format()));
|
||||||
connect(formatModifyPB, SIGNAL(clicked()), this, SLOT(modify_format()));
|
connect(formatModifyPB, SIGNAL(clicked()), this, SLOT(modify_format()));
|
||||||
connect(formatsLW, SIGNAL(currentRowChanged(int)),
|
connect(formatsLW, SIGNAL(currentRowChanged(int)),
|
||||||
this, SLOT(switch_format(int)));
|
this, SLOT(switch_format(int)));
|
||||||
connect(formatED, SIGNAL(textChanged(const QString&)), this, SLOT(fileformat_changed()));
|
connect(formatED, SIGNAL(textChanged(const QString&)), this, SLOT(fileformat_changed()));
|
||||||
connect(guiNameED, SIGNAL(textChanged(const QString&)), this, SLOT(fileformat_changed()));
|
connect(guiNameED, SIGNAL(textChanged(const QString&)), this, SLOT(fileformat_changed()));
|
||||||
@ -1302,12 +1303,12 @@ PrefFileformats::PrefFileformats(QPrefs * form, QWidget * parent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PrefFileformats::apply(LyXRC & rc) const
|
void PrefFileformats::apply(LyXRC & /*rc*/) const
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PrefFileformats::update(LyXRC const & rc)
|
void PrefFileformats::update(LyXRC const & /*rc*/)
|
||||||
{
|
{
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
@ -1376,7 +1377,7 @@ void PrefFileformats::updateButtons()
|
|||||||
int const sel = form_->formats().getNumber(fromqstr(format));
|
int const sel = form_->formats().getNumber(fromqstr(format));
|
||||||
bool gui_name_known = false;
|
bool gui_name_known = false;
|
||||||
int where = sel;
|
int where = sel;
|
||||||
for (unsigned int i = 0; i != formatsLW->count(); i++) {
|
for (int i = 0; i < formatsLW->count(); ++i) {
|
||||||
if (formatsLW->item(i)->text() == gui_name) {
|
if (formatsLW->item(i)->text() == gui_name) {
|
||||||
gui_name_known = true;
|
gui_name_known = true;
|
||||||
where = formatsLW->item(i)->type();
|
where = formatsLW->item(i)->type();
|
||||||
@ -1432,7 +1433,7 @@ void PrefFileformats::new_format()
|
|||||||
bool const document = documentCB->isChecked();
|
bool const document = documentCB->isChecked();
|
||||||
|
|
||||||
form_->formats().add(name, extension, prettyname, shortcut, viewer,
|
form_->formats().add(name, extension, prettyname, shortcut, viewer,
|
||||||
editor, document);
|
editor, document);
|
||||||
form_->formats().sort();
|
form_->formats().sort();
|
||||||
update();
|
update();
|
||||||
|
|
||||||
@ -1467,7 +1468,7 @@ void PrefFileformats::modify_format()
|
|||||||
bool const document = documentCB->isChecked();
|
bool const document = documentCB->isChecked();
|
||||||
|
|
||||||
form_->formats().add(name, extension, prettyname, shortcut, viewer,
|
form_->formats().add(name, extension, prettyname, shortcut, viewer,
|
||||||
editor, document);
|
editor, document);
|
||||||
form_->formats().sort();
|
form_->formats().sort();
|
||||||
|
|
||||||
formatsLW->setUpdatesEnabled(false);
|
formatsLW->setUpdatesEnabled(false);
|
||||||
@ -1817,7 +1818,7 @@ QPrefsDialog::QPrefsDialog(QPrefs * form)
|
|||||||
add(formats);
|
add(formats);
|
||||||
|
|
||||||
add(new PrefCopiers(form_));
|
add(new PrefCopiers(form_));
|
||||||
|
|
||||||
add(new PrefLanguage);
|
add(new PrefLanguage);
|
||||||
add(new PrefPrinter);
|
add(new PrefPrinter);
|
||||||
add(new PrefUserInterface(form_));
|
add(new PrefUserInterface(form_));
|
||||||
|
@ -61,7 +61,7 @@ class PrefModule : public QWidget
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
PrefModule(std::string const & cat, std::string const & t, QPrefs * form = 0, QWidget * parent = 0)
|
PrefModule(std::string const & cat, std::string const & t, QPrefs * form = 0, QWidget * parent = 0)
|
||||||
: category_(cat), title_(t), form_(form), QWidget(parent)
|
: QWidget(parent), category_(cat), title_(t), form_(form)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
virtual ~PrefModule() {}
|
virtual ~PrefModule() {}
|
||||||
@ -395,7 +395,7 @@ protected:
|
|||||||
private:
|
private:
|
||||||
void add(PrefModule * module);
|
void add(PrefModule * module);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QPrefs * form_;
|
QPrefs * form_;
|
||||||
std::vector<PrefModule *> modules_;
|
std::vector<PrefModule *> modules_;
|
||||||
};
|
};
|
||||||
|
@ -198,11 +198,10 @@ void QRef::redoRefs()
|
|||||||
dialog_->refsLW->setCurrentRow(lastref);
|
dialog_->refsLW->setCurrentRow(lastref);
|
||||||
dialog_->refsLW->clearSelection();
|
dialog_->refsLW->clearSelection();
|
||||||
} else
|
} else
|
||||||
for (unsigned int i = 0; i < dialog_->refsLW->count(); ++i) {
|
for (int i = 0; i < dialog_->refsLW->count(); ++i) {
|
||||||
if (tmp == dialog_->refsLW->item(i)->text()) {
|
QListWidgetItem * item = dialog_->refsLW->item(i);
|
||||||
QListWidgetItem * const item = dialog_->refsLW->item(i);
|
if (tmp == item->text()) {
|
||||||
dialog_->refsLW->setItemSelected(item, true);
|
dialog_->refsLW->setItemSelected(item, true);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,19 +28,19 @@ QSpellcheckerDialog::QSpellcheckerDialog(QSpellchecker * form)
|
|||||||
connect(closePB, SIGNAL(clicked()),
|
connect(closePB, SIGNAL(clicked()),
|
||||||
form, SLOT(slotClose()));
|
form, SLOT(slotClose()));
|
||||||
|
|
||||||
connect( replaceCO, SIGNAL( highlighted(const QString&) ),
|
connect( replaceCO, SIGNAL( highlighted(const QString&) ),
|
||||||
this, SLOT( replaceChanged(const QString &) ) );
|
this, SLOT( replaceChanged(const QString &) ) );
|
||||||
connect( replacePB, SIGNAL( clicked() ),
|
connect( replacePB, SIGNAL( clicked() ),
|
||||||
this, SLOT( replaceClicked() ) );
|
this, SLOT( replaceClicked() ) );
|
||||||
connect( ignorePB, SIGNAL( clicked() ),
|
connect( ignorePB, SIGNAL( clicked() ),
|
||||||
this, SLOT( ignoreClicked() ) );
|
this, SLOT( ignoreClicked() ) );
|
||||||
connect( replacePB_3, SIGNAL( clicked() ),
|
connect( replacePB_3, SIGNAL( clicked() ),
|
||||||
this, SLOT( acceptClicked() ) );
|
this, SLOT( acceptClicked() ) );
|
||||||
connect( addPB, SIGNAL( clicked() ),
|
connect( addPB, SIGNAL( clicked() ),
|
||||||
this, SLOT( addClicked() ) );
|
this, SLOT( addClicked() ) );
|
||||||
connect( suggestionsLW, SIGNAL( itemDoubleClicked(QListWidgetItem*) ),
|
connect( suggestionsLW, SIGNAL( itemDoubleClicked(QListWidgetItem*) ),
|
||||||
this, SLOT( replaceClicked() ) );
|
this, SLOT( replaceClicked() ) );
|
||||||
connect( suggestionsLW, SIGNAL( itemClicked(QListWidgetItem*) ),
|
connect( suggestionsLW, SIGNAL( itemClicked(QListWidgetItem*) ),
|
||||||
this, SLOT( suggestionChanged(QListWidgetItem*) ) );
|
this, SLOT( suggestionChanged(QListWidgetItem*) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,14 +80,12 @@ void QSpellcheckerDialog::replaceChanged(const QString & str)
|
|||||||
if (suggestionsLW->currentItem()->text() == str)
|
if (suggestionsLW->currentItem()->text() == str)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
unsigned int i = 0;
|
for (int i = 0; i < suggestionsLW->count(); ++i) {
|
||||||
for (; i < suggestionsLW->count(); ++i) {
|
if (suggestionsLW->item(i)->text() == str) {
|
||||||
if (suggestionsLW->item(i)->text() == str)
|
suggestionsLW->setCurrentRow(i);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i != suggestionsLW->count())
|
|
||||||
suggestionsLW->setCurrentRow(i);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -40,19 +40,19 @@ QThesaurusDialog::QThesaurusDialog(QThesaurus * form)
|
|||||||
|
|
||||||
connect(closePB, SIGNAL(clicked()),
|
connect(closePB, SIGNAL(clicked()),
|
||||||
form, SLOT(slotClose()));
|
form, SLOT(slotClose()));
|
||||||
connect( replaceED, SIGNAL( returnPressed() ),
|
connect( replaceED, SIGNAL( returnPressed() ),
|
||||||
this, SLOT( replaceClicked() ) );
|
this, SLOT( replaceClicked() ) );
|
||||||
connect( replaceED, SIGNAL( textChanged(const QString&) ),
|
connect( replaceED, SIGNAL( textChanged(const QString&) ),
|
||||||
this, SLOT( change_adaptor() ) );
|
this, SLOT( change_adaptor() ) );
|
||||||
connect( entryED, SIGNAL( returnPressed() ),
|
connect( entryED, SIGNAL( returnPressed() ),
|
||||||
this, SLOT( entryChanged() ) );
|
this, SLOT( entryChanged() ) );
|
||||||
connect( replacePB, SIGNAL( clicked() ),
|
connect( replacePB, SIGNAL( clicked() ),
|
||||||
this, SLOT( replaceClicked() ) );
|
this, SLOT( replaceClicked() ) );
|
||||||
connect( meaningsTV, SIGNAL( itemClicked(QTreeWidgetItem * , int) ),
|
connect( meaningsTV, SIGNAL( itemClicked(QTreeWidgetItem * , int) ),
|
||||||
this, SLOT( itemClicked(QTreeWidgetItem * , int) ) );
|
this, SLOT( itemClicked(QTreeWidgetItem * , int) ) );
|
||||||
connect( meaningsTV, SIGNAL( itemSelectionChanged() ),
|
connect( meaningsTV, SIGNAL( itemSelectionChanged() ),
|
||||||
this, SLOT( selectionChanged() ) );
|
this, SLOT( selectionChanged() ) );
|
||||||
connect( meaningsTV, SIGNAL( itemActivated(QTreeWidgetItem * , int) ),
|
connect( meaningsTV, SIGNAL( itemActivated(QTreeWidgetItem * , int) ),
|
||||||
this, SLOT( selectionClicked(QTreeWidgetItem *, int) ) );
|
this, SLOT( selectionClicked(QTreeWidgetItem *, int) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,7 +94,7 @@ void QThesaurusDialog::selectionChanged()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void QThesaurusDialog::itemClicked(QTreeWidgetItem * item, int col)
|
void QThesaurusDialog::itemClicked(QTreeWidgetItem * /*item*/, int /*col*/)
|
||||||
{
|
{
|
||||||
selectionChanged();
|
selectionChanged();
|
||||||
}
|
}
|
||||||
|
@ -60,10 +60,11 @@ QTocDialog::~QTocDialog()
|
|||||||
|
|
||||||
|
|
||||||
void QTocDialog::selectionChanged(const QModelIndex & current,
|
void QTocDialog::selectionChanged(const QModelIndex & current,
|
||||||
const QModelIndex & previous)
|
const QModelIndex & /*previous*/)
|
||||||
{
|
{
|
||||||
lyxerr[Debug::GUI]
|
lyxerr[Debug::GUI]
|
||||||
<< "selectionChanged index " << current.row() << ", " << current.column()
|
<< "selectionChanged index " << current.row()
|
||||||
|
<< ", " << current.column()
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
form_->goTo(current);
|
form_->goTo(current);
|
||||||
@ -189,7 +190,7 @@ void QTocDialog::updateGui()
|
|||||||
tocTV->setModel(form_->tocModel());
|
tocTV->setModel(form_->tocModel());
|
||||||
tocTV->showColumn(0);
|
tocTV->showColumn(0);
|
||||||
// hide the pointless QHeader for now
|
// hide the pointless QHeader for now
|
||||||
// in the future, new columns may appear
|
// in the future, new columns may appear
|
||||||
// like labels, bookmarks, etc...
|
// like labels, bookmarks, etc...
|
||||||
// tocTV->header()->hide();
|
// tocTV->header()->hide();
|
||||||
tocTV->header()->setVisible(true);
|
tocTV->header()->setVisible(true);
|
||||||
|
@ -31,7 +31,7 @@ using std::string;
|
|||||||
|
|
||||||
// FIXME: set disabled doesn't work properly
|
// FIXME: set disabled doesn't work properly
|
||||||
// should be fixed now (jspitzm)
|
// should be fixed now (jspitzm)
|
||||||
FloatPlacement::FloatPlacement(QWidget * parent, char * name)
|
FloatPlacement::FloatPlacement(QWidget * parent, char * /*name*/)
|
||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
{
|
{
|
||||||
QHBoxLayout * toplayout = new QHBoxLayout(this, 11, 6);
|
QHBoxLayout * toplayout = new QHBoxLayout(this, 11, 6);
|
||||||
@ -104,7 +104,7 @@ void FloatPlacement::useSideways()
|
|||||||
|
|
||||||
void FloatPlacement::changedSlot()
|
void FloatPlacement::changedSlot()
|
||||||
{
|
{
|
||||||
// emit signal
|
// emit signal
|
||||||
changed();
|
changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,16 +109,16 @@ namespace lyx_gui {
|
|||||||
bool use_gui = true;
|
bool use_gui = true;
|
||||||
|
|
||||||
int exec(int & argc, char * argv[])
|
int exec(int & argc, char * argv[])
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
FIXME : Abdel 29/05/2006 (younes.a@free.fr)
|
FIXME : Abdel 29/05/2006 (younes.a@free.fr)
|
||||||
reorganize this code. In particular make sure that this
|
reorganize this code. In particular make sure that this
|
||||||
advice from Qt documentation is respected:
|
advice from Qt documentation is respected:
|
||||||
|
|
||||||
Since the QApplication object does so much initialization, it
|
Since the QApplication object does so much initialization, it
|
||||||
must be created before any other objects related to the user
|
must be created before any other objects related to the user
|
||||||
interface are created.
|
interface are created.
|
||||||
|
|
||||||
Right now this is not the case, I suspect that a number of global variables
|
Right now this is not the case, I suspect that a number of global variables
|
||||||
contains Qt object that are initialized before the passage through
|
contains Qt object that are initialized before the passage through
|
||||||
parse_init(). This might also explain the message displayed by Qt
|
parse_init(). This might also explain the message displayed by Qt
|
||||||
@ -204,13 +204,13 @@ int start(string const & batch, vector<string> const & files,
|
|||||||
GuiView & view = static_cast<GuiView &> (theApp->gui().view(view_id));
|
GuiView & view = static_cast<GuiView &> (theApp->gui().view(view_id));
|
||||||
|
|
||||||
// FIXME: for now we assume that there is only one LyXView with id = 0.
|
// FIXME: for now we assume that there is only one LyXView with id = 0.
|
||||||
int workArea_id_ = theApp->gui().newWorkArea(width, height, 0);
|
/*int workArea_id_ =*/ theApp->gui().newWorkArea(width, height, 0);
|
||||||
//WorkArea * workArea_ = & theApp->gui().workArea(workArea_id_);
|
//WorkArea * workArea_ = & theApp->gui().workArea(workArea_id_);
|
||||||
|
|
||||||
LyX::ref().addLyXView(&view);
|
LyX::ref().addLyXView(&view);
|
||||||
|
|
||||||
view.init();
|
view.init();
|
||||||
|
|
||||||
// only true when the -geometry option was NOT used
|
// only true when the -geometry option was NOT used
|
||||||
if (width != 0 && height != 0) {
|
if (width != 0 && height != 0) {
|
||||||
if (posx != -1 && posy != -1) {
|
if (posx != -1 && posy != -1) {
|
||||||
|
@ -130,7 +130,8 @@ void PanelStack::setCurrentPanel(string const & name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PanelStack::switchPanel(QTreeWidgetItem * item, QTreeWidgetItem* previous)
|
void PanelStack::switchPanel(QTreeWidgetItem * item,
|
||||||
|
QTreeWidgetItem * /*previous*/)
|
||||||
{
|
{
|
||||||
WidgetMap::const_iterator cit = widget_map_.find(item);
|
WidgetMap::const_iterator cit = widget_map_.find(item);
|
||||||
if (cit == widget_map_.end())
|
if (cit == widget_map_.end())
|
||||||
|
@ -350,7 +350,7 @@ int MathNestInset::latex(Buffer const &, std::ostream & os,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathNestInset::notifyCursorLeaves(LCursor & cur)
|
void MathNestInset::notifyCursorLeaves(LCursor & /*cur*/)
|
||||||
{
|
{
|
||||||
#ifdef WITH_WARNINGS
|
#ifdef WITH_WARNINGS
|
||||||
#warning look here
|
#warning look here
|
||||||
@ -874,10 +874,10 @@ void MathNestInset::doDispatch(LCursor & cur, FuncRequest & cmd)
|
|||||||
string const rdelim = cmd.getArg(3);
|
string const rdelim = cmd.getArg(3);
|
||||||
latexkeys const * l = in_word_set(lname);
|
latexkeys const * l = in_word_set(lname);
|
||||||
bool const have_l = l && l->inset == "big" &&
|
bool const have_l = l && l->inset == "big" &&
|
||||||
MathBigInset::isBigInsetDelim(ldelim);
|
MathBigInset::isBigInsetDelim(ldelim);
|
||||||
l = in_word_set(rname);
|
l = in_word_set(rname);
|
||||||
bool const have_r = l && l->inset == "big" &&
|
bool const have_r = l && l->inset == "big" &&
|
||||||
MathBigInset::isBigInsetDelim(rdelim);
|
MathBigInset::isBigInsetDelim(rdelim);
|
||||||
// We mimic LFUN_MATH_DELIM in case we have an empty left
|
// We mimic LFUN_MATH_DELIM in case we have an empty left
|
||||||
// or right delimiter.
|
// or right delimiter.
|
||||||
if (have_l || have_r) {
|
if (have_l || have_r) {
|
||||||
|
10
src/text.C
10
src/text.C
@ -325,28 +325,28 @@ void readParToken(Buffer const & buf, Paragraph & par, LyXLex & lex,
|
|||||||
} else if (token == "\\change_inserted") {
|
} else if (token == "\\change_inserted") {
|
||||||
lex.eatLine();
|
lex.eatLine();
|
||||||
std::istringstream is(lex.getString());
|
std::istringstream is(lex.getString());
|
||||||
int aid;
|
unsigned int aid;
|
||||||
lyx::time_type ct;
|
lyx::time_type ct;
|
||||||
is >> aid >> ct;
|
is >> aid >> ct;
|
||||||
if (aid >= bp.author_map.size()) {
|
if (aid >= bp.author_map.size()) {
|
||||||
buf.error(ErrorItem(_("Change tracking error"),
|
buf.error(ErrorItem(_("Change tracking error"),
|
||||||
bformat(_("Unknown author index for insertion: %1$d\n"), aid),
|
bformat(_("Unknown author index for insertion: %1$d\n"), aid),
|
||||||
par.id(), 0, par.size()));
|
par.id(), 0, par.size()));
|
||||||
|
|
||||||
change = Change(Change::UNCHANGED);
|
change = Change(Change::UNCHANGED);
|
||||||
} else
|
} else
|
||||||
change = Change(Change::INSERTED, bp.author_map[aid], ct);
|
change = Change(Change::INSERTED, bp.author_map[aid], ct);
|
||||||
} else if (token == "\\change_deleted") {
|
} else if (token == "\\change_deleted") {
|
||||||
lex.eatLine();
|
lex.eatLine();
|
||||||
std::istringstream is(lex.getString());
|
std::istringstream is(lex.getString());
|
||||||
int aid;
|
unsigned int aid;
|
||||||
lyx::time_type ct;
|
lyx::time_type ct;
|
||||||
is >> aid >> ct;
|
is >> aid >> ct;
|
||||||
if (aid >= bp.author_map.size()) {
|
if (aid >= bp.author_map.size()) {
|
||||||
buf.error(ErrorItem(_("Change tracking error"),
|
buf.error(ErrorItem(_("Change tracking error"),
|
||||||
bformat(_("Unknown author index for deletion: %1$d\n"), aid),
|
bformat(_("Unknown author index for deletion: %1$d\n"), aid),
|
||||||
par.id(), 0, par.size()));
|
par.id(), 0, par.size()));
|
||||||
|
|
||||||
change = Change(Change::UNCHANGED);
|
change = Change(Change::UNCHANGED);
|
||||||
} else
|
} else
|
||||||
change = Change(Change::DELETED, bp.author_map[aid], ct);
|
change = Change(Change::DELETED, bp.author_map[aid], ct);
|
||||||
@ -521,7 +521,7 @@ int LyXText::leftMargin(pit_type const pit, pos_type const pos) const
|
|||||||
switch (layout->margintype) {
|
switch (layout->margintype) {
|
||||||
case MARGIN_DYNAMIC:
|
case MARGIN_DYNAMIC:
|
||||||
if (!layout->leftmargin.empty())
|
if (!layout->leftmargin.empty())
|
||||||
l_margin += font_metrics::signedWidth(layout->leftmargin,
|
l_margin += font_metrics::signedWidth(layout->leftmargin,
|
||||||
params.getFont());
|
params.getFont());
|
||||||
if (!par.getLabelstring().empty()) {
|
if (!par.getLabelstring().empty()) {
|
||||||
l_margin += font_metrics::signedWidth(layout->labelindent,
|
l_margin += font_metrics::signedWidth(layout->labelindent,
|
||||||
|
@ -212,7 +212,9 @@ LyXFont LyXText::getFont(Paragraph const & par, pos_type const pos) const
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Realize against environment font information
|
// Realize against environment font information
|
||||||
if (pit < pars_.size())
|
// NOTE: the cast to pit_type should be removed when pit_type
|
||||||
|
// changes to a unsigned integer.
|
||||||
|
if (pit < pit_type(pars_.size()))
|
||||||
font.realize(outerFont(pit, pars_));
|
font.realize(outerFont(pit, pars_));
|
||||||
|
|
||||||
// Realize with the fonts of lesser depth.
|
// Realize with the fonts of lesser depth.
|
||||||
|
Loading…
Reference in New Issue
Block a user