]> git.lyx.org Git - lyx.git/blobdiff - src/text3.C
Minimal fix needed to give Qt a label dialog again.
[lyx.git] / src / text3.C
index 5dacb94186039d614e0cf6f8c0f7bc7546a25b63..d7d588311745e93c0af9c17716cae87facd5355f 100644 (file)
@@ -31,7 +31,6 @@
 #include "frontends/Dialogs.h"
 #include "insets/insetspecialchar.h"
 #include "insets/insettext.h"
-#include "insets/insetbib.h"
 #include "insets/insetquotes.h"
 #include "insets/insetcommand.h"
 #include "undo_funcs.h"
@@ -375,12 +374,13 @@ void specialChar(LyXText * lt, BufferView * bv, InsetSpecialChar::Kind kind)
                bv->updateInset(new_inset, true);
 }
 
+
 void doInsertInset(LyXText * lt, FuncRequest const & cmd,
                   bool edit, bool pastesel)
 {
        Inset * inset = createInset(cmd);
        BufferView * bv = cmd.view();
-       
+
        if (inset) {
                bool gotsel = false;
                if (lt->selection.set()) {
@@ -396,7 +396,6 @@ void doInsertInset(LyXText * lt, FuncRequest const & cmd,
                else
                        delete inset;
        }
-
 }
 
 }
@@ -996,7 +995,7 @@ Inset::RESULT LyXText::dispatch(FuncRequest const & cmd)
 
        case LFUN_UPCASE_WORD:
                update(bv, false);
-               changeCase(bv, LyXText::text_uppercase);
+               changeCase(*bv, LyXText::text_uppercase);
                if (inset_owner)
                        bv->updateInset(inset_owner, true);
                update(bv);
@@ -1004,7 +1003,7 @@ Inset::RESULT LyXText::dispatch(FuncRequest const & cmd)
 
        case LFUN_LOWCASE_WORD:
                update(bv, false);
-               changeCase(bv, LyXText::text_lowercase);
+               changeCase(*bv, LyXText::text_lowercase);
                if (inset_owner)
                        bv->updateInset(inset_owner, true);
                update(bv);
@@ -1012,7 +1011,7 @@ Inset::RESULT LyXText::dispatch(FuncRequest const & cmd)
 
        case LFUN_CAPITALIZE_WORD:
                update(bv, false);
-               changeCase(bv, LyXText::text_capitalization);
+               changeCase(*bv, LyXText::text_capitalization);
                if (inset_owner)
                        bv->updateInset(inset_owner, true);
                update(bv);
@@ -1055,7 +1054,7 @@ Inset::RESULT LyXText::dispatch(FuncRequest const & cmd)
 
        case LFUN_BEGINNINGBUFSEL:
                if (inset_owner)
-                       return Inset::UNDISPATCHED;
+                       return UNDISPATCHED;
                update(bv, false);
                cursorTop(bv);
                finishChange(bv, true);
@@ -1063,7 +1062,7 @@ Inset::RESULT LyXText::dispatch(FuncRequest const & cmd)
 
        case LFUN_ENDBUFSEL:
                if (inset_owner)
-                       return Inset::UNDISPATCHED;
+                       return UNDISPATCHED;
                update(bv, false);
                cursorBottom(bv);
                finishChange(bv, true);
@@ -1593,13 +1592,15 @@ Inset::RESULT LyXText::dispatch(FuncRequest const & cmd)
 
        case LFUN_HTMLURL: {
                InsetCommandParams p("htmlurl");
-               bv->owner()->getDialogs().createUrl(p.getAsString());
+               string const data = InsetCommandMailer::params2string("url", p);
+               bv->owner()->getDialogs().show("url", data, 0);
                break;
        }
 
        case LFUN_URL: {
                InsetCommandParams p("url");
-               bv->owner()->getDialogs().createUrl(p.getAsString());
+               string const data = InsetCommandMailer::params2string("url", p);
+               bv->owner()->getDialogs().show("url", data, 0);
                break;
        }
 
@@ -1610,7 +1611,7 @@ Inset::RESULT LyXText::dispatch(FuncRequest const & cmd)
        case LFUN_INSET_CAPTION:
 #endif
        case LFUN_INSERT_NOTE:
-       case LFUN_INSERT_BIBKEY:
+       case LFUN_INSERT_BIBITEM:
        case LFUN_INSET_ERT:
        case LFUN_INSET_FLOAT:
        case LFUN_INSET_FOOTNOTE:
@@ -1640,8 +1641,8 @@ Inset::RESULT LyXText::dispatch(FuncRequest const & cmd)
                break;
 
        default:
-               return Inset::UNDISPATCHED;
+               return UNDISPATCHED;
        }
 
-       return Inset::DISPATCHED;
+       return DISPATCHED;
 }