]> git.lyx.org Git - features.git/commitdiff
Added hourglass cursor while searching.
authorTommaso Cucinotta <tommaso@lyx.org>
Sun, 10 Jan 2010 23:54:45 +0000 (23:54 +0000)
committerTommaso Cucinotta <tommaso@lyx.org>
Sun, 10 Jan 2010 23:54:45 +0000 (23:54 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32958 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/FindAndReplace.cpp

index dc409ba2cb312e860e5a64c7dc4f4b7e5fa15463..68b3387e9793744a1206560a89919a91d33c6b5c 100644 (file)
@@ -258,8 +258,11 @@ static bool next_prev_buffer(Buffer * & buf, FindAndReplaceOptions const & opt)
                        --it;
                }
                FileName const & fname = FileName(*it);
-               if (!theBufferList().exists(fname))
+               if (!theBufferList().exists(fname)) {
+                       guiApp->currentView()->setBusy(false);
                        guiApp->currentView()->loadDocument(fname, false);
+                       guiApp->currentView()->setBusy(true);
+               }
                buf = theBufferList().getBuffer(fname);
                break;
        }
@@ -310,8 +313,11 @@ void FindAndReplaceWidget::findAndReplaceScope(FindAndReplaceOptions & opt) {
                vector<string> const & v = allManualsFiles();
                if (std::find(v.begin(), v.end(), buf->absFileName()) == v.end()) {
                        FileName const & fname = FileName(*v.begin());
-                       if (!theBufferList().exists(fname))
+                       if (!theBufferList().exists(fname)) {
+                               guiApp->currentView()->setBusy(false);
                                guiApp->currentView()->loadDocument(fname, false);
+                               guiApp->currentView()->setBusy(true);
+                       }
                        buf = theBufferList().getBuffer(fname);
                        lyx::dispatch(FuncRequest(LFUN_BUFFER_SWITCH,
                                                  buf->absFileName()));
@@ -423,7 +429,9 @@ void FindAndReplaceWidget::findAndReplace(
               << ", scope=" << scope);
        FindAndReplaceOptions opt(searchString, casesensitive, matchword, ! backwards,
                expandmacros, ignoreformat, regexp, replaceString, keep_case, scope);
+       view_.setBusy(true);
        findAndReplaceScope(opt);
+       view_.setBusy(false);
 }