]> git.lyx.org Git - features.git/commitdiff
Removed Options->LaTeX and all related code. New Variables.[Ch] files (not
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 18 Jul 2000 11:06:04 +0000 (11:06 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 18 Jul 2000 11:06:04 +0000 (11:06 +0000)
sure what I will do with them).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@894 a592a061-630c-0410-9148-cb99ea01b6c8

24 files changed:
ChangeLog
forms/latexoptions.fd [deleted file]
forms/log_form.fd [new file with mode: 0644]
forms/makefile
lib/kbd/american.kmap
po/POTFILES.in
src/LaTeXLog.C
src/Makefile.am
src/Variables.C [new file with mode: 0644]
src/Variables.h [new file with mode: 0644]
src/bufferparams.C
src/bufferparams.h
src/latexoptions.C [deleted file]
src/latexoptions.h [deleted file]
src/log_form.C [new file with mode: 0644]
src/log_form.h [new file with mode: 0644]
src/lyx_cb.C
src/lyx_gui.C
src/lyx_gui_misc.C
src/lyxvc.h
src/menus.C
src/texoptions.C [deleted file]
src/trans.C
src/trans_mgr.C

index 061a00f32b350a9a6a74aefc8906263b4bbdad71..108fdc6d2945a37cb9669059f1ef20875c22942e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,33 @@
+2000-07-17  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
+
+       * src/Variables.[Ch]: new files. Intended to be used for language
+       specific strings (like \chaptername) and filename substitution in
+       commands. 
+
+       * src/trans.C (AddDeadkey): replace keyword "all" with "native" in
+       kmap files.
+       * lib/kbd/american.kmap: update
+
+       * src/trans_mgr.C (normalkey): do not test allowAccent anymore.
+
+       * src/bufferparams.[Ch]: remove member allowAccents.
+
+       * src/menus.C (ShowOptionsMenu): remove the LaTeX entry.
+
+       * src/LaTeXLog.C: use the log_form.h header.
+       * src/lyx_gui.C: ditto.
+       * src/lyx_gui_misc.C: ditto.
+       * src/lyxvc.h: ditto.
+
+       * forms/log_form.fd: new file, created from latexoptions.fd. I
+       kept the log popup and nuked the options form.
+
+       * src/{la,}texoptions.[Ch]: removed.
+       * src/lyx_cb.C (LaTeXOptions): ditto
+
+       * src/lyx_gui.C (create_forms): do not handle the
+       fd_latex_options form. 
+
 2000-07-18  Juergen Vigna  <jug@sad.it>
 
        * src/insets/insetfloat.C (InsetFloat): use setInsetName to set the
diff --git a/forms/latexoptions.fd b/forms/latexoptions.fd
deleted file mode 100644 (file)
index 0eeae1d..0000000
+++ /dev/null
@@ -1,184 +0,0 @@
-Magic: 13000
-
-Internal Form Definition File
-    (do not change)
-
-Number of forms: 2
-Unit of measure: FL_COORD_PIXEL
-
-=============== FORM ===============
-Name: LaTeXOptions
-Width: 310
-Height: 90
-Number of Objects: 5
-
---------------------
-class: FL_BOX
-type: UP_BOX
-box: 0 0 310 90
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: 
-callback: 
-argument: 
-
---------------------
-class: FL_CHECKBUTTON
-type: PUSH_BUTTON
-box: 10 10 310 30
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Allow accents on ALL characters|#w
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: accents
-callback: 
-argument: 
-
---------------------
-class: FL_BUTTON
-type: RETURN_BUTTON
-box: 10 50 90 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: OK
-shortcut: ^M
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: 
-callback: LaTeXOptionsOK
-argument: 0
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 110 50 90 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Apply|#A
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: 
-callback: LaTeXOptionsApply
-argument: 0
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 210 50 90 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Cancel|^[
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: 
-callback: LaTeXOptionsCancel
-argument: 0
-
-=============== FORM ===============
-Name: LaTeXLog
-Width: 470
-Height: 380
-Number of Objects: 4
-
---------------------
-class: FL_BOX
-type: UP_BOX
-box: 0 0 470 380
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: 
-callback: 
-argument: 
-
---------------------
-class: FL_BROWSER
-type: NORMAL_BROWSER
-box: 10 10 450 320
-boxtype: FL_DOWN_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_BOTTOM
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NorthWest FL_SouthEast
-name: browser_latexlog
-callback: 
-argument: 
-
---------------------
-class: FL_BUTTON
-type: RETURN_BUTTON
-box: 270 340 90 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Close
-shortcut: ^M
-resize: FL_RESIZE_NONE
-gravity: FL_SouthEast FL_SouthEast
-name: 
-callback: LatexLogClose
-argument: 0
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 370 340 90 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Update|#Uu
-shortcut: 
-resize: FL_RESIZE_NONE
-gravity: FL_SouthEast FL_SouthEast
-name: 
-callback: LatexLogUpdate
-argument: 0
-
-==============================
-create_the_forms
diff --git a/forms/log_form.fd b/forms/log_form.fd
new file mode 100644 (file)
index 0000000..f06ba45
--- /dev/null
@@ -0,0 +1,88 @@
+Magic: 13000
+
+Internal Form Definition File
+    (do not change)
+
+Number of forms: 1
+Unit of measure: FL_COORD_PIXEL
+
+=============== FORM ===============
+Name: LaTeXLog
+Width: 470
+Height: 380
+Number of Objects: 4
+
+--------------------
+class: FL_BOX
+type: UP_BOX
+box: 0 0 470 380
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label: 
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: 
+callback: 
+argument: 
+
+--------------------
+class: FL_BROWSER
+type: NORMAL_BROWSER
+box: 10 10 450 320
+boxtype: FL_DOWN_BOX
+colors: FL_COL1 FL_YELLOW
+alignment: FL_ALIGN_BOTTOM
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label: 
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NorthWest FL_SouthEast
+name: browser_latexlog
+callback: 
+argument: 
+
+--------------------
+class: FL_BUTTON
+type: RETURN_BUTTON
+box: 270 340 90 30
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Close
+shortcut: ^M
+resize: FL_RESIZE_NONE
+gravity: FL_SouthEast FL_SouthEast
+name: 
+callback: LatexLogClose
+argument: 0
+
+--------------------
+class: FL_BUTTON
+type: NORMAL_BUTTON
+box: 370 340 90 30
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Update|#Uu
+shortcut: 
+resize: FL_RESIZE_NONE
+gravity: FL_SouthEast FL_SouthEast
+name: 
+callback: LatexLogUpdate
+argument: 0
+
+==============================
+create_the_forms
index 99dcce6f86edfa6113c29e173179f184012c1fe7..03616975ef1b992f52104ef5a205e884e3a2c062 100644 (file)
@@ -18,15 +18,15 @@ SHELL = /bin/sh
 FDESIGN = fdesign
 
 SRCS = bullet_forms.fd credits_form.fd form1.fd \
-       latexoptions.fd layout_forms.fd lyx.fd lyx_sendfax.fd math_forms.fd \
+       log_form.fd layout_forms.fd lyx.fd lyx_sendfax.fd math_forms.fd \
        print_form.fd sp_form.fd
 
 OBJS = bullet_forms.c credits_form.c form1.c \
-       latexoptions.c layout_forms.c lyx.c lyx_sendfax.c math_forms.c \
+       log_form.c layout_forms.c lyx.c lyx_sendfax.c math_forms.c \
        print_form.c sp_form.c
 
 COBJS = bullet_forms.C credits_form.C form1.C \
-       latexoptions.C layout_forms.C lyx.C lyx_sendfax.C math_forms.C \
+       log_form.C layout_forms.C lyx.C lyx_sendfax.C math_forms.C \
        print_form.C sp_form.C
 
 all:
index 95a2ebbbecb639797a893c8ea11d95158198045e..04cf4ba1a2e697c44493a3efd1ef4d8f3982ba14 100644 (file)
@@ -1,18 +1,18 @@
-\kmod ' acute all
-\kmod ` grave all
-\kmod ~ tilde all
-\kmod . dot all
-\kmod _ underbar all
-\kmod - macron all
-\kmod "," cedilla all
-\kmod ; underdot all
-\kmod ^ circumflex all
-\kmod < tie all
-\kmod > breve all
-\kmod + caron all
-\kmod / hugarian_umlaut all
-\kmod : umlaut all
-\kmod ? circle all
+\kmod ' acute native
+\kmod ` grave native
+\kmod ~ tilde native
+\kmod . dot native
+\kmod _ underbar native
+\kmod - macron native
+\kmod "," cedilla native
+\kmod ; underdot native
+\kmod ^ circumflex native
+\kmod < tie native
+\kmod > breve native
+\kmod + caron native
+\kmod / hugarian_umlaut native
+\kmod : umlaut native
+\kmod ? circle native
 # \kxmod acute i "\\'{\\i}"
 # \kxmod grave i "\\`{\\i}"
 # \kxmod tilde i "\\~{\\i}"
index fabdfa0ebe0cade35f6a63dc20eec591c5b94e11..5b1c15fc341adbda1bcc14efc59a9c379d605c9b 100644 (file)
@@ -69,11 +69,11 @@ src/kbsequence.C
 src/language.C
 src/LaTeX.C
 src/LaTeXLog.C
-src/latexoptions.C
 src/layout.C
 src/layout_forms.C
 src/LColor.C
 src/Literate.C
+src/log_form.C
 src/LyXAction.C
 src/lyx.C
 src/lyx_cb.C
index a79a05c6370acc3b2a66a3d4ffcd57db86ce1d2a..c0e453be364f6b167cc2f1e0c0db313d205ca4b5 100644 (file)
@@ -3,7 +3,7 @@
 #include <cstdlib>
 #include FORMS_H_LOCATION
 #include "buffer.h"
-#include "latexoptions.h"
+#include "log_form.h"
 #include "lyx_main.h"
 #include "LString.h"
 #include "support/FileInfo.h"
index 6324609fb364a36b9b1f69f6928eaa857a83f70a..1fafd15471c224b19d5f56442e98d3964b105945 100644 (file)
@@ -76,6 +76,8 @@ lyx_SOURCES = \
        ToolbarDefaults.h \
        UpdateInset.C \
        UpdateInset.h \
+       Variables.C \
+       Variables.h \
        WorkArea.C \
        WorkArea.h \
        bibforms.h \
@@ -128,12 +130,12 @@ lyx_SOURCES = \
        language.h \
        lastfiles.C \
        lastfiles.h \
-       latexoptions.C \
-       latexoptions.h \
        layout.C \
        layout.h \
        layout_forms.C \
        layout_forms.h \
+       log_form.C \
+       log_form.h \
        lyx.C \
        lyx.h \
        lyx_cb.C \
@@ -202,7 +204,6 @@ lyx_SOURCES = \
        tex-defs.h \
        tex-strings.C \
        tex-strings.h \
-       texoptions.C \
        texrow.C \
        texrow.h \
        text.C \
diff --git a/src/Variables.C b/src/Variables.C
new file mode 100644 (file)
index 0000000..128f553
--- /dev/null
@@ -0,0 +1,78 @@
+/* This file is part of
+* ====================================================== 
+* 
+*           LyX, The Document Processor
+*        
+*           Copyright 1995 Matthias Ettrich
+*           Copyright 1995-2000 the LyX Team.
+*
+* ====================================================== */
+
+#include <config.h>
+
+#ifdef __GNUG__
+#pragma implementation "Variables.h"
+#endif
+
+#include "Variables.h"
+#include "support/LRegex.h"
+
+void Variables::set(string const &var, string const &val)
+{
+  Vars::const_iterator cit = vars_.find(var);
+  if (cit != vars_.end()) 
+    vars_.erase(var);
+  vars_[var] = val;;
+}
+
+
+string Variables::get(string const &var) const
+{
+  Vars::const_iterator cit = vars_.find(var);
+  if (cit != vars_.end()) 
+    return (*cit).second;
+  else 
+    return string();
+}
+
+bool Variables::isset(string const & var) const
+{
+   Vars::const_iterator cit = vars_.find(var);
+   return  (cit != vars_.end()); 
+}
+
+string Variables::expand(string str) const
+{
+  LRegex reg("\\$\\{\\(.*\\)\\}");
+
+  if (!reg.exact_match(str))
+    return str;
+
+  LRegex::MatchPair match;
+  string var;
+  
+  do {
+    match = reg.first_match(str);
+    var = str.substr(match.first,match.second);
+    // we correct the match to take ${} in account.
+    str.replace(match.first - 2, match.second + 3, get(var));
+  } while (reg.exact_match(str));
+
+  return str;
+}
+
+#ifdef TEST
+
+#include <iostream>
+using std::endl;
+using std::cout;
+
+int main() {
+  Variables vars;
+  vars.set("x", "hello");
+  vars.set("y", "world");
+  cout << vars.expand("${x}") << endl;
+}
+
+#endif
+
diff --git a/src/Variables.h b/src/Variables.h
new file mode 100644 (file)
index 0000000..5ffce60
--- /dev/null
@@ -0,0 +1,41 @@
+// -*- C++ -*-
+/* This file is part of
+* ====================================================== 
+* 
+*           LyX, The Document Processor
+*        
+*           Copyright 1995 Matthias Ettrich
+*           Copyright 1995-2000 the LyX Team.
+*
+* ====================================================== */
+
+#ifndef VARIABLES_H
+#define VARIABLES_H
+
+#ifdef __GNUG__
+#pragma interface
+#endif
+
+#include "LString.h"
+#include <map>
+
+
+class Variables {
+public:
+  virtual ~Variables() { };
+  // 
+  void set(string const &, string const &);
+  // 
+  virtual string get(string const &) const;
+  //
+  bool isset(string const & var) const;
+  // 
+  string expand(string) const;
+private:
+  //
+  typedef std::map<string,string> Vars;
+  //
+  Vars vars_;
+};
+
+#endif
index afa4c5b6bb95d1ed7c44cd6589b990056b41a719..158463fe90253f3d9007d8c041dd04aa8ffc0103 100644 (file)
@@ -62,7 +62,6 @@ BufferParams::BufferParams()
                user_defined_bullets[iter] = temp_bullets[iter] 
                                           = ITEMIZE_DEFAULTS[iter];
        }
-       allowAccents = false;
 }
 
 
index 552028878b1ad410580a0b7ad518aacdb3846079..72d601b508ed44675a431ea0adbe3aad39b9063e 100644 (file)
@@ -204,8 +204,6 @@ public:
        void readLanguage(LyXLex &);
        ///
        void readGraphicsDriver(LyXLex &);
-       /// do we allow accents on all chars in this buffer
-       bool allowAccents;
        ///
         bool use_amsmath;
        /// Time ago we agreed that this was a buffer property [ale990407]
diff --git a/src/latexoptions.C b/src/latexoptions.C
deleted file mode 100644 (file)
index 650eab3..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-// File modified by fdfix.sh for use by lyx (with xforms 0.81) and gettext
-#include <config.h>
-#include "lyx_gui_misc.h"
-#include "gettext.h"
-
-/* Form definition file generated with fdesign. */
-
-#include FORMS_H_LOCATION
-#include <cstdlib>
-#include "latexoptions.h"
-
-FD_LaTeXOptions *create_form_LaTeXOptions(void)
-{
-  FL_OBJECT *obj;
-  FD_LaTeXOptions *fdui = (FD_LaTeXOptions *) fl_calloc(1, sizeof(FD_LaTeXOptions));
-
-  fdui->LaTeXOptions = fl_bgn_form(FL_NO_BOX, 310, 90);
-  obj = fl_add_box(FL_UP_BOX, 0, 0, 310, 90, "");
-  fdui->accents = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 10, 10, 310, 30, idex(_("Allow accents on ALL characters|#w")));fl_set_button_shortcut(obj, scex(_("Allow accents on ALL characters|#w")), 1);
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-  obj = fl_add_button(FL_RETURN_BUTTON, 10, 50, 90, 30, _("OK"));
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, LaTeXOptionsOK, 0);
-  obj = fl_add_button(FL_NORMAL_BUTTON, 110, 50, 90, 30, idex(_("Apply|#A")));fl_set_button_shortcut(obj, scex(_("Apply|#A")), 1);
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, LaTeXOptionsApply, 0);
-  obj = fl_add_button(FL_NORMAL_BUTTON, 210, 50, 90, 30, idex(_("Cancel|^[")));fl_set_button_shortcut(obj, scex(_("Cancel|^[")), 1);
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, LaTeXOptionsCancel, 0);
-  fl_end_form();
-
-  //fdui->LaTeXOptions->fdui = fdui;
-
-  return fdui;
-}
-/*---------------------------------------*/
-
-FD_LaTeXLog *create_form_LaTeXLog(void)
-{
-  FL_OBJECT *obj;
-  FD_LaTeXLog *fdui = (FD_LaTeXLog *) fl_calloc(1, sizeof(FD_LaTeXLog));
-
-  fdui->LaTeXLog = fl_bgn_form(FL_NO_BOX, 470, 380);
-  obj = fl_add_box(FL_UP_BOX, 0, 0, 470, 380, "");
-  fdui->browser_latexlog = obj = fl_add_browser(FL_NORMAL_BROWSER, 10, 10, 450, 320, "");
-    fl_set_object_gravity(obj, FL_NorthWest, FL_SouthEast);
-  obj = fl_add_button(FL_RETURN_BUTTON, 270, 340, 90, 30, _("Close"));
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, LatexLogClose, 0);
-  obj = fl_add_button(FL_NORMAL_BUTTON, 370, 340, 90, 30, idex(_("Update|#Uu")));fl_set_button_shortcut(obj, scex(_("Update|#Uu")), 1);
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, LatexLogUpdate, 0);
-  fl_end_form();
-
-  //fdui->LaTeXLog->fdui = fdui;
-
-  return fdui;
-}
-/*---------------------------------------*/
-
diff --git a/src/latexoptions.h b/src/latexoptions.h
deleted file mode 100644 (file)
index 9d63cfb..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/** Header file generated with fdesign on Mon Jun 19 12:55:08 2000.**/
-
-#ifndef FD_LaTeXOptions_h_
-#define FD_LaTeXOptions_h_
-
-/** Callbacks, globals and object handlers **/
-extern "C" void LaTeXOptionsOK(FL_OBJECT *, long);
-extern "C" void LaTeXOptionsApply(FL_OBJECT *, long);
-extern "C" void LaTeXOptionsCancel(FL_OBJECT *, long);
-
-extern "C" void LatexLogClose(FL_OBJECT *, long);
-extern "C" void LatexLogUpdate(FL_OBJECT *, long);
-
-
-/**** Forms and Objects ****/
-typedef struct {
-       FL_FORM *LaTeXOptions;
-       void *vdata;
-       char *cdata;
-       long  ldata;
-       FL_OBJECT *accents;
-} FD_LaTeXOptions;
-
-extern FD_LaTeXOptions * create_form_LaTeXOptions(void);
-typedef struct {
-       FL_FORM *LaTeXLog;
-       void *vdata;
-       char *cdata;
-       long  ldata;
-       FL_OBJECT *browser_latexlog;
-} FD_LaTeXLog;
-
-extern FD_LaTeXLog * create_form_LaTeXLog(void);
-
-#endif /* FD_LaTeXOptions_h_ */
diff --git a/src/log_form.C b/src/log_form.C
new file mode 100644 (file)
index 0000000..d87147f
--- /dev/null
@@ -0,0 +1,36 @@
+// File modified by fdfix.sh for use by lyx (with xforms 0.81) and gettext
+#include <config.h>
+#include "lyx_gui_misc.h"
+#include "gettext.h"
+
+/* Form definition file generated with fdesign. */
+
+#include FORMS_H_LOCATION
+#include <cstdlib>
+#include "log_form.h"
+
+FD_LaTeXLog *create_form_LaTeXLog(void)
+{
+  FL_OBJECT *obj;
+  FD_LaTeXLog *fdui = (FD_LaTeXLog *) fl_calloc(1, sizeof(FD_LaTeXLog));
+
+  fdui->LaTeXLog = fl_bgn_form(FL_NO_BOX, 470, 380);
+  obj = fl_add_box(FL_UP_BOX, 0, 0, 470, 380, "");
+  fdui->browser_latexlog = obj = fl_add_browser(FL_NORMAL_BROWSER, 10, 10, 450, 320, "");
+    fl_set_object_gravity(obj, FL_NorthWest, FL_SouthEast);
+  obj = fl_add_button(FL_RETURN_BUTTON, 270, 340, 90, 30, _("Close"));
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
+    fl_set_object_callback(obj, LatexLogClose, 0);
+  obj = fl_add_button(FL_NORMAL_BUTTON, 370, 340, 90, 30, idex(_("Update|#Uu")));fl_set_button_shortcut(obj, scex(_("Update|#Uu")), 1);
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
+    fl_set_object_callback(obj, LatexLogUpdate, 0);
+  fl_end_form();
+
+  //fdui->LaTeXLog->fdui = fdui;
+
+  return fdui;
+}
+/*---------------------------------------*/
+
diff --git a/src/log_form.h b/src/log_form.h
new file mode 100644 (file)
index 0000000..e16dd59
--- /dev/null
@@ -0,0 +1,22 @@
+/** Header file generated with fdesign on Mon Jul 17 21:08:23 2000.**/
+
+#ifndef FD_LaTeXLog_h_
+#define FD_LaTeXLog_h_
+
+/** Callbacks, globals and object handlers **/
+extern "C" void LatexLogClose(FL_OBJECT *, long);
+extern "C" void LatexLogUpdate(FL_OBJECT *, long);
+
+
+/**** Forms and Objects ****/
+typedef struct {
+       FL_FORM *LaTeXLog;
+       void *vdata;
+       char *cdata;
+       long  ldata;
+       FL_OBJECT *browser_latexlog;
+} FD_LaTeXLog;
+
+extern FD_LaTeXLog * create_form_LaTeXLog(void);
+
+#endif /* FD_LaTeXLog_h_ */
index cd43250aae0e19ec6f8a27283571766747bf80ce..013b8b02da7323946b9031715ef54d789f30beac 100644 (file)
@@ -73,7 +73,6 @@ extern FD_form_figure * fd_form_figure;
 extern FD_form_screen * fd_form_screen;
 extern FD_form_toc * fd_form_toc;
 extern FD_form_ref * fd_form_ref;
-extern FD_LaTeXOptions * fd_latex_options;
 extern FD_form_bullet * fd_form_bullet;
 
 extern BufferView * current_view; // called too many times in this file...
@@ -2816,24 +2815,6 @@ extern "C" void ScreenOKCB(FL_OBJECT * ob, long data)
 }
 
 
-void LaTeXOptions(BufferView * bv)
-{
-       if (!bv->available())
-               return;
-
-       fl_set_button(fd_latex_options->accents,
-                     int(bv->buffer()->params.allowAccents));
-       
-       if (fd_latex_options->LaTeXOptions->visible) {
-               fl_raise_form(fd_latex_options->LaTeXOptions);
-       } else {
-               fl_show_form(fd_latex_options->LaTeXOptions,
-                            FL_PLACE_MOUSE, FL_FULLBORDER,
-                            _("LaTeX Options"));
-       }
-}
-
-
 // This function runs "configure" and then rereads lyx.defaults to
 // reconfigure the automatic settings.
 void Reconfigure(BufferView * bv)
index 9ef74685b1f4da6368ca5ddf066930176309fbe1..1e66bf72d7343993f94b819f037ceda5e8469360 100644 (file)
@@ -29,7 +29,7 @@
 #include "print_form.h"
 #include "tex-strings.h"
 #include "lyx_main.h"
-#include "latexoptions.h"
+#include "log_form.h"
 #include "debug.h"
 #include "version.h"
 #include "LyXView.h"
@@ -67,8 +67,7 @@ FD_form_figure * fd_form_figure;
 FD_form_screen * fd_form_screen;
 FD_form_toc * fd_form_toc;
 FD_form_ref * fd_form_ref;
-FD_LaTeXOptions * fd_latex_options; // from latexoptions.h
-FD_LaTeXLog * fd_latex_log; // from latexoptions.h
+FD_LaTeXLog * fd_latex_log; // from log_form.h
 Combox * combo_language;
 Combox * combo_language2;
 
@@ -559,11 +558,6 @@ void LyXGUI::create_forms()
        fl_set_form_minsize(fd_form_ref->form_ref, fd_form_ref->form_ref->w,
                            fd_form_ref->form_ref->h);
 
-       // the latex options form
-       fd_latex_options = create_form_LaTeXOptions();
-       fl_set_form_atclose(fd_latex_options->LaTeXOptions,
-                           CancelCloseBoxCB, 0);
-
        // the latex log form
        fd_latex_log = create_form_LaTeXLog();
        fl_set_form_atclose(fd_latex_log->LaTeXLog,
index 3721ee3ff30ab0f4aea6a4c1dbc7278ec61a2a66..1be9c7f4fc8ca97fc217d10d4f9511011962c883 100644 (file)
@@ -20,7 +20,7 @@
 #include "form1.h"
 #include "gettext.h"
 #include "include_form.h"
-#include "latexoptions.h"
+#include "log_form.h"
 #include "layout_forms.h"
 #include "lyx.h"
 #include "lyx_cb.h"
index ee4df7ba60846886dd4dd14fd3eeef5b234f430f..706a5639f1a713fe7f0b9f1fa8c9ac3697fd9f0b 100644 (file)
@@ -8,7 +8,7 @@
 #endif
 
 #include "LString.h"
-#include "latexoptions.h"
+#include "log_form.h"
 
 class VCS;
 class Buffer;
index 403fbf1e54891b0dc0ded1e65858ffe6967efe21..d09b79baa6cc68984bbd90e58844e2e44cb76718 100644 (file)
@@ -69,7 +69,6 @@ extern BufferList bufferlist;
 extern void MenuLayoutSave();
 extern void ShowCredits();
 extern void show_symbols_form(LyXFunc *);
-extern void LaTeXOptions(BufferView *);
 
 // A bunch of wrappers
 
@@ -1979,17 +1978,15 @@ void Menus::ShowOptionsMenu(FL_OBJECT * ob, long)
        int OptionsMenu = fl_defpup(FL_ObjWin(ob),
                                    _("Screen Fonts..."
                                      "|Spellchecker Options..."
-                                     "|Keyboard..."
-                                     "|LaTeX...%l"
+                                     "|Keyboard...%l"
                                      "|Reconfigure"
                                      "|Preferences"));
 
        fl_setpup_shortcut(OptionsMenu, 1, scex(_("OM|Ff#f#F")));
        fl_setpup_shortcut(OptionsMenu, 2, scex(_("OM|Ss#s#S")));
        fl_setpup_shortcut(OptionsMenu, 3, scex(_("OM|Kk#k#K")));
-       fl_setpup_shortcut(OptionsMenu, 4, scex(_("OM|Ll#l#L")));
-       fl_setpup_shortcut(OptionsMenu, 5, scex(_("OM|Rr#r#R")));
-       fl_setpup_shortcut(OptionsMenu, 6, scex(_("OM|Pp#p#P")));
+       fl_setpup_shortcut(OptionsMenu, 4, scex(_("OM|Rr#r#R")));
+       fl_setpup_shortcut(OptionsMenu, 5, scex(_("OM|Pp#p#P")));
 
        if(lyxrc.isp_command == "none") 
                fl_setpup_mode(OptionsMenu, 2, FL_PUP_GREY);
@@ -2007,9 +2004,8 @@ void Menus::ShowOptionsMenu(FL_OBJECT * ob, long)
        case 1: men->ScreenOptions(); break;
        case 2: SpellCheckerOptions(); break;      
        case 3: men->_view->getIntl()->MenuKeymap(); break;
-       case 4: LaTeXOptions(men->_view->view()); break;
-       case 5: tmpfunc->Dispatch(LFUN_RECONFIGURE); break;
-       case 6: men->_view->getDialogs()->showPreferences(); break;
+       case 4: tmpfunc->Dispatch(LFUN_RECONFIGURE); break;
+       case 5: men->_view->getDialogs()->showPreferences(); break;
        default: break;
        }   
        fl_freepup(OptionsMenu);
diff --git a/src/texoptions.C b/src/texoptions.C
deleted file mode 100644 (file)
index c54e165..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/* This file is part of
-* ====================================================== 
-* 
-*           LyX, The Document Processor
-*
-*           Copyright 1995 Matthias Ettrich
-*           Copyright 1995-2000 The LyX Team.
-*
-*           This file is Copyleft 1996-2000
-*           Lars Gullik Bjønnes
-*
-* ====================================================== */
-
-#include <config.h>
-#include FORMS_H_LOCATION
-#include "latexoptions.h"
-#include "lyx_main.h"
-#include "buffer.h"
-#include "BufferView.h"
-
-extern FD_LaTeXOptions * fd_latex_options;
-extern BufferView * current_view;
-
-void LaTeXOptionsOK(FL_OBJECT * ob, long data)
-{
-       LaTeXOptionsApply(ob, data);
-       LaTeXOptionsCancel(ob, data);
-}
-
-void LaTeXOptionsApply(FL_OBJECT *, long)
-{
-       if (fl_get_button(fd_latex_options->accents))
-               current_view->buffer()->params.allowAccents = true;
-       else
-               current_view->buffer()->params.allowAccents = false;
-}
-
-void LaTeXOptionsCancel(FL_OBJECT *, long)
-{
-       fl_hide_form(fd_latex_options->LaTeXOptions);
-}
index fd777ac4ae76f8fba7271f0f0a3da50eda2cecb6..066694fc2b1c7a676b8988bf1752bd7a085a3819 100644 (file)
@@ -150,7 +150,7 @@ void Trans::AddDeadkey(tex_accent accent, string const & keys,
        kmod_list_[accent] = new kmod_list_decl;
        kmod_list_[accent]->data = keys;
        kmod_list_[accent]->accent = accent;
-       if (allowed == "all") { 
+       if (allowed == "native") { 
                kmod_list_[accent]->allowed= lyx_accent_table[accent].native;
        } else { 
                kmod_list_[accent]->allowed = allowed;
index 05b84f64a16b1b196fa23aeaf8ef24d17389128a..eea9e01464da853a18bb675671ccee5a0d6d7121 100644 (file)
@@ -85,8 +85,7 @@ string TransDeadkeyState::normalkey(char c, char * trans)
        }
        if (l == 0) {
                // Not an exception. Check if it allowed
-               if (current_view->buffer()->params.allowAccents == true ||
-                   countChar(deadkey_info_.allowed, c) > 0) {
+               if (countChar(deadkey_info_.allowed, c) > 0) {
                        res = DoAccent(c, deadkey_info_.accent);
                } else {
                        // Not allowed