Stephan Witt wrote:
> >> If the principle way is ok I can do the same for the RCS and SVN backend 
> >> too.
> >> 
> >> One question regarding the "View log" button of repoUpdate: 
> >> here on Mac the dialog to display the log is unusable. 
> >> It is blocked by the next confirmation dialog. 
> >> Is this platform specific or on all platforms?
> > 
> > no, this glitch is on all platforms (iirc resize did work, but the button 
> > was
> > silent).
> 
> On Mac it's blocked completely.
> 
> > i carry the idea of trying to show that dialog as nonmodal. it maybe
> > oneliner somewhere, but i never really get to solve it...
> 
> Ok.

i tried hopeless experiment to set the log window modal for this usecases
but it does not work. dispatch returns from show-dialog lfun and does not
wait for completion and i guess it would need deeper surgery or completely
new dialog to arrange this.

maybe there is another way how to trigger the dialog which would wait,
but my curiousity is exhausted now ;)

pavel
diff --git a/src/VCBackend.cpp b/src/VCBackend.cpp
index 15b6033..9a6ff9d 100644
--- a/src/VCBackend.cpp
+++ b/src/VCBackend.cpp
@@ -824,7 +824,7 @@ string SVN::repoUpdate()
                int ret = frontend::Alert::prompt(_("Changes detected"),
                                text, 0, 1, _("&Yes"), _("&No"), _("View &Log 
..."));
                if (ret == 2 ) {
-                       dispatch(FuncRequest(LFUN_DIALOG_SHOW, "file " + 
tmpf.absFileName()));
+                       dispatch(FuncRequest(LFUN_DIALOG_SHOW, "vclogmodal " + 
tmpf.absFileName()));
                        ret = frontend::Alert::prompt(_("Changes detected"),
                                text, 0, 1, _("&Yes"), _("&No"));
                        hideDialogs("file", 0);
diff --git a/src/frontends/qt4/GuiLog.cpp b/src/frontends/qt4/GuiLog.cpp
index e5a8a96..d3c99a9 100644
--- a/src/frontends/qt4/GuiLog.cpp
+++ b/src/frontends/qt4/GuiLog.cpp
@@ -218,6 +218,7 @@ bool GuiLog::initialiseParams(string const & data)
 
        logTypeCO->setEnabled(logtype == "latex");
        logTypeCO->clear();
+       setModal(false);
        
        FileName log(logfile);
        
@@ -238,9 +239,11 @@ bool GuiLog::initialiseParams(string const & data)
        } else if (logtype == "lyx2lyx") {
                type_ = Lyx2lyxLog;
                logTypeCO->addItem(qt_("LyX2LyX"), toqstr(logtype));
-       } else if (logtype == "vc") {
+       } else if (logtype == "vc" || logtype == "vcn") {
                type_ = VCLog;
                logTypeCO->addItem(qt_("Version Control"), toqstr(logtype));
+               if (logtype == "vcn" )
+                       setModal(true);
        } else
                return false;
 
diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp
index e24ec97..8ed0770 100644
--- a/src/frontends/qt4/GuiView.cpp
+++ b/src/frontends/qt4/GuiView.cpp
@@ -1575,7 +1575,7 @@ bool GuiView::getStatus(FuncRequest const & cmd, 
FuncStatus & flag)
                        enable = 
FileName(doc_buffer->logName()).isReadableFile();
                else if (name == "spellchecker")
                        enable = theSpellChecker() && !doc_buffer->isReadonly();
-               else if (name == "vclog")
+               else if (prefixIs(name, "vclog"))
                        enable = doc_buffer->lyxvc().inUse();
                break;
        }
@@ -3191,7 +3191,10 @@ void GuiView::dispatch(FuncRequest const & cmd, 
DispatchResult & dr)
                                }
                                data += Lexer::quoteString(logfile);
                                showDialog("log", data);
-                       } else if (name == "vclog") {
+                       } else if (prefixIs(name, "vclog")) {
+                               string type = "vc";
+                               if (name == "vclogmodal")
+                                       type = "vcn";
                                string const data = "vc " +
                                        
Lexer::quoteString(doc_buffer->lyxvc().getLogFile());
                                showDialog("log", data);

Reply via email to