mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 10:58:52 +00:00
John's latest patch frenzy
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2397 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
e0aa02ee9f
commit
bcd818abe3
54
COPYING
54
COPYING
@ -1,41 +1,27 @@
|
|||||||
While LyX has been released nominally under the GPL in the past, it
|
This program is free software; you can redistribute it and/or modify
|
||||||
has in fact never been truly GPL. Particularly, it has always been
|
it under the terms of the GNU General Public License as published by
|
||||||
linked to a closed source library. While some have taken a view that
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
such actions violate the GPL, this is a legal impossibility. The law
|
(at your option) any later version.
|
||||||
is quite clear that the release of the software by the original authors
|
|
||||||
and copyright holders changed the licenses.
|
|
||||||
|
|
||||||
Rather than leaving the issue to be debated, the following
|
This program is distributed in the hope that it will be useful,
|
||||||
clarifications are given. This is *not* a change of license, but a
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
clarification of the license that LyX has always used. All patches
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
submitted to LyX fall under this same license.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
1) LyX is quasi-GPL software. The terms of the GPL apply save where
|
You should have received a copy of the GNU General Public License
|
||||||
they conflict with this statement.
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
2) There is no limitation on the license or nature of any software,
|
In addition, as a special exception, the LyX Team gives permission to
|
||||||
source, binary, library, or other, that may be linked to LyX, or to
|
link the code of this program with the XForms library (or with modified
|
||||||
which LyX may be linked. Particularly, the second full paragraph of
|
versions of XForms that use the same license as XForms), and distribute
|
||||||
section 2, from 'These requirements apply to the modified work'
|
linked combinations including the two. You must obey the GNU General
|
||||||
through 'who wrote it.' is rejected in its entirety.
|
Public License in all respects for all of the code used other than XForms.
|
||||||
|
If you modify this file, you may extend this exception to your version of
|
||||||
|
the file, but you are not obligated to do so. If you do not wish to do so,
|
||||||
|
delete this exception statement from your version.
|
||||||
|
|
||||||
3) There is no limitation on combining LyX source code with code
|
The GNU General Public License version 2 is included below for your reference.
|
||||||
subject to any other license, provided that the LyX source remains
|
|
||||||
under this same license. Particularly, Section 3 of the GPL is
|
|
||||||
rejected in its entirety. To redistribute a modified version of LyX,
|
|
||||||
the entire source code of the modified LyX must be made available under
|
|
||||||
the terms of this license or such other licenses as apply to portions
|
|
||||||
of the original or modified code.
|
|
||||||
|
|
||||||
4) Any other clause or interpretation of the GPL limiting the
|
|
||||||
combination of other software of any type and LyX is rejected in its
|
|
||||||
entirety, provided that the LyX code and modifications to the LyX
|
|
||||||
source code remains under this same license, or such other licenses as
|
|
||||||
apply to portions of the original or modified code.
|
|
||||||
|
|
||||||
5) Nothing in this statement purports to alter or interpret the
|
|
||||||
license of any other software. Any combination of other software with
|
|
||||||
LyX must also meet the requirements of that software.
|
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
GNU GENERAL PUBLIC LICENSE
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
2001-07-31 John Levon <moz@compsoc.man.ac.uk>
|
||||||
|
|
||||||
|
* configure.in: don't use -lbz2 if we don't need it
|
||||||
|
|
||||||
|
2001-07-30 John Levon <moz@compsoc.man.ac.uk>
|
||||||
|
|
||||||
|
* COPYING: use standard spiel for xforms
|
||||||
|
|
||||||
2001-07-30 John Levon <moz@compsoc.man.ac.uk>
|
2001-07-30 John Levon <moz@compsoc.man.ac.uk>
|
||||||
|
|
||||||
* configure.in: add --without-aiksaurus, always
|
* configure.in: add --without-aiksaurus, always
|
||||||
|
@ -115,11 +115,10 @@ AC_ARG_WITH(aiksaurus,
|
|||||||
[ --without-aiksaurus do not use the AikSaurus library],
|
[ --without-aiksaurus do not use the AikSaurus library],
|
||||||
[lyx_use_aiksaurus=$withval])
|
[lyx_use_aiksaurus=$withval])
|
||||||
if test x$lyx_use_aiksaurus != xno; then
|
if test x$lyx_use_aiksaurus != xno; then
|
||||||
AC_CHECK_LIB(bz2, main)
|
|
||||||
AC_CHECK_LIB(AikSaurus, main,
|
AC_CHECK_LIB(AikSaurus, main,
|
||||||
[AC_DEFINE(HAVE_LIBAIKSAURUS,,[Define this if you have the AikSaurus library])
|
[AC_DEFINE(HAVE_LIBAIKSAURUS,,[Define this if you have the AikSaurus library])
|
||||||
AIKSAURUS_LIBS="-lAikSaurus"
|
AIKSAURUS_LIBS="-lAikSaurus -lbz2"
|
||||||
])
|
],,"-lbz2")
|
||||||
fi
|
fi
|
||||||
AC_SUBST(AIKSAURUS_LIBS)
|
AC_SUBST(AIKSAURUS_LIBS)
|
||||||
|
|
||||||
|
@ -1389,7 +1389,7 @@ void BufferView::Pimpl::MenuInsertLyXFile(string const & filen)
|
|||||||
if (available()) {
|
if (available()) {
|
||||||
string const trypath = owner_->buffer()->filepath;
|
string const trypath = owner_->buffer()->filepath;
|
||||||
// If directory is writeable, use this as default.
|
// If directory is writeable, use this as default.
|
||||||
if (IsDirWriteable(trypath) == 1)
|
if (IsDirWriteable(trypath))
|
||||||
initpath = trypath;
|
initpath = trypath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
2001-08-01 John Levon <moz@compsoc.man.ac.uk>
|
||||||
|
|
||||||
|
* lyxfunc.c: fail gracefully if file doesn't exist
|
||||||
|
|
||||||
|
* LyXSendto.C:
|
||||||
|
* buffer.C:
|
||||||
|
* lyxfunc.C:
|
||||||
|
* BufferView_pimpl.C: IsDirWriteable() proto changed
|
||||||
|
|
||||||
|
* LyXView.C: fix updateWindowTitle() to store the last title
|
||||||
|
|
||||||
2001-07-31 Juergen Vigna <jug@sad.it>
|
2001-07-31 Juergen Vigna <jug@sad.it>
|
||||||
|
|
||||||
* text.C (setHeightOfRow): fixed setting of ascent/descent based on
|
* text.C (setHeightOfRow): fixed setting of ascent/descent based on
|
||||||
|
@ -81,7 +81,7 @@ void SendtoApplyCB(FL_OBJECT *, long)
|
|||||||
command += " &"; // execute in background
|
command += " &"; // execute in background
|
||||||
// push directorypath, if necessary
|
// push directorypath, if necessary
|
||||||
string path = OnlyPath(buffer->fileName());
|
string path = OnlyPath(buffer->fileName());
|
||||||
if (lyxrc.use_tempdir || (IsDirWriteable(path) < 1)){
|
if (lyxrc.use_tempdir || !IsDirWriteable(path)){
|
||||||
path = buffer->tmppath;
|
path = buffer->tmppath;
|
||||||
}
|
}
|
||||||
Path p(path);
|
Path p(path);
|
||||||
|
@ -234,6 +234,7 @@ void LyXView::updateWindowTitle()
|
|||||||
}
|
}
|
||||||
if (title != last_title) {
|
if (title != last_title) {
|
||||||
setWindowTitle(title);
|
setWindowTitle(title);
|
||||||
|
last_title = title;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -200,7 +200,7 @@ pair<Buffer::LogType, string> const Buffer::getLogName(void) const
|
|||||||
|
|
||||||
string path = OnlyPath(filename);
|
string path = OnlyPath(filename);
|
||||||
|
|
||||||
if (lyxrc.use_tempdir || (IsDirWriteable(path) < 1))
|
if (lyxrc.use_tempdir || !IsDirWriteable(path))
|
||||||
path = tmppath;
|
path = tmppath;
|
||||||
|
|
||||||
string const fname = AddName(path,
|
string const fname = AddName(path,
|
||||||
@ -3425,7 +3425,7 @@ int Buffer::runChktex()
|
|||||||
string path = OnlyPath(filename);
|
string path = OnlyPath(filename);
|
||||||
|
|
||||||
string const org_path = path;
|
string const org_path = path;
|
||||||
if (lyxrc.use_tempdir || (IsDirWriteable(path) < 1)) {
|
if (lyxrc.use_tempdir || !IsDirWriteable(path)) {
|
||||||
path = tmppath;
|
path = tmppath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
2001-08-01 John Levon <moz@compsoc.man.ac.uk>
|
||||||
|
|
||||||
|
* Liason.C: IsDirWriteable changed
|
||||||
|
|
||||||
2001-07-30 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
2001-07-30 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||||
|
|
||||||
* Liason.C: #include LAssert.h
|
* Liason.C: #include LAssert.h
|
||||||
|
@ -107,7 +107,7 @@ bool printBuffer(Buffer * buffer, PrinterParams const & pp)
|
|||||||
|
|
||||||
// Push directory path.
|
// Push directory path.
|
||||||
string path = OnlyPath(buffer->fileName());
|
string path = OnlyPath(buffer->fileName());
|
||||||
if (lyxrc.use_tempdir || (IsDirWriteable(path) < 1)) {
|
if (lyxrc.use_tempdir || !IsDirWriteable(path)) {
|
||||||
path = buffer->tmppath;
|
path = buffer->tmppath;
|
||||||
}
|
}
|
||||||
Path p(path);
|
Path p(path);
|
||||||
|
@ -1,3 +1,13 @@
|
|||||||
|
2001-08-01 John Levon <moz@compsoc.man.ac.uk>
|
||||||
|
|
||||||
|
* FormMathsPanel.C:
|
||||||
|
* FormMathsPanel.h:
|
||||||
|
* form_maths_panel.C:
|
||||||
|
* form_maths_panel.h:
|
||||||
|
* forms/form_maths_panel.fd: re-add dots bitmaps
|
||||||
|
|
||||||
|
* FormRef.C: "Goto" -> "Go to"
|
||||||
|
|
||||||
2001-07-29 John Levon <moz@compsoc.man.ac.uk>
|
2001-07-29 John Levon <moz@compsoc.man.ac.uk>
|
||||||
|
|
||||||
* FormMathsBitmap.C: initialise form_
|
* FormMathsBitmap.C: initialise form_
|
||||||
|
@ -94,6 +94,13 @@ FormMathsPanel::FormMathsPanel(LyXView * lv, Dialogs * d)
|
|||||||
}
|
}
|
||||||
misc_.reset(new FormMathsBitmap(lv, d, *this, latex));
|
misc_.reset(new FormMathsBitmap(lv, d, *this, latex));
|
||||||
|
|
||||||
|
latex.resize(nr_latex_dots);
|
||||||
|
for (StringVec::size_type i = 0; i<latex.size(); ++i) {
|
||||||
|
latex[i] = latex_dots[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
dots_.reset(new FormMathsBitmap(lv, d, *this, latex));
|
||||||
|
|
||||||
latex.resize(nr_latex_varsz);
|
latex.resize(nr_latex_varsz);
|
||||||
for (StringVec::size_type i = 0; i<latex.size(); ++i) {
|
for (StringVec::size_type i = 0; i<latex.size(); ++i) {
|
||||||
latex[i] = latex_varsz[i];
|
latex[i] = latex_varsz[i];
|
||||||
@ -155,6 +162,8 @@ void FormMathsPanel::build()
|
|||||||
|
|
||||||
misc_->addBitmap(29, 5, 6, misc_width, misc_height, misc_bits);
|
misc_->addBitmap(29, 5, 6, misc_width, misc_height, misc_bits);
|
||||||
|
|
||||||
|
dots_->addBitmap(4, 4, 1, dots_width, dots_height, dots_bits);
|
||||||
|
|
||||||
varsize_->addBitmap(14, 3, 5, varsz_width, varsz_height, varsz_bits);
|
varsize_->addBitmap(14, 3, 5, varsz_width, varsz_height, varsz_bits);
|
||||||
|
|
||||||
bc().setCancel(dialog_->button_close);
|
bc().setCancel(dialog_->button_close);
|
||||||
@ -195,6 +204,12 @@ bool FormMathsPanel::input(FL_OBJECT *, long data)
|
|||||||
misc_->show();
|
misc_->show();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case MM_DOTS:
|
||||||
|
if (active_ && active_ != dots_.get())
|
||||||
|
active_->hide();
|
||||||
|
dots_->show();
|
||||||
|
break;
|
||||||
|
|
||||||
case MM_VARSIZE:
|
case MM_VARSIZE:
|
||||||
if (active_ && active_ != varsize_.get())
|
if (active_ && active_ != varsize_.get())
|
||||||
active_->hide();
|
active_->hide();
|
||||||
|
@ -90,6 +90,7 @@ private:
|
|||||||
boost::scoped_ptr<FormMathsBitmap> brelats_;
|
boost::scoped_ptr<FormMathsBitmap> brelats_;
|
||||||
boost::scoped_ptr<FormMathsBitmap> greek_;
|
boost::scoped_ptr<FormMathsBitmap> greek_;
|
||||||
boost::scoped_ptr<FormMathsBitmap> misc_;
|
boost::scoped_ptr<FormMathsBitmap> misc_;
|
||||||
|
boost::scoped_ptr<FormMathsBitmap> dots_;
|
||||||
boost::scoped_ptr<FormMathsBitmap> varsize_;
|
boost::scoped_ptr<FormMathsBitmap> varsize_;
|
||||||
|
|
||||||
/// A pointer to the currently active subdialog
|
/// A pointer to the currently active subdialog
|
||||||
|
@ -67,7 +67,7 @@ void FormRef::update()
|
|||||||
InsetRef::getType(controller().params().getCmdName()) + 1);
|
InsetRef::getType(controller().params().getCmdName()) + 1);
|
||||||
|
|
||||||
at_ref_ = false;
|
at_ref_ = false;
|
||||||
fl_set_object_label(dialog_->button_go, _("Goto reference"));
|
fl_set_object_label(dialog_->button_go, _("Go to reference"));
|
||||||
|
|
||||||
// Name is irrelevant to LaTeX/Literate documents
|
// Name is irrelevant to LaTeX/Literate documents
|
||||||
if (controller().docType() == ControlRef::LATEX ||
|
if (controller().docType() == ControlRef::LATEX ||
|
||||||
@ -157,7 +157,7 @@ ButtonPolicy::SMInput FormRef::input(FL_OBJECT * ob, long)
|
|||||||
} else {
|
} else {
|
||||||
controller().gotoBookmark();
|
controller().gotoBookmark();
|
||||||
fl_set_object_label(dialog_->button_go,
|
fl_set_object_label(dialog_->button_go,
|
||||||
_("Goto reference"));
|
_("Go to reference"));
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (ob == dialog_->browser) {
|
} else if (ob == dialog_->browser) {
|
||||||
@ -174,7 +174,7 @@ ButtonPolicy::SMInput FormRef::input(FL_OBJECT * ob, long)
|
|||||||
if (at_ref_)
|
if (at_ref_)
|
||||||
controller().gotoBookmark();
|
controller().gotoBookmark();
|
||||||
at_ref_ = false;
|
at_ref_ = false;
|
||||||
fl_set_object_label(dialog_->button_go, _("Goto reference"));
|
fl_set_object_label(dialog_->button_go, _("Go to reference"));
|
||||||
|
|
||||||
setEnabled(dialog_->type, true);
|
setEnabled(dialog_->type, true);
|
||||||
setEnabled(dialog_->button_go, true);
|
setEnabled(dialog_->button_go, true);
|
||||||
|
@ -22,62 +22,66 @@ FD_form_maths_panel * FormMathsPanel::build_maths_panel()
|
|||||||
FL_OBJECT *obj;
|
FL_OBJECT *obj;
|
||||||
FD_form_maths_panel *fdui = new FD_form_maths_panel;
|
FD_form_maths_panel *fdui = new FD_form_maths_panel;
|
||||||
|
|
||||||
fdui->form = fl_bgn_form(FL_NO_BOX, 290, 172);
|
fdui->form = fl_bgn_form(FL_NO_BOX, 274, 226);
|
||||||
fdui->form->u_vdata = this;
|
fdui->form->u_vdata = this;
|
||||||
obj = fl_add_box(FL_UP_BOX, 0, 0, 290, 172, "");
|
obj = fl_add_box(FL_UP_BOX, 0, 0, 274, 226, "");
|
||||||
fdui->button_close = obj = fl_add_button(FL_RETURN_BUTTON, 80, 14, 80, 30, _("Close "));
|
fdui->button_close = obj = fl_add_button(FL_RETURN_BUTTON, 100, 180, 80, 30, _("Close "));
|
||||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||||
fl_set_object_callback(obj, C_FormBaseDeprecatedCancelCB, 0);
|
fl_set_object_callback(obj, C_FormBaseDeprecatedCancelCB, 0);
|
||||||
fdui->browser_funcs = obj = fl_add_browser(FL_SELECT_BROWSER, 180, 40, 94, 110, _("Functions"));
|
fdui->browser_funcs = obj = fl_add_browser(FL_SELECT_BROWSER, 170, 30, 90, 140, _("Functions"));
|
||||||
fl_set_object_lalign(obj, FL_ALIGN_TOP);
|
fl_set_object_lalign(obj, FL_ALIGN_TOP);
|
||||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_FUNC);
|
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_FUNC);
|
||||||
fl_set_browser_hscrollbar(obj, FL_OFF);
|
fl_set_browser_hscrollbar(obj, FL_OFF);
|
||||||
fdui->button_greek = obj = fl_add_button(FL_NORMAL_BUTTON, 10, 90, 50, 30, _("Greek"));
|
fdui->button_greek = obj = fl_add_button(FL_NORMAL_BUTTON, 60, 80, 50, 30, _("Greek"));
|
||||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||||
fl_set_object_lstyle(obj, 15);
|
fl_set_object_lstyle(obj, 15);
|
||||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_GREEK);
|
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_GREEK);
|
||||||
fdui->button_arrow = obj = fl_add_button(FL_NORMAL_BUTTON, 10, 120, 50, 30, _(" Û"));
|
fdui->button_arrow = obj = fl_add_button(FL_NORMAL_BUTTON, 110, 110, 50, 30, _(" Û"));
|
||||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||||
fl_set_object_lstyle(obj, 15);
|
fl_set_object_lstyle(obj, 15);
|
||||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_ARROW);
|
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_ARROW);
|
||||||
fdui->button_boperator = obj = fl_add_button(FL_NORMAL_BUTTON, 60, 90, 50, 30, _("± ´"));
|
fdui->button_boperator = obj = fl_add_button(FL_NORMAL_BUTTON, 10, 110, 50, 30, _("± ´"));
|
||||||
fl_set_object_lsize(obj, 0);
|
fl_set_object_lsize(obj, 0);
|
||||||
fl_set_object_lstyle(obj, 15);
|
fl_set_object_lstyle(obj, 15);
|
||||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_BOP);
|
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_BOP);
|
||||||
fdui->button_brelats = obj = fl_add_button(FL_NORMAL_BUTTON, 110, 90, 50, 30, _("£ @"));
|
fdui->button_brelats = obj = fl_add_button(FL_NORMAL_BUTTON, 60, 110, 50, 30, _("£ @"));
|
||||||
fl_set_object_lsize(obj, 0);
|
fl_set_object_lsize(obj, 0);
|
||||||
fl_set_object_lstyle(obj, 15);
|
fl_set_object_lstyle(obj, 15);
|
||||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_BRELATS);
|
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_BRELATS);
|
||||||
fdui->button_varsize = obj = fl_add_button(FL_NORMAL_BUTTON, 60, 120, 50, 30, _("S ò"));
|
fdui->button_misc = obj = fl_add_button(FL_NORMAL_BUTTON, 110, 140, 50, 30, _("Misc"));
|
||||||
fl_set_object_lsize(obj, 0);
|
|
||||||
fl_set_object_lstyle(obj, 15);
|
|
||||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_VARSIZE);
|
|
||||||
fdui->button_misc = obj = fl_add_button(FL_NORMAL_BUTTON, 110, 120, 50, 30, _("Misc"));
|
|
||||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||||
fl_set_object_lstyle(obj, FL_TIMESITALIC_STYLE);
|
fl_set_object_lstyle(obj, FL_TIMESITALIC_STYLE);
|
||||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_MISC);
|
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_MISC);
|
||||||
fdui->button_equation = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 130, 50, 30, 30, "");
|
fdui->button_equation = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 130, 50, 30, 30, "");
|
||||||
fl_set_object_color(obj, FL_MCOL, FL_BLUE);
|
fl_set_object_color(obj, FL_MCOL, FL_BLUE);
|
||||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_EQU);
|
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_EQU);
|
||||||
fdui->button_sqrt = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 10, 15, 30, 30, "");
|
fdui->button_sqrt = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 10, 20, 30, 30, "");
|
||||||
fl_set_object_color(obj, FL_MCOL, FL_BLUE);
|
fl_set_object_color(obj, FL_MCOL, FL_BLUE);
|
||||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_SQRT);
|
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_SQRT);
|
||||||
fdui->button_frac = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 40, 15, 30, 30, "");
|
fdui->button_frac = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 40, 20, 30, 30, "");
|
||||||
fl_set_object_color(obj, FL_MCOL, FL_BLUE);
|
fl_set_object_color(obj, FL_MCOL, FL_BLUE);
|
||||||
fl_set_object_lcolor(obj, FL_COL1);
|
fl_set_object_lcolor(obj, FL_COL1);
|
||||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_FRAC);
|
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_FRAC);
|
||||||
fdui->button_delim = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 10, 50, 30, 30, "");
|
fdui->button_delim = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 70, 20, 30, 30, "");
|
||||||
fl_set_object_color(obj, FL_MCOL, FL_BLUE);
|
fl_set_object_color(obj, FL_MCOL, FL_BLUE);
|
||||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_DELIM);
|
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_DELIM);
|
||||||
fdui->button_matrix = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 100, 50, 30, 30, "");
|
fdui->button_matrix = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 10, 50, 30, 30, "");
|
||||||
fl_set_object_color(obj, FL_MCOL, FL_BLUE);
|
fl_set_object_color(obj, FL_MCOL, FL_BLUE);
|
||||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_MATRIX);
|
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_MATRIX);
|
||||||
fdui->button_deco = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 40, 50, 30, 30, "");
|
fdui->button_deco = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 100, 20, 30, 30, "");
|
||||||
fl_set_object_color(obj, FL_MCOL, FL_BLUE);
|
fl_set_object_color(obj, FL_MCOL, FL_BLUE);
|
||||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_DECO);
|
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_DECO);
|
||||||
fdui->button_space = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 70, 50, 30, 30, "");
|
fdui->button_space = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 130, 20, 30, 30, "");
|
||||||
fl_set_object_color(obj, FL_MCOL, FL_BLUE);
|
fl_set_object_color(obj, FL_MCOL, FL_BLUE);
|
||||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_SPACE);
|
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_SPACE);
|
||||||
|
fdui->button_dots = obj = fl_add_button(FL_NORMAL_BUTTON, 60, 140, 50, 30, _("Dots"));
|
||||||
|
fl_set_object_lsize(obj, 0);
|
||||||
|
fl_set_object_lstyle(obj, FL_TIMESITALIC_STYLE);
|
||||||
|
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_DOTS);
|
||||||
|
fdui->button_varsize = obj = fl_add_button(FL_NORMAL_BUTTON, 10, 140, 50, 30, _("S ò"));
|
||||||
|
fl_set_object_lsize(obj, 0);
|
||||||
|
fl_set_object_lstyle(obj, 15);
|
||||||
|
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_VARSIZE);
|
||||||
fl_end_form();
|
fl_end_form();
|
||||||
|
|
||||||
fdui->form->fdui = fdui;
|
fdui->form->fdui = fdui;
|
||||||
|
@ -20,7 +20,6 @@ struct FD_form_maths_panel {
|
|||||||
FL_OBJECT *button_arrow;
|
FL_OBJECT *button_arrow;
|
||||||
FL_OBJECT *button_boperator;
|
FL_OBJECT *button_boperator;
|
||||||
FL_OBJECT *button_brelats;
|
FL_OBJECT *button_brelats;
|
||||||
FL_OBJECT *button_varsize;
|
|
||||||
FL_OBJECT *button_misc;
|
FL_OBJECT *button_misc;
|
||||||
FL_OBJECT *button_equation;
|
FL_OBJECT *button_equation;
|
||||||
FL_OBJECT *button_sqrt;
|
FL_OBJECT *button_sqrt;
|
||||||
@ -29,6 +28,8 @@ struct FD_form_maths_panel {
|
|||||||
FL_OBJECT *button_matrix;
|
FL_OBJECT *button_matrix;
|
||||||
FL_OBJECT *button_deco;
|
FL_OBJECT *button_deco;
|
||||||
FL_OBJECT *button_space;
|
FL_OBJECT *button_space;
|
||||||
|
FL_OBJECT *button_dots;
|
||||||
|
FL_OBJECT *button_varsize;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* FD_form_maths_panel_h_ */
|
#endif /* FD_form_maths_panel_h_ */
|
||||||
|
@ -5,18 +5,17 @@ Internal Form Definition File
|
|||||||
|
|
||||||
Number of forms: 1
|
Number of forms: 1
|
||||||
Unit of measure: FL_COORD_PIXEL
|
Unit of measure: FL_COORD_PIXEL
|
||||||
SnapGrid: 2
|
|
||||||
|
|
||||||
=============== FORM ===============
|
=============== FORM ===============
|
||||||
Name: form_maths_panel
|
Name: form_maths_panel
|
||||||
Width: 290
|
Width: 274
|
||||||
Height: 172
|
Height: 226
|
||||||
Number of Objects: 16
|
Number of Objects: 17
|
||||||
|
|
||||||
--------------------
|
--------------------
|
||||||
class: FL_BOX
|
class: FL_BOX
|
||||||
type: UP_BOX
|
type: UP_BOX
|
||||||
box: 0 0 290 172
|
box: 0 0 274 226
|
||||||
boxtype: FL_UP_BOX
|
boxtype: FL_UP_BOX
|
||||||
colors: FL_COL1 FL_COL1
|
colors: FL_COL1 FL_COL1
|
||||||
alignment: FL_ALIGN_CENTER
|
alignment: FL_ALIGN_CENTER
|
||||||
@ -34,7 +33,7 @@ argument:
|
|||||||
--------------------
|
--------------------
|
||||||
class: FL_BUTTON
|
class: FL_BUTTON
|
||||||
type: RETURN_BUTTON
|
type: RETURN_BUTTON
|
||||||
box: 80 14 80 30
|
box: 100 180 80 30
|
||||||
boxtype: FL_UP_BOX
|
boxtype: FL_UP_BOX
|
||||||
colors: FL_COL1 FL_COL1
|
colors: FL_COL1 FL_COL1
|
||||||
alignment: FL_ALIGN_CENTER
|
alignment: FL_ALIGN_CENTER
|
||||||
@ -47,12 +46,12 @@ resize: FL_RESIZE_ALL
|
|||||||
gravity: FL_NoGravity FL_NoGravity
|
gravity: FL_NoGravity FL_NoGravity
|
||||||
name: button_close
|
name: button_close
|
||||||
callback: C_FormBaseDeprecatedCancelCB
|
callback: C_FormBaseDeprecatedCancelCB
|
||||||
argument:
|
argument: 0
|
||||||
|
|
||||||
--------------------
|
--------------------
|
||||||
class: FL_BROWSER
|
class: FL_BROWSER
|
||||||
type: SELECT_BROWSER
|
type: SELECT_BROWSER
|
||||||
box: 180 40 94 110
|
box: 170 30 90 140
|
||||||
boxtype: FL_DOWN_BOX
|
boxtype: FL_DOWN_BOX
|
||||||
colors: FL_COL1 FL_YELLOW
|
colors: FL_COL1 FL_YELLOW
|
||||||
alignment: FL_ALIGN_TOP
|
alignment: FL_ALIGN_TOP
|
||||||
@ -71,7 +70,7 @@ argument: MM_FUNC
|
|||||||
--------------------
|
--------------------
|
||||||
class: FL_BUTTON
|
class: FL_BUTTON
|
||||||
type: NORMAL_BUTTON
|
type: NORMAL_BUTTON
|
||||||
box: 10 90 50 30
|
box: 60 80 50 30
|
||||||
boxtype: FL_UP_BOX
|
boxtype: FL_UP_BOX
|
||||||
colors: FL_COL1 FL_COL1
|
colors: FL_COL1 FL_COL1
|
||||||
alignment: FL_ALIGN_CENTER
|
alignment: FL_ALIGN_CENTER
|
||||||
@ -89,7 +88,7 @@ argument: MM_GREEK
|
|||||||
--------------------
|
--------------------
|
||||||
class: FL_BUTTON
|
class: FL_BUTTON
|
||||||
type: NORMAL_BUTTON
|
type: NORMAL_BUTTON
|
||||||
box: 10 120 50 30
|
box: 110 110 50 30
|
||||||
boxtype: FL_UP_BOX
|
boxtype: FL_UP_BOX
|
||||||
colors: FL_COL1 FL_COL1
|
colors: FL_COL1 FL_COL1
|
||||||
alignment: FL_ALIGN_CENTER
|
alignment: FL_ALIGN_CENTER
|
||||||
@ -107,7 +106,7 @@ argument: MM_ARROW
|
|||||||
--------------------
|
--------------------
|
||||||
class: FL_BUTTON
|
class: FL_BUTTON
|
||||||
type: NORMAL_BUTTON
|
type: NORMAL_BUTTON
|
||||||
box: 60 90 50 30
|
box: 10 110 50 30
|
||||||
boxtype: FL_UP_BOX
|
boxtype: FL_UP_BOX
|
||||||
colors: FL_COL1 FL_COL1
|
colors: FL_COL1 FL_COL1
|
||||||
alignment: FL_ALIGN_CENTER
|
alignment: FL_ALIGN_CENTER
|
||||||
@ -125,7 +124,7 @@ argument: MM_BOP
|
|||||||
--------------------
|
--------------------
|
||||||
class: FL_BUTTON
|
class: FL_BUTTON
|
||||||
type: NORMAL_BUTTON
|
type: NORMAL_BUTTON
|
||||||
box: 110 90 50 30
|
box: 60 110 50 30
|
||||||
boxtype: FL_UP_BOX
|
boxtype: FL_UP_BOX
|
||||||
colors: FL_COL1 FL_COL1
|
colors: FL_COL1 FL_COL1
|
||||||
alignment: FL_ALIGN_CENTER
|
alignment: FL_ALIGN_CENTER
|
||||||
@ -143,25 +142,7 @@ argument: MM_BRELATS
|
|||||||
--------------------
|
--------------------
|
||||||
class: FL_BUTTON
|
class: FL_BUTTON
|
||||||
type: NORMAL_BUTTON
|
type: NORMAL_BUTTON
|
||||||
box: 60 120 50 30
|
box: 110 140 50 30
|
||||||
boxtype: FL_UP_BOX
|
|
||||||
colors: FL_COL1 FL_COL1
|
|
||||||
alignment: FL_ALIGN_CENTER
|
|
||||||
style: 15
|
|
||||||
size: 0
|
|
||||||
lcol: FL_BLACK
|
|
||||||
label: S ò
|
|
||||||
shortcut:
|
|
||||||
resize: FL_RESIZE_ALL
|
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
|
||||||
name: button_varsize
|
|
||||||
callback: C_FormBaseDeprecatedInputCB
|
|
||||||
argument: MM_VARSIZE
|
|
||||||
|
|
||||||
--------------------
|
|
||||||
class: FL_BUTTON
|
|
||||||
type: NORMAL_BUTTON
|
|
||||||
box: 110 120 50 30
|
|
||||||
boxtype: FL_UP_BOX
|
boxtype: FL_UP_BOX
|
||||||
colors: FL_COL1 FL_COL1
|
colors: FL_COL1 FL_COL1
|
||||||
alignment: FL_ALIGN_CENTER
|
alignment: FL_ALIGN_CENTER
|
||||||
@ -197,7 +178,7 @@ argument: MM_EQU
|
|||||||
--------------------
|
--------------------
|
||||||
class: FL_PIXMAPBUTTON
|
class: FL_PIXMAPBUTTON
|
||||||
type: NORMAL_BUTTON
|
type: NORMAL_BUTTON
|
||||||
box: 10 15 30 30
|
box: 10 20 30 30
|
||||||
boxtype: FL_UP_BOX
|
boxtype: FL_UP_BOX
|
||||||
colors: FL_MCOL FL_BLUE
|
colors: FL_MCOL FL_BLUE
|
||||||
alignment: FL_ALIGN_BOTTOM
|
alignment: FL_ALIGN_BOTTOM
|
||||||
@ -215,7 +196,7 @@ argument: MM_SQRT
|
|||||||
--------------------
|
--------------------
|
||||||
class: FL_PIXMAPBUTTON
|
class: FL_PIXMAPBUTTON
|
||||||
type: NORMAL_BUTTON
|
type: NORMAL_BUTTON
|
||||||
box: 40 15 30 30
|
box: 40 20 30 30
|
||||||
boxtype: FL_UP_BOX
|
boxtype: FL_UP_BOX
|
||||||
colors: FL_MCOL FL_BLUE
|
colors: FL_MCOL FL_BLUE
|
||||||
alignment: FL_ALIGN_BOTTOM
|
alignment: FL_ALIGN_BOTTOM
|
||||||
@ -233,7 +214,7 @@ argument: MM_FRAC
|
|||||||
--------------------
|
--------------------
|
||||||
class: FL_PIXMAPBUTTON
|
class: FL_PIXMAPBUTTON
|
||||||
type: NORMAL_BUTTON
|
type: NORMAL_BUTTON
|
||||||
box: 10 50 30 30
|
box: 70 20 30 30
|
||||||
boxtype: FL_UP_BOX
|
boxtype: FL_UP_BOX
|
||||||
colors: FL_MCOL FL_BLUE
|
colors: FL_MCOL FL_BLUE
|
||||||
alignment: FL_ALIGN_BOTTOM
|
alignment: FL_ALIGN_BOTTOM
|
||||||
@ -251,7 +232,7 @@ argument: MM_DELIM
|
|||||||
--------------------
|
--------------------
|
||||||
class: FL_PIXMAPBUTTON
|
class: FL_PIXMAPBUTTON
|
||||||
type: NORMAL_BUTTON
|
type: NORMAL_BUTTON
|
||||||
box: 100 50 30 30
|
box: 10 50 30 30
|
||||||
boxtype: FL_UP_BOX
|
boxtype: FL_UP_BOX
|
||||||
colors: FL_MCOL FL_BLUE
|
colors: FL_MCOL FL_BLUE
|
||||||
alignment: FL_ALIGN_BOTTOM
|
alignment: FL_ALIGN_BOTTOM
|
||||||
@ -269,7 +250,7 @@ argument: MM_MATRIX
|
|||||||
--------------------
|
--------------------
|
||||||
class: FL_PIXMAPBUTTON
|
class: FL_PIXMAPBUTTON
|
||||||
type: NORMAL_BUTTON
|
type: NORMAL_BUTTON
|
||||||
box: 40 50 30 30
|
box: 100 20 30 30
|
||||||
boxtype: FL_UP_BOX
|
boxtype: FL_UP_BOX
|
||||||
colors: FL_MCOL FL_BLUE
|
colors: FL_MCOL FL_BLUE
|
||||||
alignment: FL_ALIGN_BOTTOM
|
alignment: FL_ALIGN_BOTTOM
|
||||||
@ -287,7 +268,7 @@ argument: MM_DECO
|
|||||||
--------------------
|
--------------------
|
||||||
class: FL_PIXMAPBUTTON
|
class: FL_PIXMAPBUTTON
|
||||||
type: NORMAL_BUTTON
|
type: NORMAL_BUTTON
|
||||||
box: 70 50 30 30
|
box: 130 20 30 30
|
||||||
boxtype: FL_UP_BOX
|
boxtype: FL_UP_BOX
|
||||||
colors: FL_MCOL FL_BLUE
|
colors: FL_MCOL FL_BLUE
|
||||||
alignment: FL_ALIGN_BOTTOM
|
alignment: FL_ALIGN_BOTTOM
|
||||||
@ -302,5 +283,41 @@ name: button_space
|
|||||||
callback: C_FormBaseDeprecatedInputCB
|
callback: C_FormBaseDeprecatedInputCB
|
||||||
argument: MM_SPACE
|
argument: MM_SPACE
|
||||||
|
|
||||||
|
--------------------
|
||||||
|
class: FL_BUTTON
|
||||||
|
type: NORMAL_BUTTON
|
||||||
|
box: 60 140 50 30
|
||||||
|
boxtype: FL_UP_BOX
|
||||||
|
colors: FL_COL1 FL_COL1
|
||||||
|
alignment: FL_ALIGN_CENTER
|
||||||
|
style: FL_TIMESITALIC_STYLE
|
||||||
|
size: 0
|
||||||
|
lcol: FL_BLACK
|
||||||
|
label: Dots
|
||||||
|
shortcut:
|
||||||
|
resize: FL_RESIZE_ALL
|
||||||
|
gravity: FL_NoGravity FL_NoGravity
|
||||||
|
name: button_dots
|
||||||
|
callback: C_FormBaseDeprecatedInputCB
|
||||||
|
argument: MM_DOTS
|
||||||
|
|
||||||
|
--------------------
|
||||||
|
class: FL_BUTTON
|
||||||
|
type: NORMAL_BUTTON
|
||||||
|
box: 10 140 50 30
|
||||||
|
boxtype: FL_UP_BOX
|
||||||
|
colors: FL_COL1 FL_COL1
|
||||||
|
alignment: FL_ALIGN_CENTER
|
||||||
|
style: 15
|
||||||
|
size: 0
|
||||||
|
lcol: FL_BLACK
|
||||||
|
label: S ò
|
||||||
|
shortcut:
|
||||||
|
resize: FL_RESIZE_ALL
|
||||||
|
gravity: FL_NoGravity FL_NoGravity
|
||||||
|
name: button_varsize
|
||||||
|
callback: C_FormBaseDeprecatedInputCB
|
||||||
|
argument: MM_VARSIZE
|
||||||
|
|
||||||
==============================
|
==============================
|
||||||
create_the_forms
|
create_the_forms
|
||||||
|
@ -805,7 +805,7 @@ string const LyXFunc::dispatch(int ac,
|
|||||||
if (getStatus(ac, do_not_use_this_arg) & func_status::Disabled) {
|
if (getStatus(ac, do_not_use_this_arg) & func_status::Disabled) {
|
||||||
lyxerr << "LyXFunc::Dispatch: "
|
lyxerr << "LyXFunc::Dispatch: "
|
||||||
<< lyxaction.getActionName(ac)
|
<< lyxaction.getActionName(ac)
|
||||||
<< " [" << ac << "] is disabled ad this location"
|
<< " [" << ac << "] is disabled at this location"
|
||||||
<< endl;
|
<< endl;
|
||||||
goto exit_with_message;
|
goto exit_with_message;
|
||||||
}
|
}
|
||||||
@ -1710,7 +1710,7 @@ void LyXFunc::menuNew(bool fromTemplate)
|
|||||||
if (owner->view()->available()) {
|
if (owner->view()->available()) {
|
||||||
string const trypath = owner->buffer()->filepath;
|
string const trypath = owner->buffer()->filepath;
|
||||||
// If directory is writeable, use this as default.
|
// If directory is writeable, use this as default.
|
||||||
if (IsDirWriteable(trypath) == 1)
|
if (IsDirWriteable(trypath))
|
||||||
initpath = trypath;
|
initpath = trypath;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1836,7 +1836,7 @@ void LyXFunc::open(string const & fname)
|
|||||||
if (owner->view()->available()) {
|
if (owner->view()->available()) {
|
||||||
string const trypath = owner->buffer()->filepath;
|
string const trypath = owner->buffer()->filepath;
|
||||||
// If directory is writeable, use this as default.
|
// If directory is writeable, use this as default.
|
||||||
if (IsDirWriteable(trypath) == 1)
|
if (IsDirWriteable(trypath))
|
||||||
initpath = trypath;
|
initpath = trypath;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1869,7 +1869,13 @@ void LyXFunc::open(string const & fname)
|
|||||||
|
|
||||||
// get absolute path of file and add ".lyx" to the filename if
|
// get absolute path of file and add ".lyx" to the filename if
|
||||||
// necessary
|
// necessary
|
||||||
filename = FileSearch(string(), filename, "lyx");
|
string const fullpath = FileSearch(string(), filename, "lyx");
|
||||||
|
if (fullpath.empty()) {
|
||||||
|
WriteAlert(_("Error"), _("Could not find file"), filename);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
filename = fullpath;
|
||||||
|
|
||||||
// loads document
|
// loads document
|
||||||
string const disp_fn(MakeDisplayPath(filename));
|
string const disp_fn(MakeDisplayPath(filename));
|
||||||
@ -1907,7 +1913,7 @@ void LyXFunc::doImport(string const & argument)
|
|||||||
if (owner->view()->available()) {
|
if (owner->view()->available()) {
|
||||||
string const trypath = owner->buffer()->filepath;
|
string const trypath = owner->buffer()->filepath;
|
||||||
// If directory is writeable, use this as default.
|
// If directory is writeable, use this as default.
|
||||||
if (IsDirWriteable(trypath) == 1)
|
if (IsDirWriteable(trypath))
|
||||||
initpath = trypath;
|
initpath = trypath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2001-08-01 John Levon <moz@compsoc.man.ac.uk>
|
||||||
|
|
||||||
|
* filetools.h:
|
||||||
|
* filetools.C (IsDirWriteable): fix this
|
||||||
|
|
||||||
2001-07-26 Baruch Even <baruch@lyx.org>
|
2001-07-26 Baruch Even <baruch@lyx.org>
|
||||||
|
|
||||||
* lyxlib.h (float_equal): Added function to compare floats almost equal
|
* lyxlib.h (float_equal): Added function to compare floats almost equal
|
||||||
|
@ -134,6 +134,8 @@ bool IsFileReadable (string const & path)
|
|||||||
int IsFileWriteable (string const & path)
|
int IsFileWriteable (string const & path)
|
||||||
{
|
{
|
||||||
FileInfo fi(path);
|
FileInfo fi(path);
|
||||||
|
//lyxerr << "fi : " << fi << endl;
|
||||||
|
//lyxerr << "fi.exists" << fi.exist() << endl;
|
||||||
if (fi.access(FileInfo::wperm|FileInfo::rperm)) // read-write
|
if (fi.access(FileInfo::wperm|FileInfo::rperm)) // read-write
|
||||||
return 1;
|
return 1;
|
||||||
if (fi.readable()) // read-only
|
if (fi.readable()) // read-only
|
||||||
@ -142,24 +144,19 @@ int IsFileWriteable (string const & path)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//returns 1: dir writeable
|
//returns true: dir writeable
|
||||||
// 0: not writeable
|
// false: not writeable
|
||||||
// -1: error- couldn't find out
|
bool IsDirWriteable (string const & path)
|
||||||
int IsDirWriteable (string const & path)
|
|
||||||
{
|
{
|
||||||
string const tmpfl(lyx::tempName(path, "lyxwritetest"));
|
lyxerr[Debug::FILES] << "IsDirWriteable: " << path << endl;
|
||||||
// We must unlink the tmpfl.
|
|
||||||
lyx::unlink(tmpfl);
|
|
||||||
|
|
||||||
if (tmpfl.empty()) {
|
string const tmpfl(lyx::tempName(path, "lyxwritetest"));
|
||||||
WriteFSAlert(_("LyX Internal Error!"),
|
|
||||||
_("Could not test if directory is writeable"));
|
if (tmpfl.empty())
|
||||||
return -1;
|
return false;
|
||||||
} else {
|
|
||||||
FileInfo fi(path);
|
lyx::unlink(tmpfl);
|
||||||
if (fi.writable()) return 1;
|
return true;
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -54,11 +54,10 @@ std::vector<string> const DirList(string const & dir,
|
|||||||
|
|
||||||
/** Is directory read only?
|
/** Is directory read only?
|
||||||
returns
|
returns
|
||||||
1: dir writeable
|
true: dir writeable
|
||||||
0: not writeable
|
false: not writeable
|
||||||
-1: error- couldn't find out, or unsure
|
|
||||||
*/
|
*/
|
||||||
int IsDirWriteable (string const & path);
|
bool IsDirWriteable (string const & path);
|
||||||
|
|
||||||
/** Is a file readable ?
|
/** Is a file readable ?
|
||||||
Returns true if the file `path' is readable.
|
Returns true if the file `path' is readable.
|
||||||
|
Loading…
Reference in New Issue
Block a user