mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-25 05:55:34 +00:00
Ed's credits patch and Baruch's gnome patch.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1710 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
ac8cbdbddb
commit
b66c83b542
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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_);
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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 \
|
||||
|
@ -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"));
|
||||
}
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
// -*- C++ -*-
|
||||
#ifndef CREDITS_H
|
||||
#define CREDITS_H
|
||||
|
||||
void ShowCredits();
|
||||
|
||||
#endif
|
@ -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.
|
||||
|
@ -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));
|
||||
|
@ -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 *);
|
||||
|
@ -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 *);
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -18,14 +18,13 @@
|
||||
|
||||
#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 *);
|
||||
|
@ -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();
|
||||
|
@ -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 *);
|
||||
|
@ -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 */
|
||||
//@{
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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 *);
|
||||
|
@ -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()
|
||||
|
@ -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 *);
|
||||
|
@ -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();
|
||||
|
@ -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 */
|
||||
//@{
|
||||
|
@ -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 =
|
||||
|
@ -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)
|
||||
|
@ -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,
|
||||
@ -65,6 +74,13 @@
|
||||
|
||||
* 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.
|
||||
|
@ -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"
|
||||
@ -42,10 +43,6 @@
|
||||
|
||||
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());
|
||||
|
80
src/frontends/xforms/FormCredits.C
Normal file
80
src/frontends/xforms/FormCredits.C
Normal file
@ -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."));
|
||||
}
|
||||
}
|
42
src/frontends/xforms/FormCredits.h
Normal file
42
src/frontends/xforms/FormCredits.h
Normal file
@ -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
|
||||
|
@ -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 \
|
||||
|
@ -1,4 +1,4 @@
|
||||
// File modified by fdfix.sh for use by lyx (with xforms > 0.88) and gettext
|
||||
// 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"
|
||||
@ -6,27 +6,36 @@
|
||||
/* Form definition file generated with fdesign. */
|
||||
|
||||
#include FORMS_H_LOCATION
|
||||
#include <cstdlib>
|
||||
#include "credits_form.h"
|
||||
#include <stdlib.h>
|
||||
#include "form_credits.h"
|
||||
#include "FormCredits.h"
|
||||
|
||||
FD_form_credits *create_form_form_credits(void)
|
||||
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 = (FD_form_credits *) fl_calloc(1, sizeof(FD_form_credits));
|
||||
FD_form_credits *fdui = new FD_form_credits;
|
||||
|
||||
fdui->form_credits = fl_bgn_form(FL_NO_BOX, 500, 330);
|
||||
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, "");
|
||||
obj = fl_add_button(FL_RETURN_BUTTON, 180, 290, 140, 30, _("OK"));
|
||||
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, CreditsOKCB, 0);
|
||||
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,"));
|
||||
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);
|
||||
@ -34,7 +43,7 @@ FD_form_credits *create_form_form_credits(void)
|
||||
fl_set_object_gravity(obj, FL_NorthWest, FL_SouthEast);
|
||||
fl_end_form();
|
||||
|
||||
fdui->form_credits->fdui = fdui;
|
||||
fdui->form->fdui = fdui;
|
||||
|
||||
return fdui;
|
||||
}
|
@ -1,21 +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 CreditsOKCB(FL_OBJECT *, long);
|
||||
extern "C" void C_FormBaseCancelCB(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;
|
||||
struct FD_form_credits {
|
||||
~FD_form_credits();
|
||||
|
||||
extern FD_form_credits * create_form_form_credits(void);
|
||||
FL_FORM *form;
|
||||
FL_OBJECT *button_cancel;
|
||||
FL_OBJECT *browser_credits;
|
||||
};
|
||||
|
||||
#endif /* FD_form_credits_h_ */
|
@ -44,8 +44,8 @@ label: OK
|
||||
shortcut: ^M
|
||||
resize: FL_RESIZE_NONE
|
||||
gravity: FL_South FL_South
|
||||
name:
|
||||
callback: CreditsOKCB
|
||||
name: button_cancel
|
||||
callback: C_FormBaseCancelCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
@ -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 \
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user