]> git.lyx.org Git - features.git/commitdiff
remove redundant declarations of WorkAreai and other small things.
authorAngus Leeming <leeming@lyx.org>
Thu, 7 Mar 2002 15:45:52 +0000 (15:45 +0000)
committerAngus Leeming <leeming@lyx.org>
Thu, 7 Mar 2002 15:45:52 +0000 (15:45 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3692 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/ColorHandler.h
src/LyXSendto.C [deleted file]
src/LyXView.C
src/lyx_gui.C
src/lyxfunc.C

index 83dafbe1fc3b1780acc742fdbb313864ca1454d9..321ef7ff1e285c1780d875ad9c3b0680c65386ec 100644 (file)
@@ -1,3 +1,11 @@
+2002-03-07  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * LyXSendto.C: remove.
+       * LyXView.C (c-tor): clean-up Jürgen's #if 0 correctly.
+       * lyx_gui.C: remove now-redundant comment.
+       * ColorHandler.h: remove forward declaration of class WorkArea.
+       * lyxfunc.C: remove #include "WorkArea.h".
+
 2002-03-07  Juergen Vigna  <jug@sad.it>
 
        * undo_funcs.C (textHandleUndo): fix problems when the paragraph
index b5864e0f6e2b39ed580047b0f0d821f2bb47e4d2..6a74288f4f8a44ee979589741cec65dcd05a1185 100644 (file)
@@ -23,7 +23,6 @@
 #include "PainterBase.h"
 
 class LyXFont;
-class WorkArea;
 
 /**
  * This is a factory class that can produce GCs with a specific
diff --git a/src/LyXSendto.C b/src/LyXSendto.C
deleted file mode 100644 (file)
index 5b3d121..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-#include <config.h>
-
-#include FORMS_H_LOCATION
-#include "print_form.h"
-#include "lyx_main.h"
-#include "lyxrc.h"
-#include "LString.h"
-#include "buffer.h"
-#include "gettext.h"
-#include "bufferview_funcs.h"
-#include "exporter.h"
-#include "BufferView.h"
-
-#include "support/filetools.h"
-#include "support/lstrings.h"
-#include "support/path.h"
-#include "support/systemcall.h"
-
-extern FD_form_sendto * fd_form_sendto;
-extern BufferView * current_view;
-extern int MakeLaTeXOutput(Buffer * buffer);
-extern bool CreatePostscript(Buffer * buffer, bool wait);
-
-// Whereas this feature is under the menu item File->Export->Custom,
-// I kept the old name sendto in the code because I am lazy (JMarc)
-
-void MenuSendto()
-{
-    static int ow = -1;
-    static int oh;
-
-    // do this only if the command is empty
-    if (!fl_get_input(fd_form_sendto->input_cmd) &&
-        !lyxrc.custom_export_command.empty())
-        fl_set_input(fd_form_sendto->input_cmd,
-                     lyxrc.custom_export_command.c_str());
-    if (fd_form_sendto->form_sendto->visible) {
-        fl_raise_form(fd_form_sendto->form_sendto);
-    } else {  
-        fl_show_form(fd_form_sendto->form_sendto,
-                    FL_PLACE_MOUSE | FL_FREE_SIZE, FL_TRANSIENT,
-                     _("Send Document to Command"));
-       if (ow < 0) {
-               ow = fd_form_sendto->form_sendto->w;
-               oh = fd_form_sendto->form_sendto->h;
-       }
-       fl_set_form_minsize(fd_form_sendto->form_sendto, ow, oh);
-    }
-}
-
-
-void SendtoApplyCB(FL_OBJECT *, long)
-{
-    if (!current_view->available())
-        return;
-
-    string command = fl_get_input(fd_form_sendto->input_cmd);
-    if (command.empty())
-        return;
-    Buffer * buffer = current_view->buffer();
-    string ftypeext;
-    if (fl_get_button(fd_form_sendto->radio_ftype_lyx))
-        ftypeext = ".lyx";
-    else if (fl_get_button(fd_form_sendto->radio_ftype_latex))
-        ftypeext = ".tex";
-    else if (fl_get_button(fd_form_sendto->radio_ftype_dvi))
-        ftypeext = ".dvi";
-    else if (fl_get_button(fd_form_sendto->radio_ftype_ascii))
-        ftypeext = ".txt";
-    else {
-       ftypeext = ".ps";
-       if (!Exporter::Export(buffer, "ps", true))
-               return;
-    }
-
-    string const fname = OnlyFilename(ChangeExtension(buffer->getLatexName(),
-                                                     ftypeext));
-    if (!contains(command, "$$FName"))
-        command = "( " + command + " ) <$$FName";
-    command = subst(command, "$$FName", fname);
-    command += " &"; // execute in background
-    // push directorypath, if necessary 
-    string path = buffer->filePath();
-    if (lyxrc.use_tempdir || !IsDirWriteable(path)) {
-        path = buffer->tmppath;
-    }
-    Path p(path);
-    // save the .lyx file in tmp_dir if this filetype is requested
-    if (fl_get_button(fd_form_sendto->radio_ftype_lyx))
-        buffer->writeFile(fname, true);
-    // if the .tex file is requested save it to the tempdir
-    // as now we don't do the MakeLaTeXOutput anymore
-    if (fl_get_button(fd_form_sendto->radio_ftype_latex))
-        buffer->makeLaTeXFile(fname, path, false);
-    // create the .txt file in tmp_dir if this filetype is requested
-    if (fl_get_button(fd_form_sendto->radio_ftype_ascii))
-        buffer->writeFileAscii(fname, lyxrc.ascii_linelen);
-    Systemcall one;
-    one.startscript(Systemcall::Wait, command);    
-}
-
-
-void SendtoCancelCB(FL_OBJECT *, long)
-{
-    fl_hide_form(fd_form_sendto->form_sendto);
-}
-
-
-void SendtoOKCB(FL_OBJECT * ob, long data)
-{
-    SendtoCancelCB(ob, data);
-    SendtoApplyCB(ob, data);
-}
index fae0afcce3d483874df4ce731144a2e3cf8f60f5..34b2d47850703cfb75a9f15f63329c43e6a7ef7b 100644 (file)
@@ -58,12 +58,7 @@ LyXView::LyXView()
        autosave_timeout = new Timeout(5000);
 
        dialogs_ = new Dialogs(this);
-#if 0
-       dialogs_->hideBufferDependent
-               .connect(SigC::slot(&CloseAllBufferRelatedDialogs));
        Dialogs::redrawGUI.connect(SigC::slot(this, &LyXView::redraw));
-       Dialogs::redrawGUI.connect(SigC::slot(&RedrawAllBufferRelatedDialogs));
-#endif
 }
 
 
index 3b54898c89321db2ac981418bd93e05588fce40c..4515c4bbc66c35cb6ab6f1545ae4da33e0f8eb1a 100644 (file)
@@ -264,10 +264,6 @@ void LyXGUI::create_forms()
 
        // From here down should be done by somebody else. (Lgb)
 
-       //
-       // Create forms
-       //
-
        // This is probably as good a time as any to map the xform colours,
        // should a mapping exist.
        string const filename = AddName(user_lyxdir, "preferences.xform");
index 7b1e22ce73925499c2ddf0e37bdf20cd924054e9..25b90bc5fd0ef1713f7d74211714e3ed1110f93c 100644 (file)
@@ -33,7 +33,6 @@
 #include "Lsstream.h"
 #include "trans_mgr.h"
 #include "layout.h"
-#include "WorkArea.h"
 #include "bufferview_funcs.h"
 #include "minibuffer.h"
 #include "vspace.h"
@@ -113,7 +112,6 @@ using std::back_inserter;
 extern BufferList bufferlist;
 extern LyXServer * lyxserver;
 extern bool selection_possible;
-extern void MenuSendto();
 
 extern boost::scoped_ptr<kb_keymap> toplevel_keymap;
 
@@ -1118,7 +1116,7 @@ string const LyXFunc::dispatch(kb_action action, string argument)
 
        case LFUN_EXPORT:
                if (argument == "custom")
-                       owner->getDialogs()->showSendto();//MenuSendto();
+                       owner->getDialogs()->showSendto();
                else
                        Exporter::Export(owner->buffer(), argument, false);
                break;