mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-11 03:03:06 +00:00
move the title_ string to the base class Dialog::View
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7003 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
81a967c573
commit
0062cd3408
@ -1,6 +1,11 @@
|
|||||||
|
2003-05-21 Alfredo Braunstein <abraunst@libero.it>
|
||||||
|
|
||||||
|
* ViewBase.h:
|
||||||
|
* Dialog.h (setTitle): added
|
||||||
|
|
||||||
2003-05-20 Alfredo Braunstein <abraunst@libero.it>
|
2003-05-20 Alfredo Braunstein <abraunst@libero.it>
|
||||||
|
|
||||||
ControlErrorList.[Ch]: small bugs fixed, use ErrorList
|
* ControlErrorList.[Ch]: small bugs fixed, use ErrorList
|
||||||
|
|
||||||
2003-05-13 André Pönitz <poenitz@gmx.net>
|
2003-05-13 André Pönitz <poenitz@gmx.net>
|
||||||
|
|
||||||
|
@ -162,6 +162,18 @@ Dialog::View & Dialog::view() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Dialog::View::setTitle(string const & newtitle)
|
||||||
|
{
|
||||||
|
title_ = newtitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
string const & Dialog::View::getTitle() const
|
||||||
|
{
|
||||||
|
return title_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Dialog::setController(Controller * i)
|
void Dialog::setController(Controller * i)
|
||||||
{
|
{
|
||||||
lyx::Assert(i && !controller_ptr_.get());
|
lyx::Assert(i && !controller_ptr_.get());
|
||||||
|
@ -179,7 +179,7 @@ private:
|
|||||||
*/
|
*/
|
||||||
class Dialog::View : boost::noncopyable {
|
class Dialog::View : boost::noncopyable {
|
||||||
public:
|
public:
|
||||||
View(Dialog & parent) : p_(parent) {}
|
View(Dialog & parent, string title) : p_(parent), title_(title) {}
|
||||||
virtual ~View() {}
|
virtual ~View() {}
|
||||||
|
|
||||||
//@{
|
//@{
|
||||||
@ -225,6 +225,11 @@ public:
|
|||||||
Dialog & dialog() { return p_; }
|
Dialog & dialog() { return p_; }
|
||||||
Dialog const & dialog() const { return p_; }
|
Dialog const & dialog() const { return p_; }
|
||||||
|
|
||||||
|
/// sets the title of the dialog (window caption)
|
||||||
|
void setTitle(string const &);
|
||||||
|
/// gets the title of the dialog (window caption)
|
||||||
|
string const & getTitle() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Kernel & kernel() { return p_.kernel(); }
|
Kernel & kernel() { return p_.kernel(); }
|
||||||
Kernel const & kernel() const { return p_.kernel(); }
|
Kernel const & kernel() const { return p_.kernel(); }
|
||||||
@ -239,6 +244,8 @@ protected:
|
|||||||
private:
|
private:
|
||||||
///
|
///
|
||||||
Dialog & p_;
|
Dialog & p_;
|
||||||
|
///
|
||||||
|
string title_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
#include "support/LAssert.h"
|
#include "support/LAssert.h"
|
||||||
|
|
||||||
|
|
||||||
ViewBase::ViewBase()
|
ViewBase::ViewBase(string const & t)
|
||||||
: controller_ptr_(0)
|
: controller_ptr_(0), title_(t)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -26,6 +26,18 @@ void ViewBase::setController(ControlButtons & c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ViewBase::setTitle(string const & newtitle)
|
||||||
|
{
|
||||||
|
title_ = newtitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
string const & ViewBase::getTitle() const
|
||||||
|
{
|
||||||
|
return title_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
ControlButtons & ViewBase::getController()
|
ControlButtons & ViewBase::getController()
|
||||||
{
|
{
|
||||||
lyx::Assert(controller_ptr_);
|
lyx::Assert(controller_ptr_);
|
||||||
|
@ -20,7 +20,7 @@ class ButtonController;
|
|||||||
class ViewBase : boost::noncopyable {
|
class ViewBase : boost::noncopyable {
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
ViewBase();
|
ViewBase(string const &);
|
||||||
///
|
///
|
||||||
virtual ~ViewBase() {}
|
virtual ~ViewBase() {}
|
||||||
|
|
||||||
@ -56,9 +56,18 @@ public:
|
|||||||
ControlButtons const & getController() const;
|
ControlButtons const & getController() const;
|
||||||
///
|
///
|
||||||
ButtonController & bc();
|
ButtonController & bc();
|
||||||
|
/// sets the title of the dialog (window caption)
|
||||||
|
void setTitle(string const &);
|
||||||
|
/// gets the title of the dialog
|
||||||
|
string const & getTitle() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/// We don't own this.
|
/// We don't own this.
|
||||||
ControlButtons * controller_ptr_;
|
ControlButtons * controller_ptr_;
|
||||||
|
|
||||||
|
private:
|
||||||
|
string title_;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // VIEWBASE_H
|
#endif // VIEWBASE_H
|
||||||
|
@ -1,3 +1,35 @@
|
|||||||
|
2003-05-21 Alfredo Braunstein <abraunst@libero.it>
|
||||||
|
|
||||||
|
* Qt2Base.[Ch]:
|
||||||
|
* QDialogView.[Ch] (setTitle): added
|
||||||
|
* QAbout.C:
|
||||||
|
* QBibitem.C:
|
||||||
|
* QBibtex.C:
|
||||||
|
* QChanges.C:
|
||||||
|
* QCharacter.C:
|
||||||
|
* QCitation.C:
|
||||||
|
* QERT.C:
|
||||||
|
* QError.C:
|
||||||
|
* QErrorList.C:
|
||||||
|
* QErrorListDialog.C:
|
||||||
|
* QExternal.C:
|
||||||
|
* QFloat.C:
|
||||||
|
* QGraphics.C:
|
||||||
|
* QInclude.C:
|
||||||
|
* QLog.C:
|
||||||
|
* QMinipage.C:
|
||||||
|
* QParagraph.C:
|
||||||
|
* QRef.C:
|
||||||
|
* QShowFile.C:
|
||||||
|
* QTabular.C:
|
||||||
|
* QTabularCreate.C:
|
||||||
|
* QThesaurus.C:
|
||||||
|
* QToc.C:
|
||||||
|
* QURL.C:
|
||||||
|
* QVCLog.C:
|
||||||
|
* QWrap.C: the argument to Dialog::View ctor is now a string. use
|
||||||
|
setTitle instead of setCaption when appropriate
|
||||||
|
|
||||||
2003-05-22 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
2003-05-22 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||||
|
|
||||||
* QErrorListDialog.C: remove include for <qtextedit.h>
|
* QErrorListDialog.C: remove include for <qtextedit.h>
|
||||||
|
@ -33,7 +33,7 @@ typedef QController<ControlAboutlyx, QView<QAboutDialog> > base_class;
|
|||||||
|
|
||||||
|
|
||||||
QAbout::QAbout(Dialog & parent)
|
QAbout::QAbout(Dialog & parent)
|
||||||
: base_class(parent, qt_("About LyX"))
|
: base_class(parent, _("About LyX"))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ typedef QController<ControlCommand, QView<QBibitemDialog> > base_class;
|
|||||||
|
|
||||||
|
|
||||||
QBibitem::QBibitem(Dialog & parent)
|
QBibitem::QBibitem(Dialog & parent)
|
||||||
: base_class(parent, qt_("LyX: Bibliography Item Settings"))
|
: base_class(parent, _("LyX: Bibliography Item Settings"))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ typedef QController<ControlBibtex, QView<QBibtexDialog> > base_class;
|
|||||||
|
|
||||||
|
|
||||||
QBibtex::QBibtex(Dialog & parent)
|
QBibtex::QBibtex(Dialog & parent)
|
||||||
: base_class(parent, qt_("BibTeX"))
|
: base_class(parent, _("BibTeX"))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ typedef QController<ControlChanges, QView<QChangesDialog> > base_class;
|
|||||||
|
|
||||||
|
|
||||||
QChanges::QChanges(Dialog & parent)
|
QChanges::QChanges(Dialog & parent)
|
||||||
: base_class(parent, qt_("LyX: Merge Changes"))
|
: base_class(parent, _("LyX: Merge Changes"))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ typedef QController<ControlCharacter, QView<QCharacterDialog> > base_class;
|
|||||||
|
|
||||||
|
|
||||||
QCharacter::QCharacter(Dialog & parent)
|
QCharacter::QCharacter(Dialog & parent)
|
||||||
: base_class(parent, qt_("LyX: Change Text Style"))
|
: base_class(parent, _("LyX: Change Text Style"))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ typedef QController<ControlCitation, QView<QCitationDialog> > base_class;
|
|||||||
|
|
||||||
|
|
||||||
QCitation::QCitation(Dialog & parent)
|
QCitation::QCitation(Dialog & parent)
|
||||||
: base_class(parent, qt_("LyX: Citation Reference"))
|
: base_class(parent, _("LyX: Citation Reference"))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#include <qapplication.h>
|
#include <qapplication.h>
|
||||||
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
#include "qt_helpers.h"
|
||||||
#include "QtLyXView.h"
|
#include "QtLyXView.h"
|
||||||
#include "QDialogView.h"
|
#include "QDialogView.h"
|
||||||
#include "Qt2BC.h"
|
#include "Qt2BC.h"
|
||||||
@ -22,8 +23,8 @@
|
|||||||
#include "support/LAssert.h"
|
#include "support/LAssert.h"
|
||||||
|
|
||||||
|
|
||||||
QDialogView::QDialogView(Dialog & parent, QString const & t)
|
QDialogView::QDialogView(Dialog & parent, string const & t)
|
||||||
: Dialog::View(parent), updating_(false), title_(t)
|
: Dialog::View(parent,t), updating_(false)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -55,10 +56,11 @@ void QDialogView::show()
|
|||||||
|
|
||||||
update(); // make sure its up-to-date
|
update(); // make sure its up-to-date
|
||||||
|
|
||||||
|
form()->setCaption(toqstr(getTitle()));
|
||||||
|
|
||||||
if (form()->isVisible()) {
|
if (form()->isVisible()) {
|
||||||
form()->raise();
|
form()->raise();
|
||||||
} else {
|
} else {
|
||||||
form()->setCaption(title_);
|
|
||||||
form()->show();
|
form()->show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,12 +29,11 @@ class QDialogView : public QObject, public Dialog::View {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
QDialogView(Dialog &, QString const &);
|
QDialogView(Dialog &, string const &);
|
||||||
///
|
///
|
||||||
virtual ~QDialogView() {}
|
virtual ~QDialogView() {}
|
||||||
///
|
///
|
||||||
bool readOnly() const;
|
bool readOnly() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/// build the actual dialog
|
/// build the actual dialog
|
||||||
virtual void build_dialog() = 0;
|
virtual void build_dialog() = 0;
|
||||||
@ -78,10 +77,6 @@ protected slots:
|
|||||||
private:
|
private:
|
||||||
/// Pointer to the actual instantiation of the Qt dialog
|
/// Pointer to the actual instantiation of the Qt dialog
|
||||||
virtual QDialog * form() const = 0;
|
virtual QDialog * form() const = 0;
|
||||||
|
|
||||||
private:
|
|
||||||
/// dialog title, displayed by WM.
|
|
||||||
QString title_;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ typedef QController<ControlERT, QView<QERTDialog> > base_class;
|
|||||||
|
|
||||||
|
|
||||||
QERT::QERT(Dialog & parent)
|
QERT::QERT(Dialog & parent)
|
||||||
: base_class(parent, qt_("LyX: TeX Code Settings"))
|
: base_class(parent, _("LyX: TeX Code Settings"))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ typedef QController<ControlError, QView<QErrorDialog> > base_class;
|
|||||||
|
|
||||||
|
|
||||||
QError::QError(Dialog & parent)
|
QError::QError(Dialog & parent)
|
||||||
: base_class(parent, qt_("LyX: LaTeX Error"))
|
: base_class(parent, _("LyX: LaTeX Error"))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ void QErrorList::select(int item)
|
|||||||
|
|
||||||
void QErrorList::update_contents()
|
void QErrorList::update_contents()
|
||||||
{
|
{
|
||||||
dialog_->setCaption(toqstr(controller().name()));
|
setTitle(controller().name());
|
||||||
dialog_->errorsLB->clear();
|
dialog_->errorsLB->clear();
|
||||||
dialog_->descriptionTB->setText(QString());
|
dialog_->descriptionTB->setText(QString());
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ typedef QController<ControlExternal, QView<QExternalDialog> > base_class;
|
|||||||
|
|
||||||
|
|
||||||
QExternal::QExternal(Dialog & parent)
|
QExternal::QExternal(Dialog & parent)
|
||||||
: base_class(parent, qt_("LyX: External Material"))
|
: base_class(parent, _("LyX: External Material"))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ typedef QController<ControlFloat, QView<QFloatDialog> > base_class;
|
|||||||
|
|
||||||
|
|
||||||
QFloat::QFloat(Dialog & parent)
|
QFloat::QFloat(Dialog & parent)
|
||||||
: base_class(parent, qt_("LyX: Float Settings"))
|
: base_class(parent, _("LyX: Float Settings"))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ typedef QController<ControlGraphics, QView<QGraphicsDialog> > base_class;
|
|||||||
|
|
||||||
|
|
||||||
QGraphics::QGraphics(Dialog & parent)
|
QGraphics::QGraphics(Dialog & parent)
|
||||||
: base_class(parent, qt_("LyX: Graphics"))
|
: base_class(parent, _("LyX: Graphics"))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ typedef QController<ControlInclude, QView<QIncludeDialog> > base_class;
|
|||||||
|
|
||||||
|
|
||||||
QInclude::QInclude(Dialog & parent)
|
QInclude::QInclude(Dialog & parent)
|
||||||
: base_class(parent, qt_("LyX: Child Document"))
|
: base_class(parent, _("LyX: Child Document"))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ using std::getline;
|
|||||||
typedef QController<ControlLog, QView<QLogDialog> > base_class;
|
typedef QController<ControlLog, QView<QLogDialog> > base_class;
|
||||||
|
|
||||||
QLog::QLog(Dialog & parent)
|
QLog::QLog(Dialog & parent)
|
||||||
: base_class(parent, qt_("LyX: LaTeX Log"))
|
: base_class(parent, _("LyX: LaTeX Log"))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,9 +50,9 @@ void QLog::update_contents()
|
|||||||
controller().logfile();
|
controller().logfile();
|
||||||
|
|
||||||
if (logfile.first == Buffer::buildlog)
|
if (logfile.first == Buffer::buildlog)
|
||||||
dialog_->setCaption(qt_("Build log"));
|
setTitle(_("Build log"));
|
||||||
else
|
else
|
||||||
dialog_->setCaption(qt_("LaTeX log"));
|
setTitle(_("LaTeX log"));
|
||||||
|
|
||||||
dialog_->logTV->setText("");
|
dialog_->logTV->setText("");
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ typedef QController<ControlMinipage, QView<QMinipageDialog> > base_class;
|
|||||||
|
|
||||||
|
|
||||||
QMinipage::QMinipage(Dialog & parent)
|
QMinipage::QMinipage(Dialog & parent)
|
||||||
: base_class(parent, qt_("LyX: Minipage Settings"))
|
: base_class(parent, _("LyX: Minipage Settings"))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ typedef QController<ControlParagraph, QView<QParagraphDialog> > base_class;
|
|||||||
|
|
||||||
|
|
||||||
QParagraph::QParagraph(Dialog & parent)
|
QParagraph::QParagraph(Dialog & parent)
|
||||||
: base_class(parent, qt_("LyX: Paragraph Settings"))
|
: base_class(parent, _("LyX: Paragraph Settings"))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ typedef QController<ControlRef, QView<QRefDialog> > base_class;
|
|||||||
|
|
||||||
|
|
||||||
QRef::QRef(Dialog & parent)
|
QRef::QRef(Dialog & parent)
|
||||||
: base_class(parent, qt_("LyX: Cross-reference")),
|
: base_class(parent, _("LyX: Cross-reference")),
|
||||||
sort_(false), at_ref_(false)
|
sort_(false), at_ref_(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ typedef QController<ControlShowFile, QView<QShowFileDialog> > base_class;
|
|||||||
|
|
||||||
|
|
||||||
QShowFile::QShowFile(Dialog & parent)
|
QShowFile::QShowFile(Dialog & parent)
|
||||||
: base_class(parent, qt_("LyX: Show File"))
|
: base_class(parent, _("LyX: Show File"))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
typedef QController<ControlTabular, QView<QTabularDialog> > base_class;
|
typedef QController<ControlTabular, QView<QTabularDialog> > base_class;
|
||||||
|
|
||||||
QTabular::QTabular(Dialog & parent)
|
QTabular::QTabular(Dialog & parent)
|
||||||
: base_class(parent, qt_("LyX: Table Settings"))
|
: base_class(parent, _("LyX: Table Settings"))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ typedef QController<ControlTabularCreate, QView<QTabularCreateDialog> > base_cla
|
|||||||
|
|
||||||
|
|
||||||
QTabularCreate::QTabularCreate(Dialog & parent)
|
QTabularCreate::QTabularCreate(Dialog & parent)
|
||||||
: base_class(parent, qt_("LyX: Insert Table"))
|
: base_class(parent, _("LyX: Insert Table"))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ typedef QController<ControlThesaurus, QView<QThesaurusDialog> > base_class;
|
|||||||
|
|
||||||
|
|
||||||
QThesaurus::QThesaurus(Dialog & parent)
|
QThesaurus::QThesaurus(Dialog & parent)
|
||||||
: base_class(parent, qt_("LyX: Thesaurus"))
|
: base_class(parent, _("LyX: Thesaurus"))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ using std::vector;
|
|||||||
typedef QController<ControlToc, QView<QTocDialog> > base_class;
|
typedef QController<ControlToc, QView<QTocDialog> > base_class;
|
||||||
|
|
||||||
QToc::QToc(Dialog & parent)
|
QToc::QToc(Dialog & parent)
|
||||||
: base_class(parent, qt_("LyX: Table of Contents")), depth_(1)
|
: base_class(parent, _("LyX: Table of Contents")), depth_(1)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -61,7 +61,7 @@ void QToc::updateType()
|
|||||||
dialog_->typeCO->insertItem(toqstr(*it));
|
dialog_->typeCO->insertItem(toqstr(*it));
|
||||||
if (*it == type) {
|
if (*it == type) {
|
||||||
dialog_->typeCO->setCurrentItem(it - choice.begin());
|
dialog_->typeCO->setCurrentItem(it - choice.begin());
|
||||||
dialog_->setCaption(toqstr(type));
|
setTitle(type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
typedef QController<ControlCommand, QView<QURLDialog> > base_class;
|
typedef QController<ControlCommand, QView<QURLDialog> > base_class;
|
||||||
|
|
||||||
QURL::QURL(Dialog & parent)
|
QURL::QURL(Dialog & parent)
|
||||||
: base_class(parent, qt_("LyX: URL"))
|
: base_class(parent, _("LyX: URL"))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
#include "Lsstream.h"
|
#include "Lsstream.h"
|
||||||
#include "qt_helpers.h"
|
#include "qt_helpers.h"
|
||||||
|
#include "support/lstrings.h"
|
||||||
#include "LyXView.h"
|
#include "LyXView.h"
|
||||||
#include "ControlVCLog.h"
|
#include "ControlVCLog.h"
|
||||||
|
|
||||||
@ -29,7 +30,7 @@ typedef QController<ControlVCLog, QView<QVCLogDialog> > base_class;
|
|||||||
|
|
||||||
|
|
||||||
QVCLog::QVCLog(Dialog & parent)
|
QVCLog::QVCLog(Dialog & parent)
|
||||||
: base_class(parent, qt_("LyX: Version Control Log"))
|
: base_class(parent, _("LyX: Version Control Log"))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,11 +45,9 @@ void QVCLog::build_dialog()
|
|||||||
|
|
||||||
void QVCLog::update_contents()
|
void QVCLog::update_contents()
|
||||||
{
|
{
|
||||||
#if USE_BOOST_FORMAT
|
setTitle(bformat(_("Version control log for %1$s"),
|
||||||
dialog_->setCaption(toqstr(boost::io::str(boost::format(_("Version control log for %1$s")) % controller().getBufferFileName())));
|
controller().getBufferFileName()));
|
||||||
#else
|
|
||||||
dialog_->setCaption(toqstr(string(_("Version control log for ")) + controller().getBufferFileName()));
|
|
||||||
#endif
|
|
||||||
dialog_->vclogTV->setText("");
|
dialog_->vclogTV->setText("");
|
||||||
|
|
||||||
ostringstream ss;
|
ostringstream ss;
|
||||||
|
@ -33,7 +33,7 @@ typedef QController<ControlWrap, QView<QWrapDialog> > base_class;
|
|||||||
|
|
||||||
|
|
||||||
QWrap::QWrap(Dialog & parent)
|
QWrap::QWrap(Dialog & parent)
|
||||||
: base_class(parent, qt_("LyX: Text Wrap Settings"))
|
: base_class(parent, _("LyX: Text Wrap Settings"))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
#include <qapplication.h>
|
#include <qapplication.h>
|
||||||
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
#include "qt_helpers.h"
|
||||||
#include "QtLyXView.h"
|
#include "QtLyXView.h"
|
||||||
#include "Qt2Base.h"
|
#include "Qt2Base.h"
|
||||||
#include "Qt2BC.h"
|
#include "Qt2BC.h"
|
||||||
@ -22,8 +23,8 @@
|
|||||||
#include "support/LAssert.h"
|
#include "support/LAssert.h"
|
||||||
|
|
||||||
|
|
||||||
Qt2Base::Qt2Base(QString const & t)
|
Qt2Base::Qt2Base(string const & t)
|
||||||
: ViewBase(), updating_(false), title_(t)
|
: ViewBase(t), updating_(false)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -50,10 +51,11 @@ void Qt2Base::show()
|
|||||||
|
|
||||||
update(); // make sure its up-to-date
|
update(); // make sure its up-to-date
|
||||||
|
|
||||||
|
form()->setCaption(toqstr(getTitle()));
|
||||||
|
|
||||||
if (form()->isVisible()) {
|
if (form()->isVisible()) {
|
||||||
form()->raise();
|
form()->raise();
|
||||||
} else {
|
} else {
|
||||||
form()->setCaption(title_);
|
|
||||||
form()->show();
|
form()->show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ class Qt2Base : public QObject, public ViewBase {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
Qt2Base(QString const &);
|
Qt2Base(string const &);
|
||||||
///
|
///
|
||||||
virtual ~Qt2Base() {}
|
virtual ~Qt2Base() {}
|
||||||
protected:
|
protected:
|
||||||
@ -73,10 +73,6 @@ protected slots:
|
|||||||
private:
|
private:
|
||||||
/// Pointer to the actual instantiation of the Qt dialog
|
/// Pointer to the actual instantiation of the Qt dialog
|
||||||
virtual QDialog * form() const = 0;
|
virtual QDialog * form() const = 0;
|
||||||
|
|
||||||
private:
|
|
||||||
/// dialog title, displayed by WM.
|
|
||||||
QString title_;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
2003-05-21 Alfredo Braunstein <abraunst@libero.it>
|
||||||
|
|
||||||
|
* FormBase.[Ch]:
|
||||||
|
* FormDialogView.[Ch] (setTitle): added
|
||||||
|
* FormErrorList.C:
|
||||||
|
* FormLog.C:
|
||||||
|
* FormShowFile.C: use setTitle
|
||||||
|
|
||||||
2003-05-20 Alfredo Braunstein <abraunst@libero.it>
|
2003-05-20 Alfredo Braunstein <abraunst@libero.it>
|
||||||
|
|
||||||
* FormErrorList.[Ch]: small bugs fixed
|
* FormErrorList.[Ch]: small bugs fixed
|
||||||
|
@ -46,10 +46,10 @@ static int C_PrehandlerCB(FL_OBJECT *, int, FL_Coord, FL_Coord, int, void *);
|
|||||||
|
|
||||||
|
|
||||||
FormBase::FormBase(string const & t, bool allowResize)
|
FormBase::FormBase(string const & t, bool allowResize)
|
||||||
: ViewBase(),
|
: ViewBase(t),
|
||||||
warning_posted_(false), message_widget_(0),
|
warning_posted_(false), message_widget_(0),
|
||||||
minw_(0), minh_(0), allow_resize_(allowResize),
|
minw_(0), minh_(0), allow_resize_(allowResize),
|
||||||
title_(t), icon_pixmap_(0), icon_mask_(0),
|
icon_pixmap_(0), icon_mask_(0),
|
||||||
tooltips_(new Tooltips())
|
tooltips_(new Tooltips())
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -102,7 +102,7 @@ void FormBase::prepare_to_show()
|
|||||||
|
|
||||||
// set the title for the minimized form
|
// set the title for the minimized form
|
||||||
if (!getController().IconifyWithMain())
|
if (!getController().IconifyWithMain())
|
||||||
fl_winicontitle(form()->window, title_.c_str());
|
fl_winicontitle(form()->window, getTitle().c_str());
|
||||||
|
|
||||||
// assign an icon to the form
|
// assign an icon to the form
|
||||||
string const iconname = LibFileSearch("images", "lyx", "xpm");
|
string const iconname = LibFileSearch("images", "lyx", "xpm");
|
||||||
@ -155,7 +155,7 @@ void FormBase::show()
|
|||||||
if (!allow_resize_)
|
if (!allow_resize_)
|
||||||
fl_set_form_maxsize(form(), minw_, minh_);
|
fl_set_form_maxsize(form(), minw_, minh_);
|
||||||
|
|
||||||
string const maximize_title = "LyX: " + title_;
|
string const maximize_title = "LyX: " + getTitle();
|
||||||
int const iconify_policy =
|
int const iconify_policy =
|
||||||
getController().IconifyWithMain() ? FL_TRANSIENT : 0;
|
getController().IconifyWithMain() ? FL_TRANSIENT : 0;
|
||||||
|
|
||||||
|
@ -124,8 +124,6 @@ private:
|
|||||||
int minh_;
|
int minh_;
|
||||||
/// Can the dialog be resized after it has been created?
|
/// Can the dialog be resized after it has been created?
|
||||||
bool allow_resize_;
|
bool allow_resize_;
|
||||||
/// dialog title, displayed by the window manager.
|
|
||||||
string title_;
|
|
||||||
/// Passed to the window manager to give a pretty little symbol ;-)
|
/// Passed to the window manager to give a pretty little symbol ;-)
|
||||||
Pixmap icon_pixmap_;
|
Pixmap icon_pixmap_;
|
||||||
///
|
///
|
||||||
|
@ -48,10 +48,10 @@ static int C_PrehandlerCB(FL_OBJECT *, int, FL_Coord, FL_Coord, int, void *);
|
|||||||
|
|
||||||
FormDialogView::FormDialogView(Dialog & parent,
|
FormDialogView::FormDialogView(Dialog & parent,
|
||||||
string const & t, bool allowResize)
|
string const & t, bool allowResize)
|
||||||
: Dialog::View(parent),
|
: Dialog::View(parent, t),
|
||||||
warning_posted_(false), message_widget_(0),
|
warning_posted_(false), message_widget_(0),
|
||||||
minw_(0), minh_(0), allow_resize_(allowResize),
|
minw_(0), minh_(0), allow_resize_(allowResize),
|
||||||
title_(t), icon_pixmap_(0), icon_mask_(0),
|
icon_pixmap_(0), icon_mask_(0),
|
||||||
tooltips_(new Tooltips())
|
tooltips_(new Tooltips())
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -104,7 +104,7 @@ void FormDialogView::prepare_to_show()
|
|||||||
|
|
||||||
// set the title for the minimized form
|
// set the title for the minimized form
|
||||||
if (!lyxrc.dialogs_iconify_with_main)
|
if (!lyxrc.dialogs_iconify_with_main)
|
||||||
fl_winicontitle(form()->window, title_.c_str());
|
fl_winicontitle(form()->window, getTitle().c_str());
|
||||||
|
|
||||||
// assign an icon to the form
|
// assign an icon to the form
|
||||||
string const iconname = LibFileSearch("images", "lyx", "xpm");
|
string const iconname = LibFileSearch("images", "lyx", "xpm");
|
||||||
@ -157,7 +157,7 @@ void FormDialogView::show()
|
|||||||
if (!allow_resize_)
|
if (!allow_resize_)
|
||||||
fl_set_form_maxsize(form(), minw_, minh_);
|
fl_set_form_maxsize(form(), minw_, minh_);
|
||||||
|
|
||||||
string const maximize_title = "LyX: " + title_;
|
string const maximize_title = "LyX: " + getTitle();
|
||||||
int const iconify_policy = lyxrc.dialogs_iconify_with_main ?
|
int const iconify_policy = lyxrc.dialogs_iconify_with_main ?
|
||||||
FL_TRANSIENT : 0;
|
FL_TRANSIENT : 0;
|
||||||
|
|
||||||
|
@ -123,8 +123,6 @@ private:
|
|||||||
int minh_;
|
int minh_;
|
||||||
/// Can the dialog be resized after it has been created?
|
/// Can the dialog be resized after it has been created?
|
||||||
bool allow_resize_;
|
bool allow_resize_;
|
||||||
/// dialog title, displayed by the window manager.
|
|
||||||
string title_;
|
|
||||||
/// Passed to the window manager to give a pretty little symbol ;-)
|
/// Passed to the window manager to give a pretty little symbol ;-)
|
||||||
Pixmap icon_pixmap_;
|
Pixmap icon_pixmap_;
|
||||||
///
|
///
|
||||||
|
@ -39,7 +39,7 @@ void FormErrorList::build()
|
|||||||
|
|
||||||
void FormErrorList::update()
|
void FormErrorList::update()
|
||||||
{
|
{
|
||||||
fl_set_form_title(dialog_->form, controller().name().c_str());
|
setTitle(controller().name());
|
||||||
updateContents();
|
updateContents();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ void FormLog::update()
|
|||||||
string const title = buildlog ?
|
string const title = buildlog ?
|
||||||
_("LyX: LaTeX Log") :
|
_("LyX: LaTeX Log") :
|
||||||
_("LyX: Literate Programming Build Log");
|
_("LyX: Literate Programming Build Log");
|
||||||
fl_set_form_title(dialog_->form, title.c_str());
|
setTitle(title);
|
||||||
|
|
||||||
fl_clear_browser(dialog_->browser);
|
fl_clear_browser(dialog_->browser);
|
||||||
int const valid = fl_load_browser(dialog_->browser,
|
int const valid = fl_load_browser(dialog_->browser,
|
||||||
|
@ -33,7 +33,7 @@ void FormShowFile::update()
|
|||||||
fl_set_browser_fontstyle(dialog_->browser,FL_FIXED_STYLE);
|
fl_set_browser_fontstyle(dialog_->browser,FL_FIXED_STYLE);
|
||||||
|
|
||||||
string const title = "LyX: " + controller().getFileName();
|
string const title = "LyX: " + controller().getFileName();
|
||||||
fl_set_form_title(dialog_->form, title.c_str());
|
setTitle(title);
|
||||||
|
|
||||||
string const contents = controller().getFileContents();
|
string const contents = controller().getFileContents();
|
||||||
if (contents.empty())
|
if (contents.empty())
|
||||||
|
Loading…
Reference in New Issue
Block a user