string const & msg2,
string const & msg3)
{
- if (lyxrc.use_gui
+ if (lyx_gui::use_gui
&& buf && buf->getUser() && buf->getUser()->owner()) {
string const str = msg1 + ' ' + msg2 + ' ' + msg3;
buf->getUser()->owner()->message(str);
text += file + _(" could not be saved.\n\nDo you want to rename the document and try again?");
#endif
int const ret = Alert::prompt(_("Rename and save?"),
- text, 0, _("&Rename"), _("&Cancel"));
+ text, 0, 1, _("&Rename"), _("&Cancel"));
if (ret == 0)
return WriteAs(bv, buffer);
text += file + _(" already exists.\n\nDo you want to over-write that document?");
#endif
int const ret = Alert::prompt(_("Over-write document?"),
- text, 1, _("&Over-write"), _("&Cancel"));
+ text, 0, 1, _("&Over-write"), _("&Cancel"));
if (ret == 1)
return false;
{
lyxerr[Debug::INFO] << "Running QuitLyX." << endl;
- if (lyxrc.use_gui) {
+ if (lyx_gui::use_gui) {
if (!bufferlist.quitWriteAll())
return;
if (tmpstr.empty())
return;
- // insert the string
- bv->hideCursor();
-
// clear the selection
bool flag = (bv->text == bv->getLyXText());
if (flag)
string const getPossibleLabel(BufferView const & bv)
{
- Paragraph * par = bv.getLyXText()->cursor.par();
+ Paragraph * par = &*bv.getLyXText()->cursor.par();
LyXLayout_ptr layout = par->layout();
if (layout->latextype == LATEX_PARAGRAPH && par->previous()) {
Paragraph * par2 = par->previous();