]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/Menus.cpp
Move the global formats and system_formats variables into the
[lyx.git] / src / frontends / qt4 / Menus.cpp
index 902eca41149ae66e9ce2a83f96bf8541d9bb8268..faab3390014938d21bb64c7a112df2fcefbfd2c8 100644 (file)
@@ -457,8 +457,8 @@ void MenuDefinition::read(Lexer & lex)
                md_custom,
                md_elements,
                md_endmenu,
-               md_exportformats,
                md_exportformat,
+               md_exportformats,
                md_importformats,
                md_indices,
                md_indicescontext,
@@ -499,8 +499,8 @@ void MenuDefinition::read(Lexer & lex)
                { "elements", md_elements },
                { "end", md_endmenu },
                { "environmentseparators", md_env_separators },
-               { "exportformats", md_exportformats },
                { "exportformat", md_exportformat },
+               { "exportformats", md_exportformats },
                { "floatinsert", md_floatinsert },
                { "floatlistinsert", md_floatlistinsert },
                { "graphicsgroups", md_graphicsgroups },
@@ -990,6 +990,8 @@ void MenuDefinition::expandDocuments()
                QString label = toqstr(b.fileName().displayName(20));
                if (!b.isClean())
                        label += "*";
+               if (b.notifiesExternalModification())
+                       label += QChar(0x26a0);
                if (i < 10)
                        label = QString::number(i) + ". " + label + '|' + QString::number(i);
                add(MenuItem(MenuItem::Command, label,
@@ -1007,6 +1009,8 @@ void MenuDefinition::expandDocuments()
                        QString label = toqstr(b->fileName().displayName(20));
                        if (!b->isClean())
                                label += "*";
+                       if (b->notifiesExternalModification())
+                               label += QChar(0x26a0);
                        if (i < 10)
                                label = QString::number(i) + ". " + label + '|' + QString::number(i);
                        item.submenu().add(MenuItem(MenuItem::Command, label,
@@ -1217,7 +1221,7 @@ void MenuDefinition::expandFlexInsert(
                }
        }
        // FIXME This is a little clunky.
-       if (items_.empty() && type == InsetLayout::CUSTOM && !buf->isReadonly())
+       if (items_.empty() && type == InsetLayout::CUSTOM && !buf->hasReadonlyFlag())
                add(MenuItem(MenuItem::Help, qt_("No Custom Insets Defined!")));
 }
 
@@ -1408,7 +1412,7 @@ void MenuDefinition::expandToolbars()
 
 void MenuDefinition::expandBranches(Buffer const * buf)
 {
-       if (!buf || buf->isReadonly())
+       if (!buf || buf->hasReadonlyFlag())
                return;
 
        BufferParams const & master_params = buf->masterBuffer()->params();
@@ -2188,7 +2192,7 @@ void Menus::Impl::expand(MenuDefinition const & frommenu,
                        if (!buf)
                                break;
                        string const format = buf->params().getDefaultOutputFormat();
-                       Format const * f = formats.getFormat(format);
+                       Format const * f = theFormats().getFormat(format);
                        docstring const name = f ? f->prettyname() : from_utf8(format);
                        docstring const label = bformat(_("Export [%1$s]|E"), name);
                        MenuItem item(MenuItem::Command, toqstr(label),