]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfr0.C
removed a warning from screen and added CFLAGS in lyx.spec.in.
[lyx.git] / src / lyxfr0.C
index 4b995593355ebc94a200e1616e04769a5ebad705..27e85b893b4af5973a6a58b77782b78efbad533b 100644 (file)
@@ -1,18 +1,18 @@
 /* This file is part of
-* ======================================================
-* 
-*           LyX, The Document Processor
-*       
-*          Copyright (C) 1995 Matthias Ettrich,
-*           Copyright (C) 1995-1998 The LyX Team.
-*
-*======================================================*/
+ * ======================================================
+ 
+ *           LyX, The Document Processor
+ *      
+ *         Copyright 1995 Matthias Ettrich,
+ *          Copyright 1995-1999 The LyX Team.
+ *
+ * ======================================================*/
 
 #include <config.h>
 
-#include <ctype.h>
-#include <string.h>
-#include <stdlib.h>
+#include <cctype>
+#include <cstring>
+#include <cstdlib>
 
 #ifdef __GNUG__
 #pragma implementation
@@ -26,7 +26,7 @@
 #include "lyxfr1.h"
 #include "lyxfunc.h"
 #include "lyxscreen.h"
-#include "error.h"
+#include "debug.h"
 #include "lyxtext.h"
 #include "gettext.h"
 #include "LyXView.h" // only because of form_main
@@ -85,6 +85,8 @@ LyXFindReplace0::LyXFindReplace0()
 
 void LyXFindReplace0::StartSearch()
 {
+       static int ow = -1, oh;
+
        FD_form_search *fd_fs = fd_form_search;
 
        if (fd_fs->form_search->visible) {
@@ -93,6 +95,11 @@ void LyXFindReplace0::StartSearch()
                fl_show_form(fd_fs->form_search,
                             FL_PLACE_MOUSE | FL_FREE_SIZE, FL_FULLBORDER,
                             _("Find & Replace"));      // RVDK_PATCH_5
+               if (ow < 0) {
+                       ow = fd_form_search->form_search->w;
+                       oh = fd_form_search->form_search->h;
+               }
+               fl_set_form_minsize(fd_form_search->form_search, ow, oh);
        }
        ReInitFromForm();
 }
@@ -109,9 +116,9 @@ void LyXFindReplace0::ReInitFromForm()
 
 
 // Returns the value of the replace string in the form
-LString const LyXFindReplace0::ReplaceString()
+string const LyXFindReplace0::ReplaceString()
 {
-       return LString(fl_get_input(fd_form_search->input_replace));
+       return string(fl_get_input(fd_form_search->input_replace));
 }
 
 
@@ -143,7 +150,7 @@ void LyXFindReplace0::SetReplaceEnabled(bool fEnable)
 }
 
 
-void LyXFindReplace0::SetSearchString(LString const &ls)
+void LyXFindReplace0::SetSearchString(string const &ls)
 {
        lsSearch = ls;
        fl_set_input(fd_form_search->input_search, ls.c_str());