From 91777cb3a1f3601b6b7f9d4282035866bbeda437 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Thu, 27 Sep 2001 09:45:57 +0000 Subject: [PATCH] Remove old splash dialog(s). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2807 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/ChangeLog | 6 ++ src/frontends/Dialogs.C | 5 - src/frontends/Dialogs.h | 6 -- src/frontends/controllers/ChangeLog | 10 ++ src/frontends/controllers/ControlSplash.C | 63 ------------ src/frontends/controllers/ControlSplash.h | 58 ----------- src/frontends/controllers/GUI.h | 17 ---- src/frontends/controllers/Makefile.am | 2 - src/frontends/controllers/ViewBase.h | 25 ----- src/frontends/gnome/ChangeLog | 6 ++ src/frontends/gnome/Dialogs.C | 9 -- src/frontends/gnome/Makefile.am | 2 - src/frontends/qt2/ChangeLog | 9 ++ src/frontends/qt2/Dialogs.C | 4 - src/frontends/qt2/Makefile.dialogs | 4 - src/frontends/qt2/QSplash.C | 50 --------- src/frontends/qt2/QSplash.h | 41 -------- src/frontends/qt2/QSplashDialog.C | 51 ---------- src/frontends/qt2/QSplashDialog.h | 25 ----- src/frontends/xforms/ChangeLog | 13 +++ src/frontends/xforms/Dialogs.C | 9 -- src/frontends/xforms/FormSplash.C | 117 ---------------------- src/frontends/xforms/FormSplash.h | 50 --------- src/frontends/xforms/Makefile.am | 4 - src/frontends/xforms/Menubar_pimpl.C | 6 -- src/frontends/xforms/form_splash.C | 38 ------- src/frontends/xforms/form_splash.h | 19 ---- src/frontends/xforms/forms/form_splash.fd | 52 ---------- src/frontends/xforms/forms/makefile | 1 - 29 files changed, 44 insertions(+), 658 deletions(-) delete mode 100644 src/frontends/controllers/ControlSplash.C delete mode 100644 src/frontends/controllers/ControlSplash.h delete mode 100644 src/frontends/qt2/QSplash.C delete mode 100644 src/frontends/qt2/QSplash.h delete mode 100644 src/frontends/qt2/QSplashDialog.C delete mode 100644 src/frontends/qt2/QSplashDialog.h delete mode 100644 src/frontends/xforms/FormSplash.C delete mode 100644 src/frontends/xforms/FormSplash.h delete mode 100644 src/frontends/xforms/form_splash.C delete mode 100644 src/frontends/xforms/form_splash.h delete mode 100644 src/frontends/xforms/forms/form_splash.fd diff --git a/src/frontends/ChangeLog b/src/frontends/ChangeLog index d7d774fe66..9b516d3832 100644 --- a/src/frontends/ChangeLog +++ b/src/frontends/ChangeLog @@ -1,3 +1,9 @@ +2001-09-27 Angus Leeming + + * Dialogs.h (showSplash, destroySplash, splash_): removed. + + * Dialogs.C (destroySplash): removed. + 2001-08-27 John Levon * GUIRunTime.h: initApplication() should take a & to argc diff --git a/src/frontends/Dialogs.C b/src/frontends/Dialogs.C index e3c1687c86..4e6f32171c 100644 --- a/src/frontends/Dialogs.C +++ b/src/frontends/Dialogs.C @@ -28,8 +28,3 @@ void Dialogs::add(DialogBase * ptr) lyx::Assert(ptr); dialogs_.push_back(db_ptr(ptr)); } - -void Dialogs::destroySplash() -{ - splash_.reset(); -} diff --git a/src/frontends/Dialogs.h b/src/frontends/Dialogs.h index 3a767a5280..631cd9dde3 100644 --- a/src/frontends/Dialogs.h +++ b/src/frontends/Dialogs.h @@ -151,10 +151,6 @@ public: SigC::Signal0 showSpellchecker; /// bring up the spellchecker tab in preferences SigC::Signal0 showSpellcheckerPreferences; - /// pop up the splash - SigC::Signal0 showSplash; - /// destroy the splash dialog - void destroySplash(); /// SigC::Signal1 showTabular; /// @@ -179,8 +175,6 @@ private: void add(DialogBase *); /// the dialogs being managed std::vector dialogs_; - /// the splash dialog - boost::scoped_ptr splash_; }; #endif diff --git a/src/frontends/controllers/ChangeLog b/src/frontends/controllers/ChangeLog index 9094d96687..3eccaaefab 100644 --- a/src/frontends/controllers/ChangeLog +++ b/src/frontends/controllers/ChangeLog @@ -1,3 +1,13 @@ +2001-09-27 Angus Leeming + + * ControlSplash.[Ch]: removed. + + * GUI.h: remove GUISplash class. + + * ViewBase.h: remove ViewSplash class. + + * Makefile.am: remove ControlSplash.[Ch]. + 2001-09-25 Angus Leeming * ControlButtons.h: add variable emergency_exit_. If set to true, the diff --git a/src/frontends/controllers/ControlSplash.C b/src/frontends/controllers/ControlSplash.C deleted file mode 100644 index fd18e80073..0000000000 --- a/src/frontends/controllers/ControlSplash.C +++ /dev/null @@ -1,63 +0,0 @@ -/** - * \file ControlSplash.C - * Copyright 2001 the LyX Team - * Read the file COPYING - * - * \author Allan Rae - * \author John Levon - * \author Angus Leeming, a.leeming@ic.ac.uk - */ - -#include - -#ifdef __GNUG__ -#pragma implementation -#endif - -#include "ControlSplash.h" -#include "Dialogs.h" -#include "ViewBase.h" -#include "version.h" -#include "support/filetools.h" -#include "lyxrc.h" // show_banner - -ControlSplash::ControlSplash(Dialogs & d) - : d_(d) -{ - c_ = d.showSplash.connect(SigC::slot(this, &ControlSplash::show)); -} - - -string const & ControlSplash::bannerFile() const -{ - return banner_file_; -} - - -string const & ControlSplash::LyXVersion() const -{ - return version_; -} - - -void ControlSplash::show() -{ - if (!lyxrc.show_banner) - return; - - banner_file_ = LibFileSearch("images", "banner", "xpm"); - if (banner_file_.empty()) - return; - - version_ = LYX_VERSION; - - view().show(); -} - - -void ControlSplash::hide() -{ - view().hide(); - c_.disconnect(); - d_.destroySplash(); -} diff --git a/src/frontends/controllers/ControlSplash.h b/src/frontends/controllers/ControlSplash.h deleted file mode 100644 index c9fe110455..0000000000 --- a/src/frontends/controllers/ControlSplash.h +++ /dev/null @@ -1,58 +0,0 @@ -// -*- C++ -*- -/** - * \file ControlSplash.h - * Copyright 2001 the LyX Team - * Read the file COPYING - * - * \author Allan Rae - * \author John Levon - * \author Angus Leeming, a.leeming@ic.ac.uk - */ - -#ifndef CONTROLSPLASH_H -#define CONTROLSPLASH_H - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "DialogBase.h" -#include "LString.h" - -class Dialogs; -class ViewSplash; - -/** The startup splash screen - */ -class ControlSplash : public DialogBase { -public: - /// - ControlSplash(Dialogs &); - /// - string const & bannerFile() const; - /// - string const & LyXVersion() const; - /// hide (and destroy) the dialog - void hide(); - -private: - /** Allow the Controller to access the View. This method must be - instantiated in a daughter class that creates the actual instance - of the View. */ - virtual ViewSplash & view() = 0; - - /// show the dialog - void show(); - - /// our container - Dialogs & d_; - /// the show connection - SigC::Connection c_; - - /// - string banner_file_; - /// - string version_; -}; - -#endif // CONTROLSPLASH_H diff --git a/src/frontends/controllers/GUI.h b/src/frontends/controllers/GUI.h index 3f075ff3d0..663b075eef 100644 --- a/src/frontends/controllers/GUI.h +++ b/src/frontends/controllers/GUI.h @@ -10,23 +10,6 @@ #ifndef GUI_H #define GUI_H -/** This class instantiates and makes available the GUI-specific - View for the Splash screen controller. - */ -template -class GUISplash : public ControlSplash { -public: - /// - GUISplash(Dialogs & d) : ControlSplash(d), view_(*this) {} - /// - virtual ViewSplash & view() { return view_; } - -private: - /// - GUIview view_; -}; - - /** This class instantiates and makes available the GUI-specific ButtonController and View. */ diff --git a/src/frontends/controllers/Makefile.am b/src/frontends/controllers/Makefile.am index 40bc2b5832..ee819b9f1a 100644 --- a/src/frontends/controllers/Makefile.am +++ b/src/frontends/controllers/Makefile.am @@ -64,8 +64,6 @@ libcontrollers_la_SOURCES=\ ControlSearch.h \ ControlSpellchecker.C \ ControlSpellchecker.h \ - ControlSplash.C \ - ControlSplash.h \ ControlTabularCreate.C \ ControlTabularCreate.h \ ControlThesaurus.C \ diff --git a/src/frontends/controllers/ViewBase.h b/src/frontends/controllers/ViewBase.h index f84cf426f0..121533f711 100644 --- a/src/frontends/controllers/ViewBase.h +++ b/src/frontends/controllers/ViewBase.h @@ -16,7 +16,6 @@ #include #include "ControlButtons.h" -#include "ControlSplash.h" class ViewBase { public: @@ -61,30 +60,6 @@ protected: }; -class ViewSplash { -public: - /// - ViewSplash(ControlSplash & c) : controller_(c) {} - /// - virtual ~ViewSplash() {} - - /// Hide the dialog. - virtual void hide() = 0; - /// Create the dialog and show it. - virtual void show() = 0; - - /** The shortcut allows (e.g. xform's) global callback functions - access without making the whole controller_ public. - */ - /// - void Hide() { controller_.hide(); } - -protected: - /// The view is, after all, controlled! - ControlSplash & controller_; -}; - - /** A generic class to cast the ButtonController controller_.bc_ to it's daughter class. */ template diff --git a/src/frontends/gnome/ChangeLog b/src/frontends/gnome/ChangeLog index 422155cc16..dd1e5058f0 100644 --- a/src/frontends/gnome/ChangeLog +++ b/src/frontends/gnome/ChangeLog @@ -1,3 +1,9 @@ +2001-09-27 Angus Leeming + + * Dialogs.C: remove splash dialog code. + + * Makefile.am: remove splash dialog files. + 2001-09-09 Lars Gullik Bjønnes * Makefile.am (libgnome_la_LIBADD): depend on the gui libs. diff --git a/src/frontends/gnome/Dialogs.C b/src/frontends/gnome/Dialogs.C index 79955a58a6..1755022a2d 100644 --- a/src/frontends/gnome/Dialogs.C +++ b/src/frontends/gnome/Dialogs.C @@ -19,7 +19,6 @@ #include "Dialogs.h" #include "gnomeBC.h" -#include "ControlSplash.h" #include "ControlBibitem.h" #include "ControlBibtex.h" #include "ControlCharacter.h" @@ -55,7 +54,6 @@ #include "FormPrint.h" #include "FormRef.h" #include "FormSearch.h" -#include "FormSplash.h" #include "FormTabular.h" #include "FormTabularCreate.h" #include "FormToc.h" @@ -74,8 +72,6 @@ Dialogs::Dialogs(LyXView * lv) add(new GUITabularCreate(*lv, *this)); /* - splash_.reset(new FormSplash(lv, this)); - add(new GUIBibitem(*lv, *this)); add(new GUIBibtex(*lv, *this)); add(new GUICharacter(*lv, *this)); @@ -98,7 +94,6 @@ Dialogs::Dialogs(LyXView * lv) add(new FormPrint(lv, this)); add(new FormRef(lv, this)); add(new FormSearch(lv, this)); - add(new FormSplash(lv, this)); add(new FormTabular(lv, this)); add(new FormTabularCreate(lv, this)); add(new FormToc(lv, this)); @@ -177,10 +172,6 @@ A. To avoid a segfault. code wrapped up like that in the form_copyright.[Ch] which is awkward but will at least allow multiple instances of the same dialog. - Signals will also be a great help in controlling the splashscreen -- - once signalled to hide it can disconnect from the signal and remove - itself from memory. - LyXFuncs will be used for requesting/setting LyX internal info. This will ensure that scripts or LyXServer-connected applications can all have access to the same calls as the internal user-interface. diff --git a/src/frontends/gnome/Makefile.am b/src/frontends/gnome/Makefile.am index e1c28b74b2..28b8dcb78b 100644 --- a/src/frontends/gnome/Makefile.am +++ b/src/frontends/gnome/Makefile.am @@ -53,8 +53,6 @@ libgnome_la_LIBADD = \ # ../xforms/form_print.lo \ # ../xforms/FormRef.lo \ # ../xforms/form_ref.lo \ -# ../xforms/FormSplash.lo \ -# ../xforms/form_splash.lo \ # ../xforms/FormTabular.lo \ # ../xforms/form_tabular.lo \ # ../xforms/FormTabularCreate.lo \ diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index b2b3dab7e3..a94770d8e2 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,12 @@ +2001-09-27 Angus Leeming + + * Dialogs.C: remove splash dialog code. + + * QSplash.[Ch]: + * QSplashDialog.[Ch]: removed. + + * Makefile.dialogs: remove splash dialog files. + 2001-09-18 John Levon * QRef.C: fix compile diff --git a/src/frontends/qt2/Dialogs.C b/src/frontends/qt2/Dialogs.C index 84615efeee..78b10a8298 100644 --- a/src/frontends/qt2/Dialogs.C +++ b/src/frontends/qt2/Dialogs.C @@ -54,7 +54,6 @@ #include "QRef.h" #include "QSearch.h" #include "QSpellchecker.h" -#include "QSplash.h" #include "QTabularCreate.h" #include "QThesaurus.h" #include "QURL.h" @@ -85,7 +84,6 @@ #include "controllers/ControlRef.h" #include "controllers/ControlSearch.h" #include "controllers/ControlSpellchecker.h" -#include "controllers/ControlSplash.h" #include "controllers/ControlTabularCreate.h" #include "controllers/ControlThesaurus.h" #include "controllers/ControlUrl.h" @@ -105,8 +103,6 @@ SigC::Signal0 Dialogs::redrawGUI; Dialogs::Dialogs(LyXView * lv) { - splash_.reset(new QSplash(lv, this)); - // dialogs that have been converted to new scheme add(new GUICitation(*lv, *this)); add(new GUIAboutlyx(*lv, *this)); diff --git a/src/frontends/qt2/Makefile.dialogs b/src/frontends/qt2/Makefile.dialogs index c6e2f1ab1f..8054649092 100644 --- a/src/frontends/qt2/Makefile.dialogs +++ b/src/frontends/qt2/Makefile.dialogs @@ -21,7 +21,6 @@ DIALOGS = \ QRef \ QSearch \ QSpellchecker \ - QSplash \ QTabularCreate \ QThesaurus \ QToc \ @@ -69,8 +68,6 @@ DIALOGSOURCES = \ QSearch.C QSearchDialog.C \ QSpellchecker.h QSpellcheckerDialog.h \ QSpellchecker.C QSpellcheckerDialog.C \ - QSplash.h QSplashDialog.h \ - QSplash.C QSplashDialog.C \ QTabularCreate.h QTabularCreateDialog.h \ QTabularCreate.C QTabularCreateDialog.C \ QThesaurus.h QThesaurusDialog.h \ @@ -103,7 +100,6 @@ MOCDIALOGS = \ QRefDialog_moc.C \ QSearchDialog_moc.C \ QSpellcheckerDialog_moc.C \ - QSplashDialog_moc.C \ QTabularCreateDialog_moc.C \ QThesaurusDialog_moc.C \ QTocDialog_moc.C \ diff --git a/src/frontends/qt2/QSplash.C b/src/frontends/qt2/QSplash.C deleted file mode 100644 index ffc3a6c6a7..0000000000 --- a/src/frontends/qt2/QSplash.C +++ /dev/null @@ -1,50 +0,0 @@ -/** - * \file QSplash.C - * Copyright 2001 the LyX Team - * Read the file COPYING - * - * \author Edwin Leuven - */ - -#include - -#include - -#include "QSplashDialog.h" -#include "QSplash.h" -#include "Dialogs.h" -#include "version.h" -#include "support/filetools.h" -#include "lyxrc.h" - -QSplash::QSplash(LyXView *, Dialogs * d) - : dialog_(0), d_(d) -{ - c_ = d->showSplash.connect(SigC::slot(this, &QSplash::show)); -} - - -QSplash::~QSplash() -{ - c_.disconnect(); - delete dialog_; -} - - -void QSplash::hide() -{ - dialog_->hide(); -} - - -void QSplash::show() -{ - if (!lyxrc.show_banner) - return; - - if (!dialog_) - dialog_ = new QSplashDialog( 0, "LyX"); - - // show banner - dialog_->show(); -} diff --git a/src/frontends/qt2/QSplash.h b/src/frontends/qt2/QSplash.h deleted file mode 100644 index e8976b5103..0000000000 --- a/src/frontends/qt2/QSplash.h +++ /dev/null @@ -1,41 +0,0 @@ -// -*- C++ -*- -/** - * \file QSplash.h - * Copyright 2001 the LyX Team - * Read the file COPYING - * - * \author Edwin Leuven - */ - -#ifndef QSPLASH_H -#define QSPLASH_H - -#include "DialogBase.h" - -class Dialogs; -class LyXView; -class QSplashDialog; - -class QSplash : public DialogBase { - -public: - QSplash(LyXView *, Dialogs *); - - ~QSplash(); - - /// hide the dialog - void hide(); - -private: - /// show the dialog - void show(); - - /// Real GUI implementation. - QSplashDialog * dialog_; - /// our container - Dialogs * d_; - /// the show connection - SigC::Connection c_; -}; - -#endif // QSPLASH_H diff --git a/src/frontends/qt2/QSplashDialog.C b/src/frontends/qt2/QSplashDialog.C deleted file mode 100644 index 07c4e13664..0000000000 --- a/src/frontends/qt2/QSplashDialog.C +++ /dev/null @@ -1,51 +0,0 @@ -/** - * \file QSplashDialog.C - * Copyright 2001 the LyX Team - * Read the file COPYING - * - * \author Edwin Leuven - */ - -#include - -#include -#include -#include -#include - -#include "version.h" -#include "support/filetools.h" -#include "support/lstrings.h" -#include "lyxrc.h" -#include "QSplashDialog.h" - -QSplashDialog::QSplashDialog(QWidget * parent, const char * name, WFlags fl, bool modal) - : QFrame(parent, name, fl, modal) -{ - string const banner_file = LibFileSearch("images", "banner", "xpm"); - if (banner_file.empty()) - return; - - QPixmap const pm(tostr(banner_file).c_str()); - int const w = pm.width(); - int const h = pm.height(); - - setBackgroundPixmap(pm); - setLineWidth(0); - setGeometry(QApplication::desktop()->width()/2 - w/2, - QApplication::desktop()->height()/2 - h/2, - w, h); - - QTimer::singleShot(5*1000, this, SLOT(hide())); -} - - -QSplashDialog::~QSplashDialog() -{ -} - - -void QSplashDialog::mousePressEvent( QMouseEvent * ) -{ - hide(); -} diff --git a/src/frontends/qt2/QSplashDialog.h b/src/frontends/qt2/QSplashDialog.h deleted file mode 100644 index 0820077204..0000000000 --- a/src/frontends/qt2/QSplashDialog.h +++ /dev/null @@ -1,25 +0,0 @@ -/** - * \file QSplashDialog.C - * Copyright 2001 the LyX Team - * Read the file COPYING - * - * \author Edwin Leuven - */ - -#ifndef FORMSPLASHBASE_H -#define FORMSPLASHBASE_H - -class QSplashDialog : public QFrame -{ -public: - QSplashDialog(QWidget * parent, const char * name, - WFlags fl = QWidget::WStyle_NoBorder | QWidget::WStyle_Customize, - bool modal = false); - - ~QSplashDialog(); - -protected: - virtual void mousePressEvent(QMouseEvent *); -}; - -#endif // QSPLASHDIALOG_H diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index a6e9bc7611..d8324423ae 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,16 @@ +2001-09-27 Angus Leeming + + * Dialogs.C: remove splash dialog code. + + * FormSplash.[Ch]: + * form_splash.[Ch]: + * forms/form_splash.fd: removed. + + * Makefile.am: + * forms/makefile: remove splash dialog files. + + * Menubar_pimpl.C (MenuCallback): no longer call Dialogs::destroySplash. + 2001-09-27 Jean-Marc Lasgouttes * forms/form_preferences.fd: fix typo diff --git a/src/frontends/xforms/Dialogs.C b/src/frontends/xforms/Dialogs.C index c3d2260cf3..38cb4a15d3 100644 --- a/src/frontends/xforms/Dialogs.C +++ b/src/frontends/xforms/Dialogs.C @@ -40,7 +40,6 @@ #include "ControlRef.h" #include "ControlSearch.h" #include "ControlSpellchecker.h" -#include "ControlSplash.h" #include "ControlTabularCreate.h" #include "ControlThesaurus.h" #include "ControlToc.h" @@ -69,7 +68,6 @@ #include "form_ref.h" #include "form_search.h" #include "form_spellchecker.h" -#include "form_splash.h" #include "form_tabular_create.h" #include "form_thesaurus.h" #include "form_toc.h" @@ -94,7 +92,6 @@ #include "FormRef.h" #include "FormSearch.h" #include "FormSpellchecker.h" -#include "FormSplash.h" #include "FormTabularCreate.h" #include "FormThesaurus.h" #include "FormToc.h" @@ -113,8 +110,6 @@ SigC::Signal0 Dialogs::redrawGUI; Dialogs::Dialogs(LyXView * lv) { - splash_.reset(new GUISplash(*this)); - add(new GUIAboutlyx(*lv, *this)); add(new GUIBibitem(*lv, *this)); add(new GUIBibtex(*lv, *this)); @@ -219,10 +214,6 @@ A. To avoid a segfault. code wrapped up like that in the form_copyright.[Ch] which is awkward but will at least allow multiple instances of the same dialog. - Signals will also be a great help in controlling the splashscreen -- - once signalled to hide it can disconnect from the signal and remove - itself from memory. - LyXFuncs will be used for requesting/setting LyX internal info. This will ensure that scripts or LyXServer-connected applications can all have access to the same calls as the internal user-interface. diff --git a/src/frontends/xforms/FormSplash.C b/src/frontends/xforms/FormSplash.C deleted file mode 100644 index cdc3928d30..0000000000 --- a/src/frontends/xforms/FormSplash.C +++ /dev/null @@ -1,117 +0,0 @@ -/** - * \file FormSplash.C - * Copyright 2001 the LyX Team - * Read the file COPYING - * - * \author Allan Rae - * \author John Levon - */ - -#include - -#include FORMS_H_LOCATION - -#ifdef __GNUG__ -#pragma implementation -#endif - -#include "ControlSplash.h" -#include "FormSplash.h" -#include "form_splash.h" -#include "form_splash.h" -#include "support/LAssert.h" - -extern "C" { - - static - int C_FormSplashCloseCB(FL_FORM * form, void *) - { - lyx::Assert(form && form->u_vdata); - FormSplash * pre = static_cast(form->u_vdata); - pre->Hide(); - return FL_CANCEL; - } - - void C_FormSplashCB(FL_OBJECT * ob, long) - { - lyx::Assert(ob && ob->form && ob->form->u_vdata); - FormSplash * pre = static_cast(ob->form->u_vdata); - pre->Hide(); - } - -} - - -FormSplash::FormSplash(ControlSplash & c) - : ViewSplash(c) -{} - - -ControlSplash & FormSplash::controller() const -{ - return static_cast(controller_); - //return dynamic_cast(controller_); -} - - -void FormSplash::show() -{ - if (!dialog_.get()) { - build(); - fl_set_form_atclose(dialog_->form, C_FormSplashCloseCB, 0); - } - - int const xpos = WidthOfScreen(ScreenOfDisplay(fl_get_display(), - fl_screen)); - int const ypos = HeightOfScreen(ScreenOfDisplay(fl_get_display(), - fl_screen)); - - fl_set_form_position(dialog_->form, xpos, ypos); - - // Show the title form at most 5 secs - fl_set_timer(dialog_->splash_timer, 5); - - if (dialog_->form->visible) - fl_raise_form(dialog_->form); - else - // Workaround dumb xforms sizing bug - fl_set_form_minsize(dialog_->form, - dialog_->form->w, - dialog_->form->h); - fl_show_form(dialog_->form, FL_PLACE_CENTER, FL_NOBORDER, ""); -} - - -void FormSplash::hide() -{ - if (dialog_->form && dialog_->form->visible) - fl_hide_form(dialog_->form); -} - - -void FormSplash::build() -{ - dialog_.reset(build_splash()); - - fl_set_form_dblbuffer(dialog_->form, 1); // use dbl buffer - fl_addto_form(dialog_->form); - FL_OBJECT * obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 0, 0, 425, 290, ""); - fl_set_pixmapbutton_file(obj, controller().bannerFile().c_str()); - - fl_set_pixmapbutton_focus_outline(obj, 3); - fl_set_button_shortcut(obj, "^M ^[", 1); - fl_set_object_boxtype(obj, FL_NO_BOX); - fl_set_object_callback(obj, C_FormSplashCB, 0); - - obj = fl_add_text(FL_NORMAL_TEXT, 248, 265, 170, 16, - controller().LyXVersion().c_str()); - fl_set_object_lsize(obj, FL_NORMAL_SIZE); -// fl_mapcolor(FL_FREE_COL2, 0x05, 0x2e, 0x4c); - fl_mapcolor(FL_FREE_COL2, 0x2b, 0x47, 0x82); - fl_mapcolor(FL_FREE_COL3, 0xe1, 0xd2, 0x9b); - fl_set_object_color(obj, FL_FREE_COL2, FL_FREE_COL2); - fl_set_object_lcol(obj, FL_FREE_COL3); - fl_set_object_lalign(obj, FL_ALIGN_CENTER|FL_ALIGN_INSIDE); - fl_set_object_lstyle(obj, FL_BOLD_STYLE); - fl_end_form(); -} diff --git a/src/frontends/xforms/FormSplash.h b/src/frontends/xforms/FormSplash.h deleted file mode 100644 index 695cddf799..0000000000 --- a/src/frontends/xforms/FormSplash.h +++ /dev/null @@ -1,50 +0,0 @@ -// -*- C++ -*- -/** - * \file FormSplash.h - * Copyright 2001 the LyX Team - * Read the file COPYING - * - * \author Allan Rae - * \author John Levon - */ - -#ifndef FORMSPLASH_H -#define FORMSPLASH_H - -#include - -#ifdef __GNUG__ -#pragma interface -#endif - -#include "ViewBase.h" - -class ControlSplash; -struct FD_form_splash; - -/** The startup splash screen - */ -class FormSplash : public ViewSplash { -public: - /// - FormSplash(ControlSplash &); - -private: - /// Build the dialog - void build(); - /// hide the dialog - void hide(); - /// show the dialog - void show(); - - /// The parent controller - ControlSplash & controller() const; - - /// Fdesign generated method - FD_form_splash * build_splash(); - - /// Real GUI implementation. - boost::scoped_ptr dialog_; -}; - -#endif // FORMSPLASH_H diff --git a/src/frontends/xforms/Makefile.am b/src/frontends/xforms/Makefile.am index f2890307d8..a682f07ab8 100644 --- a/src/frontends/xforms/Makefile.am +++ b/src/frontends/xforms/Makefile.am @@ -144,10 +144,6 @@ libxforms_la_SOURCES = \ FormSpellchecker.h \ form_spellchecker.C \ form_spellchecker.h \ - FormSplash.C \ - FormSplash.h \ - form_splash.C \ - form_splash.h \ FormTabular.C \ FormTabular.h \ form_tabular.C \ diff --git a/src/frontends/xforms/Menubar_pimpl.C b/src/frontends/xforms/Menubar_pimpl.C index b485691855..2a8463860a 100644 --- a/src/frontends/xforms/Menubar_pimpl.C +++ b/src/frontends/xforms/Menubar_pimpl.C @@ -541,12 +541,6 @@ void Menubar::Pimpl::MenuCallback(FL_OBJECT * ob, long button) LyXView * view = iteminfo->pimpl_->owner_; MenuItem const * item = iteminfo->item_.get(); - /* get the splash out of the way. It would be nicer - * to only have this code at the start, but xforms - * makes it too ugly to do - */ - view->getDialogs()->destroySplash(); - if (button == 1) { // set the pseudo menu-button fl_set_object_boxtype(ob, FL_DOWN_BOX); diff --git a/src/frontends/xforms/form_splash.C b/src/frontends/xforms/form_splash.C deleted file mode 100644 index d2e3418f11..0000000000 --- a/src/frontends/xforms/form_splash.C +++ /dev/null @@ -1,38 +0,0 @@ -// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext -#include -#include "lyx_gui_misc.h" -#include "gettext.h" - -/* Form definition file generated with fdesign. */ - -#include FORMS_H_LOCATION -#include -#include "form_splash.h" -#include "FormSplash.h" - -FD_form_splash::~FD_form_splash() -{ - if ( form->visible ) fl_hide_form( form ); - fl_free_form( form ); -} - - -FD_form_splash * FormSplash::build_splash() -{ - FL_OBJECT *obj; - FD_form_splash *fdui = new FD_form_splash; - - fdui->form = fl_bgn_form(FL_NO_BOX, 420, 290); - fdui->form->u_vdata = this; - obj = fl_add_box(FL_UP_BOX, 0, 0, 420, 290, ""); - fl_set_object_color(obj, FL_BLACK, FL_TOP_BCOL); - fdui->splash_timer = obj = fl_add_timer(FL_HIDDEN_TIMER, 110, 170, 190, 60, ""); - fl_set_object_callback(obj, C_FormSplashCB, 0); - fl_end_form(); - - fdui->form->fdui = fdui; - - return fdui; -} -/*---------------------------------------*/ - diff --git a/src/frontends/xforms/form_splash.h b/src/frontends/xforms/form_splash.h deleted file mode 100644 index af25924e7d..0000000000 --- a/src/frontends/xforms/form_splash.h +++ /dev/null @@ -1,19 +0,0 @@ -// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext -/** Header file generated with fdesign **/ - -#ifndef FD_form_splash_h_ -#define FD_form_splash_h_ - -/** Callbacks, globals and object handlers **/ -extern "C" void C_FormSplashCB(FL_OBJECT *, long); - - -/**** Forms and Objects ****/ -struct FD_form_splash { - ~FD_form_splash(); - - FL_FORM *form; - FL_OBJECT *splash_timer; -}; - -#endif /* FD_form_splash_h_ */ diff --git a/src/frontends/xforms/forms/form_splash.fd b/src/frontends/xforms/forms/form_splash.fd deleted file mode 100644 index b6f02a9378..0000000000 --- a/src/frontends/xforms/forms/form_splash.fd +++ /dev/null @@ -1,52 +0,0 @@ -Magic: 13000 - -Internal Form Definition File - (do not change) - -Number of forms: 1 -Unit of measure: FL_COORD_PIXEL - -=============== FORM =============== -Name: form_splash -Width: 420 -Height: 290 -Number of Objects: 2 - --------------------- -class: FL_BOX -type: UP_BOX -box: 0 0 420 290 -boxtype: FL_UP_BOX -colors: FL_BLACK FL_TOP_BCOL -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_TIMER -type: HIDDEN_TIMER -box: 110 170 190 60 -boxtype: FL_DOWN_BOX -colors: FL_COL1 FL_RED -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: splash_timer -callback: C_FormSplashCB -argument: 0 - -============================== -create_the_forms diff --git a/src/frontends/xforms/forms/makefile b/src/frontends/xforms/forms/makefile index d89aad5cc8..62ad9ba5a1 100644 --- a/src/frontends/xforms/forms/makefile +++ b/src/frontends/xforms/forms/makefile @@ -46,7 +46,6 @@ SRCS = form_aboutlyx.fd \ form_ref.fd \ form_search.fd \ form_spellchecker.fd \ - form_splash.fd \ form_tabular.fd \ form_tabular_create.fd \ form_thesaurus.fd \ -- 2.39.2