]> git.lyx.org Git - features.git/commitdiff
Ed's credits patch and Baruch's gnome patch.
authorAngus Leeming <leeming@lyx.org>
Thu, 8 Mar 2001 12:58:40 +0000 (12:58 +0000)
committerAngus Leeming <leeming@lyx.org>
Thu, 8 Mar 2001 12:58:40 +0000 (12:58 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1710 a592a061-630c-0410-9148-cb99ea01b6c8

37 files changed:
config/lyxinclude.m4
forms/credits_form.fd [deleted file]
po/POTFILES.in
src/BufferView_pimpl.C
src/ChangeLog
src/Makefile.am
src/credits.C [deleted file]
src/credits.h [deleted file]
src/credits_form.C [deleted file]
src/credits_form.h [deleted file]
src/frontends/gnome/ChangeLog
src/frontends/gnome/FormCitation.C
src/frontends/gnome/FormCitation.h
src/frontends/gnome/FormCopyright.h
src/frontends/gnome/FormError.C
src/frontends/gnome/FormError.h
src/frontends/gnome/FormIndex.C
src/frontends/gnome/FormIndex.h
src/frontends/gnome/FormPrint.h
src/frontends/gnome/FormRef.C
src/frontends/gnome/FormRef.h
src/frontends/gnome/FormToc.C
src/frontends/gnome/FormToc.h
src/frontends/gnome/FormUrl.C
src/frontends/gnome/FormUrl.h
src/frontends/gnome/Makefile.am
src/frontends/gnome/Menubar_pimpl.C
src/frontends/xforms/ChangeLog
src/frontends/xforms/Dialogs.C
src/frontends/xforms/FormCredits.C [new file with mode: 0644]
src/frontends/xforms/FormCredits.h [new file with mode: 0644]
src/frontends/xforms/Makefile.am
src/frontends/xforms/form_credits.C [new file with mode: 0644]
src/frontends/xforms/form_credits.h [new file with mode: 0644]
src/frontends/xforms/forms/form_credits.fd [new file with mode: 0644]
src/frontends/xforms/forms/makefile
src/lyx_gui_misc.C

index 1f70b9c75783ee98f8a7622e7bef469f646daf03..075e830b8bca54e719d8d7390b07a9b2eaba40a3 100644 (file)
@@ -235,7 +235,7 @@ dnl Check the version of g++
   fi
 else
   GXX=
-  test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
+  test "${CXXFLAGS+set}" = set || CXXFLAGS=""
 fi
 ])dnl
 
diff --git a/forms/credits_form.fd b/forms/credits_form.fd
deleted file mode 100644 (file)
index f389ef4..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-Magic: 13000
-
-Internal Form Definition File
-    (do not change)
-
-Number of forms: 1
-Unit of measure: FL_COORD_PIXEL
-
-=============== FORM ===============
-Name: form_credits
-Width: 500
-Height: 330
-Number of Objects: 5
-
---------------------
-class: FL_BOX
-type: UP_BOX
-box: 0 0 500 330
-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_BUTTON
-type: RETURN_BUTTON
-box: 180 290 140 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_NONE
-gravity: FL_South FL_South
-name: 
-callback: CreditsOKCB
-argument: 0
-
---------------------
-class: FL_TEXT
-type: NORMAL_TEXT
-box: 10 40 480 30
-boxtype: FL_FLAT_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_CENTER|FL_ALIGN_INSIDE
-style: FL_ITALIC_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Matthias
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NorthWest FL_NorthEast
-name: 
-callback: 
-argument: 
-
---------------------
-class: FL_TEXT
-type: NORMAL_TEXT
-box: 10 10 480 30
-boxtype: FL_FLAT_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_CENTER|FL_ALIGN_INSIDE
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: All these people have contributed to the LyX project. Thanks,
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NorthWest FL_NorthEast
-name: 
-callback: 
-argument: 
-
---------------------
-class: FL_BROWSER
-type: NORMAL_BROWSER
-box: 10 80 480 200
-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_credits
-callback: 
-argument: 
-
-==============================
-create_the_forms
index 023141b20fcefe8db77f6270d6817b750a4263de..6b0bf59fe86bf596764ed5eb83c87cd10a88ec4a 100644 (file)
@@ -7,8 +7,6 @@ src/Chktex.C
 src/ColorHandler.C
 src/combox.C
 src/converter.C
-src/credits.C
-src/credits_form.C
 src/CutAndPaste.C
 src/debug.C
 src/exporter.C
@@ -74,52 +72,54 @@ src/frontends/qt2/paragraphdlgimpl.C
 src/frontends/qt2/tabularcreatedlgimpl.C
 src/frontends/xforms/FileDialog.C
 src/frontends/xforms/FormBase.h
-src/frontends/xforms/form_bibitem.C
 src/frontends/xforms/FormBibitem.C
-src/frontends/xforms/form_bibtex.C
+src/frontends/xforms/form_bibitem.C
 src/frontends/xforms/FormBibtex.C
+src/frontends/xforms/form_bibtex.C
 src/frontends/xforms/form_browser.C
-src/frontends/xforms/form_character.C
 src/frontends/xforms/FormCharacter.C
-src/frontends/xforms/form_citation.C
+src/frontends/xforms/form_character.C
 src/frontends/xforms/FormCitation.C
-src/frontends/xforms/form_copyright.C
+src/frontends/xforms/form_citation.C
 src/frontends/xforms/FormCopyright.C
-src/frontends/xforms/form_document.C
+src/frontends/xforms/form_copyright.C
+src/frontends/xforms/FormCredits.C
+src/frontends/xforms/form_credits.C
 src/frontends/xforms/FormDocument.C
-src/frontends/xforms/form_error.C
+src/frontends/xforms/form_document.C
 src/frontends/xforms/FormError.C
-src/frontends/xforms/form_filedialog.C
+src/frontends/xforms/form_error.C
 src/frontends/xforms/FormFiledialog.C
-src/frontends/xforms/form_graphics.C
+src/frontends/xforms/form_filedialog.C
 src/frontends/xforms/FormGraphics.C
-src/frontends/xforms/form_include.C
+src/frontends/xforms/form_graphics.C
 src/frontends/xforms/FormInclude.C
-src/frontends/xforms/form_index.C
+src/frontends/xforms/form_include.C
 src/frontends/xforms/FormIndex.C
+src/frontends/xforms/form_index.C
 src/frontends/xforms/FormInset.h
 src/frontends/xforms/FormLog.C
-src/frontends/xforms/form_paragraph.C
 src/frontends/xforms/FormParagraph.C
-src/frontends/xforms/form_preamble.C
+src/frontends/xforms/form_paragraph.C
 src/frontends/xforms/FormPreamble.C
-src/frontends/xforms/form_preferences.C
+src/frontends/xforms/form_preamble.C
 src/frontends/xforms/FormPreferences.C
-src/frontends/xforms/form_print.C
+src/frontends/xforms/form_preferences.C
 src/frontends/xforms/FormPrint.C
-src/frontends/xforms/form_ref.C
+src/frontends/xforms/form_print.C
 src/frontends/xforms/FormRef.C
-src/frontends/xforms/form_search.C
+src/frontends/xforms/form_ref.C
 src/frontends/xforms/FormSearch.C
+src/frontends/xforms/form_search.C
 src/frontends/xforms/FormSplash.C
-src/frontends/xforms/form_tabular.C
 src/frontends/xforms/FormTabular.C
-src/frontends/xforms/form_tabular_create.C
+src/frontends/xforms/form_tabular.C
 src/frontends/xforms/FormTabularCreate.C
-src/frontends/xforms/form_toc.C
+src/frontends/xforms/form_tabular_create.C
 src/frontends/xforms/FormToc.C
-src/frontends/xforms/form_url.C
+src/frontends/xforms/form_toc.C
 src/frontends/xforms/FormUrl.C
+src/frontends/xforms/form_url.C
 src/frontends/xforms/FormVCLog.C
 src/frontends/xforms/input_validators.C
 src/frontends/xforms/Menubar_pimpl.C
index 152a5bf0c590842383515b284ede86b302d4b5a1..5fc8d5b6338ce503dfebcac7cf127aaf613a5ac4 100644 (file)
@@ -281,11 +281,11 @@ int BufferView::Pimpl::resizeCurrentBuffer()
        LyXParagraph * selendpar = 0;
        UpdatableInset * the_locking_inset = 0;
        
-       int pos = 0;
-       int selstartpos = 0;
-       int selendpos = 0;
-       int selection = 0;
-       int mark_set = 0;
+       LyXParagraph::size_type pos = 0;
+       LyXParagraph::size_type selstartpos = 0;
+       LyXParagraph::size_type selendpos = 0;
+       bool selection = false;
+       bool mark_set  = false;
 
        ProhibitInput(bv_);
 
index a37a05a09e503eec47e10574f9e21b0266ebde99..a4c58c5e6dcd44a2bd27820074c5a98b14b407d8 100644 (file)
@@ -1,3 +1,11 @@
+2001-03-07  Edwin Leuven  <leuven@fee.uva.nl>
+
+        * Moved credits to frontends:
+        * credits.[Ch]: removed
+       * credits_form.[Ch]: removed
+       * lyx_gui_misc.C: remove credits stuff
+       * Makefile.am:
+
 2001-03-07  Lars Gullik Bjønnes  <larsbj@trylle.birdstep.com>
 
        * lyx_main.C: make toplevel_keymap a boost::scoped_ptr.
index 57a8ffc17567ec40a9df05f178e5ab99139fd2de..e7bc09e807f151d73e5eb33b920a51ecf39569a9 100644 (file)
@@ -105,10 +105,6 @@ lyx_SOURCES = \
        converter.h \
        counters.C \
        counters.h \
-       credits.C \
-       credits.h \
-       credits_form.C \
-       credits_form.h \
        debug.C \
        debug.h \
        encoding.C \
diff --git a/src/credits.C b/src/credits.C
deleted file mode 100644 (file)
index ebd1f70..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/* This file is part of
- * ====================================================== 
- * 
- *           LyX, The Document Processor
- *      
- *          Copyright 1995 Matthias Ettrich
- *           Copyright 1995-2000 The LyX Team.
- *
- * ====================================================== */
-
-#include <config.h>
-
-#include FORMS_H_LOCATION
-#include <cstdlib>
-
-#include "credits.h"
-#include "credits_form.h"
-
-#include "LString.h"
-#include "support/filetools.h"
-#include "lyx_gui_misc.h" // CancelCloseBoxCB
-#include "gettext.h"
-
-extern string system_lyxdir;
-
-/**** Forms and Objects ****/
-
-// Non-static so that it can be redrawn if the xforms colors are re-mapped
-FD_form_credits *fd_form_credits = 0;
-
-void CreditsOKCB(FL_OBJECT *, long) {
-      fl_hide_form(fd_form_credits->form_credits);
-      fl_free_form(fd_form_credits->form_credits);
-      fd_form_credits->form_credits = 0;
-}
-
-/*---------------------------------------*/
-/* read credits from file and display them */
-void ShowCredits()
-{
-       /* generate the credits form if it doesn't exist */
-       if (!fd_form_credits || !fd_form_credits->form_credits) {
-               
-               /* read the credits into the browser */ 
-               
-               /* try file LYX_DIR/CREDITS */ 
-               string real_file = AddName (system_lyxdir, "CREDITS");
-               fd_form_credits = create_form_form_credits();
-               fl_set_form_atclose(fd_form_credits->form_credits,
-                                   CancelCloseBoxCB, 0);
-
-               if (!fl_load_browser(fd_form_credits->browser_credits, 
-                                    real_file.c_str())) {
-                       fl_add_browser_line(fd_form_credits->browser_credits,
-                                           _("ERROR: LyX wasn't able to read"
-                                           " CREDITS file"));
-                       fl_add_browser_line(fd_form_credits->browser_credits, "");
-                       fl_add_browser_line(fd_form_credits->browser_credits,
-                                           _("Please install correctly to estimate"
-                                           " the great"));
-                       fl_add_browser_line(fd_form_credits->browser_credits,
-                                           _("amount of work other people have done"
-                                           " for the LyX project."));
-               }
-       }
-
-       if (fd_form_credits->form_credits->visible) {
-               fl_raise_form(fd_form_credits->form_credits);
-       } else {
-               fl_show_form(fd_form_credits->form_credits,
-                            FL_PLACE_MOUSE | FL_FREE_SIZE, FL_TRANSIENT,
-                            _("Credits"));
-       }
-}
diff --git a/src/credits.h b/src/credits.h
deleted file mode 100644 (file)
index 8cfd842..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-// -*- C++ -*-
-#ifndef CREDITS_H
-#define CREDITS_H
-
-void ShowCredits();
-
-#endif
diff --git a/src/credits_form.C b/src/credits_form.C
deleted file mode 100644 (file)
index a5e2d70..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// File modified by fdfix.sh for use by lyx (with xforms > 0.88) 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 "credits_form.h"
-
-FD_form_credits *create_form_form_credits(void)
-{
-  FL_OBJECT *obj;
-  FD_form_credits *fdui = (FD_form_credits *) fl_calloc(1, sizeof(FD_form_credits));
-
-  fdui->form_credits = fl_bgn_form(FL_NO_BOX, 500, 330);
-  obj = fl_add_box(FL_UP_BOX, 0, 0, 500, 330, "");
-  obj = fl_add_button(FL_RETURN_BUTTON, 180, 290, 140, 30, _("OK"));
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_gravity(obj, FL_South, FL_South);
-    fl_set_object_resize(obj, FL_RESIZE_NONE);
-    fl_set_object_callback(obj, CreditsOKCB, 0);
-  obj = fl_add_text(FL_NORMAL_TEXT, 10, 40, 480, 30, _("Matthias"));
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_lalign(obj, FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
-    fl_set_object_lstyle(obj, FL_ITALIC_STYLE);
-    fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
-  obj = fl_add_text(FL_NORMAL_TEXT, 10, 10, 480, 30, _("All these people have contributed to the LyX project. Thanks,"));
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_lalign(obj, FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
-    fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
-  fdui->browser_credits = obj = fl_add_browser(FL_NORMAL_BROWSER, 10, 80, 480, 200, "");
-    fl_set_object_gravity(obj, FL_NorthWest, FL_SouthEast);
-  fl_end_form();
-
-  fdui->form_credits->fdui = fdui;
-
-  return fdui;
-}
-/*---------------------------------------*/
-
diff --git a/src/credits_form.h b/src/credits_form.h
deleted file mode 100644 (file)
index 9869312..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/** Header file generated with fdesign **/
-
-#ifndef FD_form_credits_h_
-#define FD_form_credits_h_
-
-/** Callbacks, globals and object handlers **/
-extern "C" void CreditsOKCB(FL_OBJECT *, long);
-
-
-/**** Forms and Objects ****/
-typedef struct {
-       FL_FORM *form_credits;
-       void *vdata;
-       char *cdata;
-       long  ldata;
-       FL_OBJECT *browser_credits;
-} FD_form_credits;
-
-extern FD_form_credits * create_form_form_credits(void);
-
-#endif /* FD_form_credits_h_ */
index 40725a47f6c075593728ba15e0bbb3a66b790d71..72378e459640f5d5d524aacf7122f65ccc737d88 100644 (file)
@@ -1,3 +1,7 @@
+2001-03-06  Baruch Even  <baruch@lyx.org>
+
+       * Various files: Small fixes to get the gnome frontend to compile again.
+
 2001-02-26  Dekel Tsur  <dekelts@tau.ac.il>
 
        * FormRef.C (apply): Update bookmark #0 after inserting a reference.
index 3f25135f6cb7aae24a63cbaeca98cd8a80a7e2ce..773a948de87975324c17d12c110397f1a6c07608 100644 (file)
@@ -92,7 +92,7 @@ void FormCitation::showInset( InsetCommand * const inset )
   if( dialog_!=0 || inset == 0 ) return;
   
   inset_ = inset;
-  ih_ = inset_->hide.connect(slot(this, &FormCitation::hide));
+  ih_ = inset_->hideDialog.connect(slot(this, &FormCitation::hide));
 
   u_ = d_->updateBufferDependent.connect(slot(this, &FormCitation::updateSlot));
   h_ = d_->hideBufferDependent.connect(slot(this, &FormCitation::hide));
index 6326083ef03d37527c14684c65eabeab38856c6e..d0b3ce0c70bd4c20adcd13808a05e94865b661be 100644 (file)
@@ -18,7 +18,6 @@
 
 #include "DialogBase.h"
 #include "LString.h"
-#include "boost/utility.hpp"
 #include "insets/insetcommand.h"
 
 #include <gtk--/container.h>
@@ -33,7 +32,7 @@
 
 /** This class provides an Gnome implementation of the FormCitation Dialog.
  */
-class FormCitation : public DialogBase, public noncopyable {
+class FormCitation : public DialogBase {
 public:
   ///
   FormCitation(LyXView *, Dialogs *);
index 216fbd70bcd52eb910781f11cf0d537eb08e38d3..961559d9cac2718c4e22df1548e039721a337035 100644 (file)
@@ -16,7 +16,6 @@
 
 #include "DialogBase.h"
 #include <gnome--/about.h>
-#include "boost/utility.hpp"
 
 class Dialogs;
 // same arguement as in Dialogs.h s/LyX/UI/
@@ -24,7 +23,7 @@ class LyXView;
 
 /** This class provides an GTK-- implementation of the FormCopyright Dialog.
  */
-class FormCopyright : public DialogBase, public noncopyable {
+class FormCopyright : public DialogBase {
 public:
        /// #FormCopyright x(LyXFunc ..., Dialogs ...);#
        FormCopyright(LyXView *, Dialogs *);
index 8ecb60552436cd3254355f6a8c8e5348a42afee8..ae8635c75e93a2e7c39fe37ed05f26caec97138f 100644 (file)
@@ -55,7 +55,7 @@ void FormError::showInset( InsetError * const inset )
   if( dialog_!=0 || inset == 0 ) return;
   
   inset_ = inset;
-  ih_ = inset_->hide.connect(slot(this, &FormError::hide));
+  ih_ = inset_->hideDialog.connect(slot(this, &FormError::hide));
 
   show();
 }
index 7657be0a3e34f02a6d7a6aa40a9c3503ef776a53..5a3d9c82cd72a7a280ea853d3b70d214a4fa53aa 100644 (file)
 
 #include "DialogBase.h"
 #include "LString.h"
-#include "boost/utility.hpp"
 #include "insets/inseterror.h"
 
 #include <gtk--/container.h>
 
 /** This class provides an Gnome implementation of the FormError Dialog.
  */
-class FormError : public DialogBase, public noncopyable {
+class FormError : public DialogBase {
 public:
   ///
   FormError(LyXView *, Dialogs *);
index 921d899caf01873d7fcd7089dc8706cdf8fc53cf..1c26211ebf5a9091d3fad93be11b153e0f5f3761 100644 (file)
@@ -66,7 +66,7 @@ void FormIndex::showInset( InsetCommand * const inset )
   if( dialog_!=0 || inset == 0 ) return;
   
   inset_ = inset;
-  ih_ = inset_->hide.connect(slot(this, &FormIndex::hide));
+  ih_ = inset_->hideDialog.connect(slot(this, &FormIndex::hide));
   
   params = inset->params();
   show();
index 63f0b85b4ed97abd98a5ffd7b7cb0e5d6db53f64..540ed7377b5725773d3c5cc34e96e6f0859cea10 100644 (file)
@@ -18,7 +18,6 @@
 
 #include "DialogBase.h"
 #include "LString.h"
-#include "boost/utility.hpp"
 #include "insets/insetcommand.h"
 
 #include <gtk--/container.h>
@@ -27,7 +26,7 @@
 
 /** This class provides an Gnome implementation of the FormIndex Dialog.
  */
-class FormIndex : public DialogBase, public noncopyable {
+class FormIndex : public DialogBase  {
 public:
   ///
   FormIndex(LyXView *, Dialogs *);
index 0824de777837f267a1689ab996885162891b805d..18a853a8a61f4861e3ef02e270ae8c1b62777691 100644 (file)
@@ -15,7 +15,6 @@
 #define FORMPRINT_H
 
 #include "DialogBase.h"
-#include "boost/utility.hpp"
 
 #include <gtk--/widget.h>
 #include <gtk--/radiobutton.h>
@@ -39,7 +38,7 @@ using SigC::Connection;
 /** This class provides an Gnome implementation of the FormPrint Dialog.
     The print dialog allows users to print their documents.
  */
-class FormPrint : public DialogBase, public noncopyable {
+class FormPrint : public DialogBase {
 public:
   /**@name Constructors and Destructors */
   //@{
index a60c651e3e6e91fe28d443ff922d72da372e5015..c69e96a4872aae39965029cc9cfa202cbd023487 100644 (file)
@@ -69,7 +69,7 @@ void FormRef::showInset( InsetCommand * const inset )
   if( dialog_!=0 || inset == 0 ) return;
   
   inset_ = inset;
-  ih_ = inset_->hide.connect(slot(this, &FormRef::hide));
+  ih_ = inset_->hideDialog.connect(slot(this, &FormRef::hide));
 
   acttype_ = EDIT;
   
index e423c44f637b23aeaa23dbf8761e5463e6999e34..d9b8e6799079965bb218a5d93de297bd75d5a495 100644 (file)
@@ -18,7 +18,6 @@
 
 #include "DialogBase.h"
 #include "LString.h"
-#include "boost/utility.hpp"
 #include "insets/insetcommand.h"
 
 #include <gtk--/container.h>
@@ -31,7 +30,7 @@
 
 /** This class provides an Gnome implementation of the FormRef Dialog.
  */
-class FormRef : public DialogBase, public noncopyable {
+class FormRef : public DialogBase {
 public:
   ///
   FormRef(LyXView *, Dialogs *);
index 6d0827c361f456f1d96d730fc16f2604f5a5f182..f5ede35ed6b455430c9d0f0ca7c5cbbae21deae2 100644 (file)
@@ -23,6 +23,7 @@
 #include "LyXView.h"
 #include "form_toc.h"
 #include "lyxtext.h"
+#include "lyxfunc.h"
 
 extern "C" {
 #include "diatoc_interface.h"
@@ -59,7 +60,7 @@ void FormToc::showInset( InsetCommand * const inset )
   if( dialog_!=0 || inset == 0 ) return;
   
   inset_ = inset;
-  ih_ = inset_->hide.connect(slot(this, &FormToc::hide));
+  ih_ = inset_->hideDialog.connect(slot(this, &FormToc::hide));
   
   params = inset->params();
   show();
@@ -213,42 +214,40 @@ void FormToc::updateSlot(bool)
 
 void FormToc::apply(Buffer::TocItem tg)
 {
+#if 0  
+  // Doesn't compile anymore...
   if (!lv_->view()->available()) return;
-  
+
   lv_->view()->beforeChange();
   lv_->view()->text->SetCursor( lv_->view(), tg.par, 0 );
   lv_->view()->text->sel_cursor = lv_->view()->text->cursor;
   lv_->view()->update(BufferView::SELECT|BufferView::FITCUR);
+#endif
+
+  string const str = tg.str;
+  lv_->getLyXFunc()->Dispatch(LFUN_GOTO_PARAGRAPH, str);
 }
 
 void FormToc::changeList(Buffer::TocType type)
 {
-  if (!ignore_callback_)
-    {
-      switch (type) {
-      case Buffer::TOC_TOC :
-       {
-         params.setCmdName("tableofcontents");
-         break;
+       if (!ignore_callback_) {
+               switch (type) {
+               case Buffer::TOC_TOC :
+                       params.setCmdName("tableofcontents");
+                       break;
+               case Buffer::TOC_LOF :
+                       params.setCmdName("listoffigures");
+                       break;
+               case Buffer::TOC_LOT :
+                       params.setCmdName("listoftabels");
+                       break;
+               case Buffer::TOC_LOA :
+                       params.setCmdName("listofalgorithms");
+                       break;
+               };
+
+               updateSlot();
        }
-      case Buffer::TOC_LOF :
-       {
-         params.setCmdName("listoffigures");
-         break;
-       }
-      case Buffer::TOC_LOT :
-       {
-         params.setCmdName("listoftabels");
-         break;
-       }
-      case Buffer::TOC_LOA :
-       {
-         params.setCmdName("listofalgorithms");
-         break;
-       }
-      };
-      updateSlot();
-    }
 }
 
 void FormToc::hide()
index 32b8e25129b995213add022fa123cb9569b40e29..68f73e678cc0a7f0917681e66dd8017b084cd198 100644 (file)
@@ -18,7 +18,6 @@
 
 #include "DialogBase.h"
 #include "LString.h"
-#include "boost/utility.hpp"
 #include "insets/insetcommand.h"
 #include "buffer.h"
 
@@ -28,7 +27,7 @@
 
 /** This class provides an Gnome implementation of the FormToc Dialog.
  */
-class FormToc : public DialogBase, public noncopyable {
+class FormToc : public DialogBase {
 public:
   ///
   FormToc(LyXView *, Dialogs *);
index 22f2e00f202c1d72c11916f25b4a0af2dbe806d6..3faf5954520421c1b7a7248447b918139c6e73f6 100644 (file)
@@ -59,7 +59,7 @@ void FormUrl::showInset( InsetCommand * const inset )
   if( dialog_!=0 || inset == 0 ) return;
   
   inset_ = inset;
-  ih_ = inset_->hide.connect(slot(this, &FormUrl::hide));
+  ih_ = inset_->hideDialog.connect(slot(this, &FormUrl::hide));
   
   params = inset->params();
   show();
index 0ab2deade8f61fb1d0388b2bdd55f92d51784bad..6c8aeb221c72ac77231cb4ecb8e0468188368d42 100644 (file)
@@ -18,7 +18,6 @@
 
 #include "DialogBase.h"
 #include "LString.h"
-#include "boost/utility.hpp"
 #include "insets/insetcommand.h"
 
 #include <gtk--/container.h>
@@ -28,7 +27,7 @@
 
 /** This class provides an Gnome implementation of the FormUrl Dialog.
  */
-class FormUrl : public DialogBase, public noncopyable {
+class FormUrl : public DialogBase {
 public:
   /**@name Constructors and Destructors */
   //@{
index 8dd616d0ba36634cc2f2986b5dd534d018497aa3..16104ef45e07f51fb876956da7c93096e67c4c05 100644 (file)
@@ -41,8 +41,9 @@ libgnome_la_OBJADD = \
        ../xforms/form_url.lo \
        ../xforms/input_validators.lo \
        ../xforms/RadioButtonGroup.lo \
+       ../xforms/Timeout_pimpl.lo \
        ../xforms/Toolbar_pimpl.lo \
-       ../xforms/xform_helpers.lo \
+       ../xforms/xforms_helpers.lo
 LIBS= 
 LDFLAGS= $(libgnome_la_OBJADD)
 LYXDATADIRS = 
index 08a2306cbbbcabe7b4f4b3b416537f20130994b1..2a0201cb4c9cd00f55fa3394fbf4954ed77ff9b2 100644 (file)
@@ -191,12 +191,16 @@ void Menubar::Pimpl::callback(int action)
 
 void Menubar::Pimpl::callbackToc(Buffer::TocItem tg)
 {
+#if 0 
   if (!owner_->view()->available()) return;
   
   owner_->view()->beforeChange();
   owner_->view()->text->SetCursor( owner_->view(), tg.par, 0 );
   owner_->view()->text->sel_cursor = owner_->view()->text->cursor;
   owner_->view()->update(BufferView::SELECT|BufferView::FITCUR);
+#endif
+
+  owner_->getLyXFunc()->Dispatch(LFUN_GOTO_PARAGRAPH, tg.str);
 }
 
 void Menubar::Pimpl::composeUIInfo(string const & menu_name, vector<Gnome::UI::Info> & Menus, string rootpath)
index 1ab115a4e0a3da44cea1b482b6c667c1595ded5a..952461b5af39e6bfd1f5850d0f285fcddcb4fcb2 100644 (file)
@@ -1,3 +1,12 @@
+2001-03-07  Edwin Leuven  <leuven@fee.uva.nl>
+
+        * added credits:
+       * Dialogs.C:
+       * Makefile.am:
+       * FormCredits.[Ch]:
+       * form_credits.[Ch]:
+       * forms/form_credits.fd:
+
 2001-03-07  Lars Gullik Bjønnes  <larsbj@trylle.birdstep.com>
 
        * Menubar_pimpl.h: make Pipl::ItemInfo::item_ a boost::shared_ptr,
 
        * FormPreferences.C: removed three unused using directives.
 
+2001-03-05  Edwin Leuven  <leuven@fee.uva.nl>
+
+       * added find/replace dialog:
+       * FormSearch.*: added
+       * form_search.*: added
+       * forms/form_search.fd: added
+
 2001-02-27  Dekel Tsur  <dekelts@tau.ac.il>
 
        * FormRef.C: Fixed the behaviour of Goto-Ref.
index 7884a781cfe821afd92893931792fa47225b4f86..1a177293298b0dfdbaf0ac9fb01c5834bdc6af30 100644 (file)
@@ -17,6 +17,7 @@
 #include "FormCitation.h"
 #include "FormCharacter.h"
 #include "FormCopyright.h"
+#include "FormCredits.h"
 #include "FormDocument.h"
 #include "FormError.h"
 #include "FormGraphics.h"
 
 using std::endl;
 
-// temporary till ported
-extern void ShowCredits();
-
-
 // Signal enabling all visible popups to be redrawn if so desired.
 // E.g., when the GUI colours have been remapped.
 Signal0<void> Dialogs::redrawGUI;
@@ -58,6 +55,7 @@ Dialogs::Dialogs(LyXView * lv)
        dialogs_.push_back(new FormCharacter(lv, this));
        dialogs_.push_back(new FormCitation(lv, this));
        dialogs_.push_back(new FormCopyright(lv, this));
+       dialogs_.push_back(new FormCredits(lv, this));
        dialogs_.push_back(new FormDocument(lv, this));
        dialogs_.push_back(new FormError(lv, this));
        dialogs_.push_back(new FormGraphics(lv, this));
@@ -77,8 +75,6 @@ Dialogs::Dialogs(LyXView * lv)
        dialogs_.push_back(new FormUrl(lv, this));
        dialogs_.push_back(new FormVCLog(lv, this));
 
-       showCredits.connect(slot(ShowCredits));
-
        // reduce the number of connections needed in
        // dialogs by a simple connection here.
        hideAll.connect(hideBufferDependent.slot());
diff --git a/src/frontends/xforms/FormCredits.C b/src/frontends/xforms/FormCredits.C
new file mode 100644 (file)
index 0000000..d4ab71d
--- /dev/null
@@ -0,0 +1,80 @@
+/**
+ * \file FormCredits.C
+ * Copyright 2001 The LyX Team.
+ * See the file COPYING.
+ *
+ * \author Edwin Leuven, leuven@fee.uva.nl
+ */
+
+#include <config.h>
+
+#include FORMS_H_LOCATION
+
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
+#include "Dialogs.h"
+#include "LyXView.h"
+#include "form_credits.h"
+#include "FormCredits.h"
+#include "xforms_helpers.h"
+#include "support/filetools.h"
+
+FormCredits::FormCredits( LyXView * lv, Dialogs * d )
+  : FormBaseBI(lv, d, _("Credits"), new OkCancelPolicy), dialog_(0)
+{
+   // let the dialog be shown
+   // This is a permanent connection so we won't bother
+   // storing a copy because we won't be disconnecting.
+   d->showCredits.connect(slot(this, &FormCredits::show));
+}
+
+
+FormCredits::~FormCredits()
+{
+   delete dialog_;
+}
+
+
+FL_FORM * FormCredits::form() const
+{
+   if (dialog_ ) 
+     return dialog_->form;
+   return 0;
+}
+
+// needed for the browser
+extern string system_lyxdir;
+
+void FormCredits::build()
+{
+   dialog_ = build_credits();
+
+   // Workaround dumb xforms sizing bug
+   minw_ = form()->w;
+   minh_ = form()->h;
+
+   // Manage the cancel/close button
+   bc_.setCancel(dialog_->button_cancel);
+   bc_.refresh();
+               
+   /* read the credits into the browser */ 
+               
+   /* try file LYX_DIR/CREDITS */ 
+   string real_file = AddName (system_lyxdir, "CREDITS");
+   
+   if (!fl_load_browser(dialog_->browser_credits,
+                       real_file.c_str())) {
+      fl_add_browser_line(dialog_->browser_credits,
+                         _("ERROR: LyX wasn't able to read"
+                           " CREDITS file"));
+      fl_add_browser_line(dialog_->browser_credits, "");
+      fl_add_browser_line(dialog_->browser_credits,
+                         _("Please install correctly to estimate"
+                           " the great"));
+      fl_add_browser_line(dialog_->browser_credits,
+                         _("amount of work other people have done"
+                           " for the LyX project."));
+   }
+}
diff --git a/src/frontends/xforms/FormCredits.h b/src/frontends/xforms/FormCredits.h
new file mode 100644 (file)
index 0000000..feced9e
--- /dev/null
@@ -0,0 +1,42 @@
+/**
+ * \file FormCredits.h
+ * Copyright 2001 The LyX Team.
+ * See the file COPYING.
+ *
+ * \author Edwin Leuven, leuven@fee.uva.nl
+ */
+
+#ifndef FORMCREDITS_H
+#define FORMCREDITS_H
+
+#include "FormBase.h"
+
+#ifdef __GNUG__
+#pragma interface
+#endif
+
+struct FD_form_credits;
+
+/** This class provides an XForms implementation of the FormCredits Dialog.
+ */
+class FormCredits : public FormBaseBI {
+public:
+       /// #FormCopyright x(LyXFunc ..., Dialogs ...);#
+       FormCredits(LyXView *, Dialogs *);
+       ///
+       ~FormCredits();
+
+private:
+       /// Build the dialog
+       virtual void build();
+       /// Pointer to the actual instantiation of the xforms form
+       virtual FL_FORM * form() const;
+       /// Fdesign generated method
+       FD_form_credits * build_credits();
+
+       /// Real GUI implementation.
+       FD_form_credits * dialog_;
+};
+
+#endif
+
index 95d4205ce79aa85f3f738074ec90a0bac1de65ef..4a18c9462362186d801415e0bed7edde059e2000 100644 (file)
@@ -49,6 +49,10 @@ libxforms_la_SOURCES = \
        FormCopyright.h \
        form_copyright.C \
        form_copyright.h \
+       FormCredits.C \
+       FormCredits.h \
+       form_credits.C \
+       form_credits.h \
        FormDocument.C \
        FormDocument.h \
        form_document.C \
diff --git a/src/frontends/xforms/form_credits.C b/src/frontends/xforms/form_credits.C
new file mode 100644 (file)
index 0000000..7a36aad
--- /dev/null
@@ -0,0 +1,51 @@
+// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext
+#include <config.h>
+#include "lyx_gui_misc.h"
+#include "gettext.h"
+
+/* Form definition file generated with fdesign. */
+
+#include FORMS_H_LOCATION
+#include <stdlib.h>
+#include "form_credits.h"
+#include "FormCredits.h"
+
+FD_form_credits::~FD_form_credits()
+{
+  if ( form->visible ) fl_hide_form( form );
+  fl_free_form( form );
+}
+
+
+FD_form_credits * FormCredits::build_credits()
+{
+  FL_OBJECT *obj;
+  FD_form_credits *fdui = new FD_form_credits;
+
+  fdui->form = fl_bgn_form(FL_NO_BOX, 500, 330);
+  fdui->form->u_vdata = this;
+  obj = fl_add_box(FL_UP_BOX, 0, 0, 500, 330, "");
+  fdui->button_cancel = obj = fl_add_button(FL_RETURN_BUTTON, 180, 290, 140, 30, _("OK"));
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_gravity(obj, FL_South, FL_South);
+    fl_set_object_resize(obj, FL_RESIZE_NONE);
+    fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
+  obj = fl_add_text(FL_NORMAL_TEXT, 10, 40, 480, 30, _("Matthias"));
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_lalign(obj, FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
+    fl_set_object_lstyle(obj, FL_ITALIC_STYLE);
+    fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
+  obj = fl_add_text(FL_NORMAL_TEXT, 10, 10, 480, 30, _("All these people have contributed to the LyX project. Thanks, "));
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_lalign(obj, FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
+    fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
+  fdui->browser_credits = obj = fl_add_browser(FL_NORMAL_BROWSER, 10, 80, 480, 200, "");
+    fl_set_object_gravity(obj, FL_NorthWest, FL_SouthEast);
+  fl_end_form();
+
+  fdui->form->fdui = fdui;
+
+  return fdui;
+}
+/*---------------------------------------*/
+
diff --git a/src/frontends/xforms/form_credits.h b/src/frontends/xforms/form_credits.h
new file mode 100644 (file)
index 0000000..ef9791d
--- /dev/null
@@ -0,0 +1,20 @@
+// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext
+/** Header file generated with fdesign **/
+
+#ifndef FD_form_credits_h_
+#define FD_form_credits_h_
+
+/** Callbacks, globals and object handlers **/
+extern  "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
+
+
+/**** Forms and Objects ****/
+struct FD_form_credits {
+       ~FD_form_credits();
+
+       FL_FORM *form;
+       FL_OBJECT *button_cancel;
+       FL_OBJECT *browser_credits;
+};
+
+#endif /* FD_form_credits_h_ */
diff --git a/src/frontends/xforms/forms/form_credits.fd b/src/frontends/xforms/forms/form_credits.fd
new file mode 100644 (file)
index 0000000..56bce85
--- /dev/null
@@ -0,0 +1,106 @@
+Magic: 13000
+
+Internal Form Definition File
+    (do not change)
+
+Number of forms: 1
+Unit of measure: FL_COORD_PIXEL
+
+=============== FORM ===============
+Name: form_credits
+Width: 500
+Height: 330
+Number of Objects: 5
+
+--------------------
+class: FL_BOX
+type: UP_BOX
+box: 0 0 500 330
+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_BUTTON
+type: RETURN_BUTTON
+box: 180 290 140 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_NONE
+gravity: FL_South FL_South
+name: button_cancel
+callback: C_FormBaseCancelCB
+argument: 0
+
+--------------------
+class: FL_TEXT
+type: NORMAL_TEXT
+box: 10 40 480 30
+boxtype: FL_FLAT_BOX
+colors: FL_COL1 FL_MCOL
+alignment: FL_ALIGN_CENTER|FL_ALIGN_INSIDE
+style: FL_ITALIC_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Matthias
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NorthWest FL_NorthEast
+name: 
+callback: 
+argument: 
+
+--------------------
+class: FL_TEXT
+type: NORMAL_TEXT
+box: 10 10 480 30
+boxtype: FL_FLAT_BOX
+colors: FL_COL1 FL_MCOL
+alignment: FL_ALIGN_CENTER|FL_ALIGN_INSIDE
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: All these people have contributed to the LyX project. Thanks,
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NorthWest FL_NorthEast
+name: 
+callback: 
+argument: 
+
+--------------------
+class: FL_BROWSER
+type: NORMAL_BROWSER
+box: 10 80 480 200
+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_credits
+callback: 
+argument: 
+
+==============================
+create_the_forms
index d8cf2eca41116ee1061cc42c2633a04a628a7b7d..4987348d4dd86d3f15c335667d2ecb033b71e2aa 100644 (file)
@@ -22,6 +22,7 @@ SRCS := form_bibitem.fd \
        form_character.fd \
        form_citation.fd \
        form_copyright.fd \
+       form_credits.fd \
        form_document.fd \
        form_error.fd \
        form_filedialog.fd \
index 091a11ee5499a6a5f72173c11da3732aecd63b8c..3d7983e67d2efea094034cb6e2518a5b520a9b97 100644 (file)
@@ -19,7 +19,6 @@
 #include "lyx_gui_misc.h"
 #include "BufferView.h"
 #include "buffer.h"
-#include "credits_form.h"
 #include "form1.h"
 #include "gettext.h"
 #include "lyx.h"
@@ -40,7 +39,6 @@ using std::endl;
 
 extern BufferView * current_view;
 
-extern FD_form_credits * fd_form_credits;
 extern FD_form_figure * fd_form_figure;
 extern FD_form_sendto * fd_form_sendto;
 extern FD_form_spell_check * fd_form_spell_check;
@@ -68,9 +66,6 @@ void RedrawAllBufferRelatedDialogs()
        if (fd_delim && fd_delim->delim->visible) {
                fl_redraw_form(fd_delim->delim);
        }
-       if (fd_form_credits && fd_form_credits->form_credits->visible) {
-               fl_redraw_form(fd_form_credits->form_credits);
-       }
        if (fd_form_figure->form_figure->visible) {
                fl_redraw_form(fd_form_figure->form_figure);
        }