diff options
Diffstat (limited to 'app-office/lyx/files/2.3.patches')
-rw-r--r-- | app-office/lyx/files/2.3.patches | 161 |
1 files changed, 161 insertions, 0 deletions
diff --git a/app-office/lyx/files/2.3.patches b/app-office/lyx/files/2.3.patches new file mode 100644 index 0000000..26beade --- /dev/null +++ b/app-office/lyx/files/2.3.patches @@ -0,0 +1,161 @@ +diff --git a/src/Format.cpp b/src/Format.cpp +index 050af14..7d495b7 100644 +--- a/src/Format.cpp ++++ b/src/Format.cpp +@@ -260,6 +260,27 @@ void Formats::setEditor(string const & name, string const & command) + } + + ++bool Formats::viewURL(docstring const & url) { ++ Format const * format = getFormat("html"); ++ if (!format) ++ return false; ++ ++ string command = libScriptSearch(format->viewer()); ++ ++ if (!contains(command, token_from_format)) ++ command += ' ' + token_from_format; ++ command = subst(command, token_from_format, quoteName(to_utf8(url))); ++ ++ LYXERR(Debug::FILES, "Executing command: " << command); ++ ++ Systemcall one; ++ one.startscript(Systemcall::DontWait, command); ++ ++ // we can't report any sort of error, since we aren't waiting ++ return true; ++} ++ ++ + bool Formats::view(Buffer const & buffer, FileName const & filename, + string const & format_name) const + { +diff --git a/src/Format.h b/src/Format.h +index 445c11b..3737f4c 100644 +--- a/src/Format.h ++++ b/src/Format.h +@@ -143,6 +143,8 @@ public: + void setViewer(std::string const & name, std::string const & command); + /// + void setEditor(std::string const & name, std::string const & command); ++ /// Currently used by hyperlink insets and GuiCitation ++ bool viewURL(docstring const & url); + /// View the given file. Buffer used for DVI's paper orientation. + bool view(Buffer const & buffer, support::FileName const & filename, + std::string const & format_name) const; +diff --git a/src/insets/InsetHyperlink.cpp b/src/insets/InsetHyperlink.cpp +index 42dd691..7a293ff 100644 +--- a/src/insets/InsetHyperlink.cpp ++++ b/src/insets/InsetHyperlink.cpp +@@ -100,7 +100,10 @@ bool InsetHyperlink::getStatus(Cursor & cur, FuncRequest const & cmd, + + void InsetHyperlink::viewTarget() const + { +- if (getParam("type") == "file:") { ++ if (getParam("type").empty()) ++ formats.viewURL(getParam("target")); ++ ++ else if (getParam("type") == "file:") { + FileName url = makeAbsPath(to_utf8(getParam("target")), buffer().filePath()); + string const format = formats.getFormatFromFile(url); + formats.view(buffer(), url, format); +diff --git a/lib/ui/stdcontext.inc b/lib/ui/stdcontext.inc +index a8cf62e..8086b7f 100644 +--- a/lib/ui/stdcontext.inc ++++ b/lib/ui/stdcontext.inc +@@ -601,6 +601,8 @@ Menuset + # + Menu "context-hyperlink" + Item "Settings...|S" "inset-settings" ++ Separator ++ Item "Open Target...|O" "inset-edit" + End + + End +Index: stdinsets.inc +=================================================================== +--- a/lib/layouts/stdinsets.inc (revision 28602) ++++ a/lib/layouts/stdinsets.inc (working copy) +@@ -166,7 +166,7 @@ + Family typewriter + EndFont + LabelFont +- Color foreground ++ Color latex + Size Small + EndFont + BgColor listingsbg +Index: lib/ui/stdtoolbars.inc +=================================================================== +--- a/lib/ui/stdtoolbars.inc (revision 29259) ++++ b/lib/ui/stdtoolbars.inc (working copy) +@@ -91,6 +91,8 @@ + Item "Increase depth" "depth-increment" + Item "Decrease depth" "depth-decrement" + Separator ++ Item "Align center" "paragraph-params \align center" ++ Separator + Item "Insert figure float" "float-insert figure" + Item "Insert table float" "float-insert table" + Item "Insert label" "label-insert" +diff --git a/src/frontends/qt4/GuiCompleter.cpp b/src/frontends/qt4/GuiCompleter.cpp +index 89a889d..ac5088f 100644 +--- a/src/frontends/qt4/GuiCompleter.cpp ++++ b/src/frontends/qt4/GuiCompleter.cpp +@@ -165,7 +165,7 @@ GuiCompleter::GuiCompleter(GuiWorkArea * gui, QObject * parent) + model_ = new GuiCompletionModel(this, 0); + setModel(model_); + setCompletionMode(QCompleter::PopupCompletion); +- setCaseSensitivity(Qt::CaseSensitive); ++ setCaseSensitivity(Qt::CaseInsensitive); + setWidget(gui_); + + // create the popup +diff --git a/lib/ui/default.ui b/lib/ui/default.ui +index 4a1e154aab..94964d6a53 100644 +--- a/lib/ui/default.ui ++++ b/lib/ui/default.ui +@@ -48,15 +48,15 @@ Include "stdtoolbars.inc" + # + Toolbars + "standard" "on,top" +- "view/update" "on,top" ++ "view/update" "off,top" + "extra" "on,top,samerow" + "review" "auto,review,top" +- "vcs" "off,top" ++ "vcs" "on,top" + "table" "auto,table,bottom" + "math_panels" "auto,math,bottom" + "math" "auto,math,bottom" + "mathmacrotemplate" "auto,mathmacrotemplate,bottom" + "ipa" "auto,ipa,bottom" +- "minibuffer" "auto,minibuffer,bottom" ++ "minibuffer" "on,bottom" + "documentation" "off,top" + End +diff --git a/lib/ui/stdmenus.inc b/lib/ui/stdmenus.inc +index 37c1067c98..fc09c121b2 100644 +--- a/lib/ui/stdmenus.inc ++++ b/lib/ui/stdmenus.inc +@@ -414,6 +414,7 @@ Menuset + Item "Visible Space|V" "space-insert visible" + Item "Menu Separator|M" "specialchar-insert menu-separator" + Item "Phonetic Symbols|P" "ipa-insert" ++ Item "Visible Space|V" "unicode-insert 0x2423" + Submenu "Logos|L" "insert_logos" + End + +diff --git a/src/frontends/qt4/GuiApplication.cpp b/src/frontends/qt4/GuiApplication.cpp +index 323e654a41..fc339e44d2 100644 +--- a/src/frontends/qt4/GuiApplication.cpp ++++ b/src/frontends/qt4/GuiApplication.cpp +@@ -1022,7 +1022,7 @@ GuiApplication::GuiApplication(int & argc, char ** argv) + QString app_name = "LyX"; + QCoreApplication::setOrganizationName(app_name); + QCoreApplication::setOrganizationDomain("lyx.org"); +- QCoreApplication::setApplicationName(lyx_package); ++ QCoreApplication::setApplicationName("LyX"); + #if QT_VERSION >= 0x050000 + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); + #endif |