// -*- C++ -*-
/* This file is part of
- * ======================================================
+ * ======================================================
*
* LyX, The Document Processor
*
* Copyright 1995 Matthias Ettrich
* Copyright 1995-1999 The LyX Team.
*
- * ======================================================*/
+ * ====================================================== */
#include <config.h>
extern FD_form_figure * fd_form_figure;
extern FD_form_toc * fd_form_toc;
extern FD_form_ref * fd_form_ref;
-#if 0
-extern FD_form_url * fd_form_url;
-#endif
extern FD_form_paragraph_extra * fd_form_paragraph_extra;
extern FD_LaTeXLog * fd_latex_log;
extern FD_form_spell_check * fd_form_spell_check;
extern void HideFiguresPopups();
// Prevents LyX from being killed when the close box is pressed in a popup.
-int CancelCloseBoxCB(FL_FORM *, void *)
+extern "C" int CancelCloseBoxCB(FL_FORM *, void *)
{
return FL_CANCEL;
}
// Prevents LyX from being killed when the close box is pressed in a popup.
-int IgnoreCloseBoxCB(FL_FORM *, void *)
+extern "C" int IgnoreCloseBoxCB(FL_FORM *, void *)
{
return FL_IGNORE;
}
if (fd_form_ref->form_ref->visible) {
fl_hide_form(fd_form_ref->form_ref);
}
-#if 0
- if (fd_form_url->form_url->visible) {
- fl_hide_form(fd_form_url->form_url);
- }
-#endif
if (fd_form_paper->form_paper->visible) {
fl_hide_form(fd_form_paper->form_paper);
}
}
}
if (fd_form_toc->browser_toc->visible) {
- TocUpdateCB(0,0);
+ TocUpdateCB(0, 0);
}
#ifdef ALWAYS_UPDATE_REF
// Ideally, the RefUpdateCB should be modified so that if the
// of course a compromise and an annoyance for users switching
// between separate documents. ARRae 241198
if (fd_form_ref->form_ref->visible) {
- RefUpdateCB(0,0);
+ RefUpdateCB(0, 0);
}
#endif
- if (current_view->currentBuffer()->isReadonly()) {
+ if (current_view->buffer()->isReadonly()) {
// a little crude perhaps but it works. ARRae
if (fd_form_character->form_character->visible) {
fl_hide_form(fd_form_character->form_character);
const char* flyx_shortcut_extract(const char*sc)
{
// Find '|' in the sc and return the string after that.
- register const char *sd = sc;
- while(sd[0]!=0 && sd[0] != '|') sd++;
+ register char const *sd = sc;
+ while(sd[0]!= 0 && sd[0] != '|') sd++;
- if (sd[0]=='|') {
+ if (sd[0] == '|') {
sd++;
//lyxerr << sd << endl;
return sd;
}
// Extract identifier from <ident>|<shortcut> string
-const char* flyx_ident_extract(const char *sc)
+const char* flyx_ident_extract(char const *sc)
{
- register const char *se = sc;
- while(se[0]!=0 && se[0] != '|') se++;
+ register char const *se = sc;
+ while(se[0]!= 0 && se[0] != '|') se++;
- if (se[0]==0) return sc;
+ if (se[0] == 0) return sc;
char * sb = new char[se-sc + 1];
int index = 0;
- register const char *sd = sc;
+ register char const *sd = sc;
while (sd != se) {
sb[index] = sd[0];
index++; sd++;
}
- sb[index]=0;
+ sb[index] = 0;
return sb;
}
// Asks for a text
string askForText(string const & msg, string const & dflt)
{
- string tmp;
+ const char * tmp;
fl_set_resource("flInput.cancel.label", idex(_("Cancel|^[")));
fl_set_resource("flInput.ok.label", idex(_("OK|#O")));
fl_set_resource("flInput.clear.label", idex(_("Clear|#e")));
tmp = fl_show_input(msg.c_str(), dflt.c_str());
- return tmp;
+ if (tmp != 0)
+ return tmp;
+ else
+ return string();
}
// Inform the user that the buffer is read-only, and that changes in the
{
WriteAlert(_("Any changes will be ignored"),
_("The document is read-only:"),
- current_view->currentBuffer()->getFileName());
+ current_view->buffer()->getFileName());
}