John's patches (except for [PATCH] fix quit etc. from inset about which I

cannot comment).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2650 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2001-09-02 11:40:33 +00:00
parent 0233b6753d
commit 4b31235b77
20 changed files with 221 additions and 44 deletions

View File

@ -1,3 +1,10 @@
2001-09-01 John Levon <moz@compsoc.man.ac.uk>
* configure:
* configure.m4: add converters for XPM to allow inline display
* Makefile.am: add rule for configure
2001-08-31 José Matos <jamatos@fep.up.pt>
* reLyX/reLyX.in: added debug statement.
Moved the insertion in @maybe_dir to push.

View File

@ -5,6 +5,9 @@ MAINTAINERCLEANFILES = $(srcdir)/Makefile.in listerrors
SUBDIRS = reLyX
bin_SCRIPTS = listerrors
M4=m4
CHMOD=chmod
BIND = bind/*.bind
CLIPART = clipart/*.eps
DOCDIST = doc/LyXConfig.lyx*
@ -18,6 +21,10 @@ TEMPL = templates/*.lyx
TEXSUPPORT = tex/*.cls
UI = ui/*.ui
configure: configure.m4
$(M4) $< > $@
$(CHMOD) 755 $@
LIBINSTFILES = $(BIND) $(CLIPART) $(DOCINST) $(EXAMPLES) $(IMAGES) $(KBD) \
$(LAYOUT) $(TEMPL) $(TEXSUPPORT) $(UI)

48
lib/configure vendored
View File

@ -1122,6 +1122,47 @@ case $TOPNG in
pnmtopng) gif_to_png="giftopnm \$\$i | pnmtopng >\$\$o" eps_to_png="pstopnm \$\$i| pnmtopng >\$\$o" jpg_to_png="jpegtopnm \$\$i | pnmtopng >\$\$o";;
esac
echo $ac_n "checking for a Image -> XPM converter""... $ac_c"
echo "$ac_t""(convert)"
TOXPM=
for ac_prog in convert
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog ; ac_word=$2
if test -n "$ac_word"; then
echo $ac_n "+checking for \"$ac_word\"""... $ac_c"
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -x $ac_dir/$ac_word; then
TOXPM="$ac_prog"
break
fi
done
IFS="$ac_save_ifs"
if test -n "$TOXPM"; then
ac_result=yes
else
ac_result=no
fi
echo "$ac_t""$ac_result"
test -n "$TOXPM" && break
fi
done
if test -z "$TOXPM" ; then
TOXPM=none
fi
if test "$TOXPM" = "convert"; then
gif_to_xpm="convert GIF:\$\$i XPM:\$\$o"
eps_to_xpm="convert EPS:\$\$i XPM:\$\$o"
jpg_to_xpm="convert JPG:\$\$i XPM:\$\$o"
png_to_xpm="convert PNG:\$\$i XPM:\$\$o"
fi
echo $ac_n "checking For an EPS -> PDF converter""... $ac_c"
echo "$ac_t""(epstopdf)"
EPSTOPDF=
@ -1263,6 +1304,7 @@ cat >lyxrc.defaults <<EOF
\\Format png png PNG ""
\\Format ps ps Postscript t
\\Format program "" Program ""
\\Format xpm xpm XPM ""
\\Format word doc Word W
\\converter latex dvi "$latex_to_dvi" "latex"
@ -1294,6 +1336,12 @@ cat >lyxrc.defaults <<EOF
\\converter epsi png "$eps_to_png" ""
\\converter jpg png "$jpg_to_png" ""
\\converter gif xpm "$gif_to_xpm" ""
\\converter eps xpm "$eps_to_xpm" ""
\\converter epsi xpm "$eps_to_xpm" ""
\\converter jpg xpm "$jpg_to_xpm" ""
\\converter png xpm "$png_to_xpm" ""
\\converter eps pdf "$eps_to_pdf" ""
\\converter epsi pdf "$eps_to_pdf" ""

View File

@ -353,6 +353,14 @@ case $TOPNG in
pnmtopng) gif_to_png="giftopnm \$\$i | pnmtopng >\$\$o" eps_to_png="pstopnm \$\$i| pnmtopng >\$\$o" jpg_to_png="jpegtopnm \$\$i | pnmtopng >\$\$o";;
esac
SEARCH_PROG([for a Image -> XPM converter], TOXPM, convert)
if test "$TOXPM" = "convert"; then
gif_to_xpm="convert GIF:\$\$i XPM:\$\$o"
eps_to_xpm="convert EPS:\$\$i XPM:\$\$o"
jpg_to_xpm="convert JPG:\$\$i XPM:\$\$o"
png_to_xpm="convert PNG:\$\$i XPM:\$\$o"
fi
SEARCH_PROG([For an EPS -> PDF converter], EPSTOPDF, epstopdf)
case $EPSTOPDF in
epstopdf) eps_to_pdf="epstopdf --outfile=\$\$o \$\$i";;
@ -449,6 +457,7 @@ cat >lyxrc.defaults <<EOF
\\Format png png PNG ""
\\Format ps ps Postscript t
\\Format program "" Program ""
\\Format xpm xpm XPM ""
\\Format word doc Word W
\\converter latex dvi "$latex_to_dvi" "latex"
@ -480,6 +489,12 @@ cat >lyxrc.defaults <<EOF
\\converter epsi png "$eps_to_png" ""
\\converter jpg png "$jpg_to_png" ""
\\converter gif xpm "$gif_to_xpm" ""
\\converter eps xpm "$eps_to_xpm" ""
\\converter epsi xpm "$eps_to_xpm" ""
\\converter jpg xpm "$jpg_to_xpm" ""
\\converter png xpm "$png_to_xpm" ""
\\converter eps pdf "$eps_to_pdf" ""
\\converter epsi pdf "$eps_to_pdf" ""

View File

@ -1,3 +1,7 @@
2001-08-27 John Levon <moz@compsoc.man.ac.uk>
* GUIRunTime.h: initApplication() should take a & to argc
2001-08-01 John Levon <moz@compsoc.man.ac.uk>
* Liason.C: IsDirWriteable changed

View File

@ -26,7 +26,7 @@ class GUIRunTime {
public:
/// initialise the toolkit
static
int initApplication(int argc, char * argv[]);
int initApplication(int & argc, char * argv[]);
/// process pending events
static
void processEvents();

View File

@ -1,3 +1,7 @@
2001-08-27 John Levon <moz@compsoc.man.ac.uk>
* GUIRunTime.C: initApplication() should take a int & argc, add debug
2001-07-19 Baruch Even <baruch@lyx.org>
* Menubar_pimpl.C: Renamed LyXFunc::Dispatch to LyXFunc::dispatch.

View File

@ -42,7 +42,7 @@ int const xforms_include_version = FL_INCLUDE_VERSION;
GLyxAppWin * mainAppWin;
int GUIRunTime::initApplication(int, char * argv[])
int GUIRunTime::initApplication(int &, char * argv[])
{
// Check the XForms version in the forms.h header against
// the one in the libforms. If they don't match quit the
@ -94,8 +94,10 @@ void GUIRunTime::runTime()
while (!finished) {
processEvents();
if (fl_check_forms() == FL_EVENT) {
lyxerr << "LyX: This shouldn't happen..." << endl;
fl_XNextEvent(&ev);
lyxerr << "Received unhandled X11 event" << endl;
lyxerr << "Type: 0x" << hex << ev.xany.type <<
"Target: 0x" << hex << ev.xany.window << endl;
}
}
}

View File

@ -170,6 +170,10 @@
* moc/Makefile.am: fix builddir != srcdir
2001-08-27 John Levon <moz@compsoc.man.ac.uk>
* GUIRunTime.C: fix argc handling
2001-08-27 John Levon <moz@compsoc.man.ac.uk>
* ui/*.ui:

View File

@ -36,7 +36,7 @@ using std::endl;
extern bool finished;
int GUIRunTime::initApplication(int argc, char * argv[])
int GUIRunTime::initApplication(int & argc, char * argv[])
{
int const xforms_include_version = FL_INCLUDE_VERSION;

View File

@ -1,3 +1,22 @@
2001-08-31 John Levon <moz@compsoc.man.ac.uk>
* FormParagraph.C: disable space inputs when != Length
2001-08-31 John Levon <moz@compsoc.man.ac.uk>
* FormPreferences.C:
* form_preferences.h:
* form_preferences.C:
* forms/form_preferences.fd: add view_dvi_paper_option
2001-08-31 John Levon <moz@compsoc.man.ac.uk>
* FormMathsPanel.h: sub dialogs must be Ignorant.
2001-08-31 John Levon <moz@compsoc.man.ac.uk>
* FormParagraph.C: fix to not allow 0 linespacing
2001-08-29 Angus Leeming <a.leeming@ic.ac.uk>
* FormCitation.C (c-tor): prevent re-sizing of the dialog.
@ -22,7 +41,7 @@
2001-08-26 Angus Leeming <a.leeming@ic.ac.uk>
* FormCitation.C:
* forms/form_citation.fd: a littl;e tweaking to ensure that the
* forms/form_citation.fd: a little tweaking to ensure that the
style choice remains centred within the frame if its contents change.
* FormBase.h: added an allow_resize_ member variable. If false
@ -37,6 +56,10 @@
make use of this functionality to ensure that the dialog cannot be
resized.
2001-08-27 John Levon <moz@compsoc.man.ac.uk>
* GUIRunTime.C: initApplication() should take a int & argc
2001-08-24 John Levon <moz@compsoc.man.ac.uk>
* FormCitation.h:

View File

@ -120,7 +120,7 @@ private:
///
virtual void disconnect();
/// The ButtonController
ButtonController<OkApplyCancelReadOnlyPolicy, xformsBC> bc_;
ButtonController<IgnorantPolicy, xformsBC> bc_;
};

View File

@ -369,6 +369,7 @@ void FormParagraph::update()
fl_set_input (dialog_->input_space_above, "");
setEnabled(dialog_->input_space_above, false);
switch (par_->params().spaceTop().kind()) {
case VSpace::NONE:
fl_set_choice (dialog_->choice_space_above, 1);
@ -389,6 +390,7 @@ void FormParagraph::update()
fl_set_choice (dialog_->choice_space_above, 6);
break;
case VSpace::LENGTH:
setEnabled(dialog_->input_space_above, true);
fl_set_choice (dialog_->choice_space_above, 7);
fl_set_input(dialog_->input_space_above, par_->
params().spaceTop().length().asString().c_str());
@ -399,6 +401,7 @@ void FormParagraph::update()
par_->params().spaceTop().keep());
fl_set_input (dialog_->input_space_below, "");
setEnabled(dialog_->input_space_below, false);
switch (par_->params().spaceBottom().kind()) {
case VSpace::NONE:
fl_set_choice (dialog_->choice_space_below, 1);
@ -419,6 +422,7 @@ void FormParagraph::update()
fl_set_choice (dialog_->choice_space_below, 6);
break;
case VSpace::LENGTH:
setEnabled(dialog_->input_space_below, true);
fl_set_choice (dialog_->choice_space_below, 7);
fl_set_input(dialog_->input_space_below, par_->
params().spaceBottom().length().asString().c_str());
@ -433,7 +437,7 @@ void FormParagraph::update()
bool FormParagraph::input(FL_OBJECT * ob, long)
{
bool ret = true;
bool valid = true;
fl_hide_object(dialog_->text_warning);
@ -443,11 +447,22 @@ bool FormParagraph::input(FL_OBJECT * ob, long)
// "Synchronize" the choices and input fields, making it
// impossible to commit senseless data.
if (fl_get_choice (dialog_->choice_space_above) != 7)
if (ob == dialog_->choice_space_above) {
if (fl_get_choice (dialog_->choice_space_above) != 7) {
fl_set_input (dialog_->input_space_above, "");
if (fl_get_choice (dialog_->choice_space_below) != 7)
setEnabled (dialog_->input_space_above, false);
} else {
setEnabled (dialog_->input_space_above, !lv_->buffer()->isReadonly());
}
}
if (ob == dialog_->choice_space_below) {
if (fl_get_choice (dialog_->choice_space_below) != 7) {
fl_set_input (dialog_->input_space_below, "");
setEnabled (dialog_->input_space_below, false);
} else {
setEnabled (dialog_->input_space_below, !lv_->buffer()->isReadonly());
}
}
if (fl_get_choice (dialog_->choice_linespacing) == 5)
setEnabled (dialog_->input_linespacing, true);
@ -457,27 +472,42 @@ bool FormParagraph::input(FL_OBJECT * ob, long)
}
string input = fl_get_input (dialog_->input_space_above);
bool invalid = false;
if (fl_get_choice(dialog_->choice_space_above)==7)
invalid = !input.empty() && !isValidGlueLength(input);
if (fl_get_choice(dialog_->choice_space_above)==7 &&
input.empty() || !isValidGlueLength(input))
valid = false;
input = fl_get_input (dialog_->input_space_below);
if (fl_get_choice(dialog_->choice_space_below)==7)
invalid = invalid || (!input.empty() && !isValidGlueLength(input));
if (ob == dialog_->input_space_above || ob == dialog_->input_space_below) {
if (invalid) {
if (ob == dialog_->input_space_above) {
if (!isValidGlueLength(input)) {
fl_set_object_label(dialog_->text_warning,
_("Warning: Invalid Length (valid example: 10mm)"));
fl_show_object(dialog_->text_warning);
return false;
} else {
valid = false;
} else
fl_hide_object(dialog_->text_warning);
return true;
}
}
return ret;
input = fl_get_input (dialog_->input_space_below);
if (fl_get_choice(dialog_->choice_space_below)==7 &&
input.empty() || !isValidGlueLength(input))
valid = false;
if (ob == dialog_->input_space_below) {
if (!isValidGlueLength(input)) {
fl_set_object_label(dialog_->text_warning,
_("Warning: Invalid Length (valid example: 10mm)"));
fl_show_object(dialog_->text_warning);
valid = false;
} else
fl_hide_object(dialog_->text_warning);
}
double spacing(strToDbl(fl_get_input(dialog_->input_linespacing)));
if (fl_get_choice (dialog_->choice_linespacing) == 5
&& int(spacing) == 0)
valid = false;
return valid;
}

View File

@ -1939,6 +1939,7 @@ void FormPreferences::OutputsMisc::apply() const
lyxrc.ascii_roff_command = fl_get_input(dialog_->input_ascii_roff);
lyxrc.chktex_command = fl_get_input(dialog_->input_checktex);
lyxrc.view_dvi_paper_option = fl_get_input(dialog_->input_paperoption);
}
@ -1962,6 +1963,7 @@ void FormPreferences::OutputsMisc::build()
setPreHandler(dialog_->choice_default_papersize);
setPreHandler(dialog_->input_ascii_roff);
setPreHandler(dialog_->input_checktex);
setPreHandler(dialog_->input_paperoption);
}
@ -1980,6 +1982,8 @@ FormPreferences::OutputsMisc::feedback(FL_OBJECT const * const ob) const
str = lyxrc.getDescription(LyXRC::RC_CHKTEX_COMMAND);
else if (ob == dialog_->choice_default_papersize)
str = lyxrc.getDescription(LyXRC::RC_DEFAULT_PAPERSIZE);
else if (ob == dialog_->input_paperoption)
str = lyxrc.getDescription(LyXRC::RC_VIEWDVI_PAPEROPTION);
return str;
}
@ -1997,6 +2001,8 @@ void FormPreferences::OutputsMisc::update()
lyxrc.ascii_roff_command.c_str());
fl_set_input(dialog_->input_checktex,
lyxrc.chktex_command.c_str());
fl_set_input(dialog_->input_paperoption,
lyxrc.view_dvi_paper_option.c_str());
}

View File

@ -38,7 +38,7 @@ int const xforms_include_version = FL_INCLUDE_VERSION;
} // namespace anon
int GUIRunTime::initApplication(int , char **)
int GUIRunTime::initApplication(int &, char **)
{
// Check the XForms version in the forms.h header against
// the one in the libforms. If they don't match quit the

View File

@ -1026,7 +1026,7 @@ FD_form_outputs_misc * FormPreferences::build_outputs_misc()
fl_set_object_gravity(obj, FL_NorthWest, FL_SouthEast);
{
char const * const dummy = N_("Ascii line length|#A");
fdui->counter_line_len = obj = fl_add_counter(FL_NORMAL_COUNTER, 315, 50, 100, 30, idex(_(dummy)));
fdui->counter_line_len = obj = fl_add_counter(FL_NORMAL_COUNTER, 320, 25, 100, 30, idex(_(dummy)));
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
}
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
@ -1038,36 +1038,39 @@ FD_form_outputs_misc * FormPreferences::build_outputs_misc()
fl_set_counter_step(obj, 1, 1);
{
char const * const dummy = N_("TeX encoding|#T");
fdui->input_tex_encoding = obj = fl_add_input(FL_NORMAL_INPUT, 216, 95, 200, 30, idex(_(dummy)));
fdui->input_tex_encoding = obj = fl_add_input(FL_NORMAL_INPUT, 220, 65, 200, 30, idex(_(dummy)));
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
}
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
{
char const * const dummy = N_("Default paper size|#p");
fdui->choice_default_papersize = obj = fl_add_choice(FL_NORMAL_CHOICE, 219, 142, 199, 29, idex(_(dummy)));
fdui->choice_default_papersize = obj = fl_add_choice(FL_NORMAL_CHOICE, 220, 110, 199, 29, idex(_(dummy)));
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
}
fl_set_object_boxtype(obj, FL_FRAME_BOX);
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 12, 186, 406, 120, _("Outside code interaction"));
obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 15, 150, 405, 135, _("Outside code interaction"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
{
char const * const dummy = N_("ascii roff|#r");
fdui->input_ascii_roff = obj = fl_add_input(FL_NORMAL_INPUT, 121, 209, 285, 30, idex(_(dummy)));
fdui->input_ascii_roff = obj = fl_add_input(FL_NORMAL_INPUT, 125, 165, 285, 30, idex(_(dummy)));
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
}
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
{
char const * const dummy = N_("checktex|#c");
fdui->input_checktex = obj = fl_add_input(FL_NORMAL_INPUT, 121, 250, 285, 30, idex(_(dummy)));
fdui->input_checktex = obj = fl_add_input(FL_NORMAL_INPUT, 125, 205, 285, 30, idex(_(dummy)));
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
}
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
fdui->input_paperoption = obj = fl_add_input(FL_NORMAL_INPUT, 125, 245, 285, 30, _("DVI paper option"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
fl_end_form();
fdui->form->fdui = fdui;

View File

@ -237,6 +237,7 @@ struct FD_form_outputs_misc {
FL_OBJECT *choice_default_papersize;
FL_OBJECT *input_ascii_roff;
FL_OBJECT *input_checktex;
FL_OBJECT *input_paperoption;
};
#endif /* FD_form_preferences_h_ */

View File

@ -5,7 +5,7 @@ Internal Form Definition File
Number of forms: 14
Unit of measure: FL_COORD_PIXEL
SnapGrid: 1
SnapGrid: 5
=============== FORM ===============
Name: form_preferences
@ -2663,7 +2663,7 @@ argument: 0
Name: form_outputs_misc
Width: 455
Height: 375
Number of Objects: 7
Number of Objects: 8
--------------------
class: FL_BOX
@ -2686,7 +2686,7 @@ argument:
--------------------
class: FL_COUNTER
type: NORMAL_COUNTER
box: 315 50 100 30
box: 320 25 100 30
boxtype: FL_UP_BOX
colors: FL_COL1 FL_BLUE
alignment: FL_ALIGN_LEFT
@ -2708,7 +2708,7 @@ argument: 0
--------------------
class: FL_INPUT
type: NORMAL_INPUT
box: 216 95 200 30
box: 220 65 200 30
boxtype: FL_DOWN_BOX
colors: FL_COL1 FL_MCOL
alignment: FL_ALIGN_LEFT
@ -2726,7 +2726,7 @@ argument: 0
--------------------
class: FL_CHOICE
type: NORMAL_CHOICE
box: 219 142 199 29
box: 220 110 199 29
boxtype: FL_FRAME_BOX
colors: FL_COL1 FL_BLACK
alignment: FL_ALIGN_LEFT
@ -2744,7 +2744,7 @@ argument: 0
--------------------
class: FL_LABELFRAME
type: ENGRAVED_FRAME
box: 12 186 406 120
box: 15 150 405 135
boxtype: FL_NO_BOX
colors: FL_BLACK FL_COL1
alignment: FL_ALIGN_TOP_LEFT
@ -2762,7 +2762,7 @@ argument:
--------------------
class: FL_INPUT
type: NORMAL_INPUT
box: 121 209 285 30
box: 125 165 285 30
boxtype: FL_DOWN_BOX
colors: FL_COL1 FL_MCOL
alignment: FL_ALIGN_LEFT
@ -2780,7 +2780,7 @@ argument: 0
--------------------
class: FL_INPUT
type: NORMAL_INPUT
box: 121 250 285 30
box: 125 205 285 30
boxtype: FL_DOWN_BOX
colors: FL_COL1 FL_MCOL
alignment: FL_ALIGN_LEFT
@ -2795,5 +2795,23 @@ name: input_checktex
callback: C_FormBaseDeprecatedInputCB
argument: 0
--------------------
class: FL_INPUT
type: NORMAL_INPUT
box: 125 245 285 30
boxtype: FL_DOWN_BOX
colors: FL_COL1 FL_MCOL
alignment: FL_ALIGN_LEFT
style: FL_NORMAL_STYLE
size: FL_NORMAL_SIZE
lcol: FL_BLACK
label: DVI paper option
shortcut:
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_paperoption
callback: C_FormBaseDeprecatedInputCB
argument: 0
==============================
create_the_forms

View File

@ -1,3 +1,8 @@
2001-09-01 John Levon <moz@compsoc.man.ac.uk>
* ImageLoadXPM.C: remove setting of alloc colour mask,
led to crash as we don't define a callback
2001-07-29 Baruch Even <baruch@lyx.org>
* ImageLoaderXPM.C (runImageLoader): When loading agree to use non-exact

View File

@ -70,7 +70,7 @@ ImageLoaderXPM::runImageLoader(string const & filename)
Pixmap mask;
XpmAttributes attrib;
attrib.valuemask = XpmCloseness | XpmAllocColor;
attrib.valuemask = XpmCloseness;
attrib.closeness = 10000;
int status = XpmReadFileToPixmap(