The branch, xhtml/new_features/assets-separate-directory, has been updated.
- Log ----------------------------------------------------------------- commit 2da2ca22bc5b1035c436bc556361745c31571ec1 Author: Josh Hieronymus <[email protected]> Date: Mon Jul 29 07:45:37 2013 -0400 Remove unnecessary checkboxes from XHTML Output Options diff --git a/src/frontends/qt4/ui/OutputUi.ui b/src/frontends/qt4/ui/OutputUi.ui index d00f0b6..44a9d36 100644 --- a/src/frontends/qt4/ui/OutputUi.ui +++ b/src/frontends/qt4/ui/OutputUi.ui @@ -2,6 +2,14 @@ <ui version="4.0"> <class>OutputUi</class> <widget class="QWidget" name="OutputUi"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>549</width> + <height>450</height> + </rect> + </property> <property name="windowTitle"> <string>Form</string> </property> @@ -121,47 +129,23 @@ <bool>true</bool> </property> <layout class="QGridLayout" name="outGridLayout"> - <item row="5" column="1"> - <widget class="QComboBox" name="mathoutCB"> + <item row="4" column="0"> + <widget class="QLabel" name="mathoutLA"> <property name="font"> <font> <weight>50</weight> <bold>false</bold> </font> </property> - <property name="toolTip"> - <string>Format to use for math output.</string> - </property> - <item> - <property name="text"> - <string>MathML</string> - </property> - </item> - <item> - <property name="text"> - <string>HTML</string> - </property> - </item> - <item> - <property name="text"> - <string>Images</string> - </property> - </item> - <item> - <property name="text"> - <string>LaTeX</string> - </property> - </item> - </widget> - </item> - <item row="2" column="1"> - <widget class="QCheckBox" name="css_in_separate_directoryCB"> <property name="text"> - <string>Write CSS to Separate Directory</string> + <string>&Math output:</string> + </property> + <property name="buddy"> + <cstring>mathoutCB</cstring> </property> </widget> </item> - <item row="6" column="0"> + <item row="5" column="0"> <widget class="QLabel" name="mathimgLA"> <property name="font"> <font> @@ -177,24 +161,7 @@ </property> </widget> </item> - <item row="0" column="1"> - <widget class="QCheckBox" name="cssCBbak"> - <property name="text"> - <string>Write CSS to File</string> - </property> - </widget> - </item> - <item row="0" column="0"> - <widget class="QCheckBox" name="strictCB"> - <property name="toolTip"> - <string>Whether to comply strictly with XHTML 1.1.</string> - </property> - <property name="text"> - <string>&Strict XHTML 1.1</string> - </property> - </widget> - </item> - <item row="6" column="1"> + <item row="5" column="1"> <widget class="QDoubleSpinBox" name="mathimgSB"> <property name="font"> <font> @@ -219,23 +186,50 @@ </property> </widget> </item> - <item row="5" column="0"> - <widget class="QLabel" name="mathoutLA"> + <item row="0" column="0"> + <widget class="QCheckBox" name="strictCB"> + <property name="toolTip"> + <string>Whether to comply strictly with XHTML 1.1.</string> + </property> + <property name="text"> + <string>&Strict XHTML 1.1</string> + </property> + </widget> + </item> + <item row="4" column="1"> + <widget class="QComboBox" name="mathoutCB"> <property name="font"> <font> <weight>50</weight> <bold>false</bold> </font> </property> - <property name="text"> - <string>&Math output:</string> - </property> - <property name="buddy"> - <cstring>mathoutCB</cstring> + <property name="toolTip"> + <string>Format to use for math output.</string> </property> + <item> + <property name="text"> + <string>MathML</string> + </property> + </item> + <item> + <property name="text"> + <string>HTML</string> + </property> + </item> + <item> + <property name="text"> + <string>Images</string> + </property> + </item> + <item> + <property name="text"> + <string>LaTeX</string> + </property> + </item> </widget> </item> - <item row="1" column="1"> + <item row="1" column="0"> <widget class="QGroupBox" name="cssCB"> <property name="font"> <font> commit 2c78e69ccee5fc99d1dbbd03279250d742701851 Author: Josh Hieronymus <[email protected]> Date: Mon Jul 29 07:18:42 2013 -0400 Implement checkbox and radio button control of XHTML Output Options diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 9fd7862..fd2fd32 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -1914,7 +1914,7 @@ void Buffer::writeLyXHTMLSource(odocstream & os, docstring const dstyles = css.str(); if (!dstyles.empty()) { bool written = false; - if (params().html_css_as_file || params().html_css_in_separate_directory) { + if (params().html_css_as_file) { // open a file for CSS info ofdocstream ocss; string const fcssname = addName(temppath(), "docstyle.css"); @@ -1923,7 +1923,7 @@ void Buffer::writeLyXHTMLSource(odocstream & os, ocss << dstyles; ocss.close(); written = true; - if (params().html_css_as_file) { + if (!params().html_assets_in_separate_directory) { // write link to header os << "<link rel='stylesheet' href='docstyle.css' type='text/css' />\n"; // register file diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp index ea751e5..2bb17a9 100644 --- a/src/BufferParams.cpp +++ b/src/BufferParams.cpp @@ -415,7 +415,7 @@ BufferParams::BufferParams() html_math_output = MathML; html_math_img_scale = 1.0; html_css_as_file = false; - html_css_in_separate_directory = false; + html_assets_in_separate_directory = false; output_sync = false; use_refstyle = true; @@ -906,8 +906,8 @@ string BufferParams::readToken(Lexer & lex, string const & token, lex >> html_be_strict; } else if (token == "\\html_css_as_file") { lex >> html_css_as_file; - } else if (token == "\\html_css_in_separate_directory") { - lex >> html_css_in_separate_directory; + } else if (token == "\\html_assets_in_separate_directory") { + lex >> html_assets_in_separate_directory; } else if (token == "\\html_math_img_scale") { lex >> html_math_img_scale; } else if (token == "\\html_latex_start") { @@ -1177,7 +1177,7 @@ void BufferParams::writeFile(ostream & os) const << "\\output_changes " << convert<string>(outputChanges) << '\n' << "\\html_math_output " << html_math_output << '\n' << "\\html_css_as_file " << html_css_as_file << '\n' - << "\\html_css_in_separate_directory " << html_css_in_separate_directory << '\n' + << "\\html_assets_in_separate_directory " << html_assets_in_separate_directory << '\n' << "\\html_be_strict " << convert<string>(html_be_strict) << '\n'; if (html_math_img_scale != 1.0) diff --git a/src/BufferParams.h b/src/BufferParams.h index 213b8fa..5bee659 100644 --- a/src/BufferParams.h +++ b/src/BufferParams.h @@ -471,7 +471,7 @@ public: /// bool html_css_as_file; /// - bool html_css_in_separate_directory; + bool html_assets_in_separate_directory; /// generate output usable for reverse/forward search bool output_sync; /// custom LaTeX macro from user instead our own diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index 2b90cf8..7446752 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -751,9 +751,11 @@ GuiDocument::GuiDocument(GuiView & lv) this, SLOT(change_adaptor())); connect(outputModule->strictCB, SIGNAL(stateChanged(int)), this, SLOT(change_adaptor())); - connect(outputModule->cssCB, SIGNAL(stateChanged(int)), + connect(outputModule->cssCB, SIGNAL(clicked()), this, SLOT(change_adaptor())); - connect(outputModule->css_in_separate_directoryCB, SIGNAL(stateChanged(int)), + connect(outputModule->assetsdefdirRB, SIGNAL(clicked()), + this, SLOT(change_adaptor())); + connect(outputModule->assetssepdirsRB, SIGNAL(clicked()), this, SLOT(change_adaptor())); connect(outputModule->mathoutCB, SIGNAL(currentIndexChanged(int)), this, SLOT(change_adaptor())); @@ -2788,7 +2790,7 @@ void GuiDocument::applyView() bp_.html_math_output = mo; bp_.html_be_strict = outputModule->strictCB->isChecked(); bp_.html_css_as_file = outputModule->cssCB->isChecked(); - bp_.html_css_in_separate_directory = outputModule->css_in_separate_directoryCB->isChecked(); + bp_.html_assets_in_separate_directory = outputModule->assetssepdirsRB->isChecked(); bp_.html_math_img_scale = outputModule->mathimgSB->value(); // fonts @@ -3323,7 +3325,8 @@ void GuiDocument::paramsToDialog() outputModule->mathoutCB->setCurrentIndex(bp_.html_math_output); outputModule->strictCB->setChecked(bp_.html_be_strict); outputModule->cssCB->setChecked(bp_.html_css_as_file); - outputModule->css_in_separate_directoryCB->setChecked(bp_.html_css_in_separate_directory); + outputModule->assetsdefdirRB->setChecked(!bp_.html_assets_in_separate_directory); + outputModule->assetssepdirsRB->setChecked(bp_.html_assets_in_separate_directory); // paper bool const extern_geometry = diff --git a/src/frontends/qt4/ui/OutputUi.ui b/src/frontends/qt4/ui/OutputUi.ui index 16b6889..d00f0b6 100644 --- a/src/frontends/qt4/ui/OutputUi.ui +++ b/src/frontends/qt4/ui/OutputUi.ui @@ -2,14 +2,6 @@ <ui version="4.0"> <class>OutputUi</class> <widget class="QWidget" name="OutputUi"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>435</width> - <height>334</height> - </rect> - </property> <property name="windowTitle"> <string>Form</string> </property> @@ -244,7 +236,13 @@ </widget> </item> <item row="1" column="1"> - <widget class="QGroupBox" name="verticalGroupBox"> + <widget class="QGroupBox" name="cssCB"> + <property name="font"> + <font> + <weight>50</weight> + <bold>false</bold> + </font> + </property> <property name="title"> <string>Write CSS to File</string> </property> @@ -259,9 +257,19 @@ </property> <layout class="QVBoxLayout" name="verticalLayout"> <item> - <widget class="QRadioButton" name="radioButton"> + <widget class="QRadioButton" name="assetsdefdirRB"> + <property name="text"> + <string>Write CSS and Images to Default Directory</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QRadioButton" name="assetssepdirsRB"> <property name="text"> - <string>RadioButton</string> + <string>Write CSS and Images to Separate Directories</string> </property> </widget> </item> commit f787224503a7ff9fe526580b300a369bc4a5ef50 Author: Josh Hieronymus <[email protected]> Date: Mon Jul 29 05:30:01 2013 -0400 Add groupbox and radio button to XHTML Output Options diff --git a/src/frontends/qt4/ui/OutputUi.ui b/src/frontends/qt4/ui/OutputUi.ui index db299e6..16b6889 100644 --- a/src/frontends/qt4/ui/OutputUi.ui +++ b/src/frontends/qt4/ui/OutputUi.ui @@ -6,7 +6,7 @@ <rect> <x>0</x> <y>0</y> - <width>388</width> + <width>435</width> <height>334</height> </rect> </property> @@ -14,6 +14,64 @@ <string>Form</string> </property> <layout class="QGridLayout" name="gridLayout"> + <item row="1" column="0"> + <widget class="QGroupBox" name="outputsyncCB"> + <property name="toolTip"> + <string>Enable forward/reverse search between editor and output (e.g., SyncTeX)</string> + </property> + <property name="title"> + <string>S&ynchronize with Output</string> + </property> + <property name="flat"> + <bool>true</bool> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="checked"> + <bool>false</bool> + </property> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <item> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <widget class="QLabel" name="label"> + <property name="text"> + <string>C&ustom Macro:</string> + </property> + <property name="buddy"> + <cstring>synccustomCB</cstring> + </property> + </widget> + </item> + <item> + <widget class="QComboBox" name="synccustomCB"> + <property name="toolTip"> + <string>Custom LaTeX preamble macro</string> + </property> + <property name="editable"> + <bool>true</bool> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + </item> + <item row="4" column="0"> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> <item row="0" column="0"> <widget class="QGroupBox" name="outputFormatGB"> <property name="title"> @@ -62,52 +120,7 @@ </layout> </widget> </item> - <item row="1" column="0"> - <widget class="QGroupBox" name="outputsyncCB"> - <property name="toolTip"> - <string>Enable forward/reverse search between editor and output (e.g., SyncTeX)</string> - </property> - <property name="title"> - <string>S&ynchronize with Output</string> - </property> - <property name="flat"> - <bool>true</bool> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - <property name="checked"> - <bool>false</bool> - </property> - <layout class="QVBoxLayout" name="verticalLayout_2"> - <item> - <layout class="QHBoxLayout" name="horizontalLayout"> - <item> - <widget class="QLabel" name="label"> - <property name="text"> - <string>C&ustom Macro:</string> - </property> - <property name="buddy"> - <cstring>synccustomCB</cstring> - </property> - </widget> - </item> - <item> - <widget class="QComboBox" name="synccustomCB"> - <property name="toolTip"> - <string>Custom LaTeX preamble macro</string> - </property> - <property name="editable"> - <bool>true</bool> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - </item> - <item row="2" column="0"> + <item row="3" column="0"> <widget class="QGroupBox" name="xhtmlGB"> <property name="title"> <string>XHTML Output Options</string> @@ -116,33 +129,7 @@ <bool>true</bool> </property> <layout class="QGridLayout" name="outGridLayout"> - <item row="0" column="0"> - <widget class="QCheckBox" name="strictCB"> - <property name="toolTip"> - <string>Whether to comply strictly with XHTML 1.1.</string> - </property> - <property name="text"> - <string>&Strict XHTML 1.1</string> - </property> - </widget> - </item> - <item row="2" column="0"> - <widget class="QLabel" name="mathoutLA"> - <property name="font"> - <font> - <weight>50</weight> - <bold>false</bold> - </font> - </property> - <property name="text"> - <string>&Math output:</string> - </property> - <property name="buddy"> - <cstring>mathoutCB</cstring> - </property> - </widget> - </item> - <item row="2" column="1"> + <item row="5" column="1"> <widget class="QComboBox" name="mathoutCB"> <property name="font"> <font> @@ -175,7 +162,14 @@ </item> </widget> </item> - <item row="3" column="0"> + <item row="2" column="1"> + <widget class="QCheckBox" name="css_in_separate_directoryCB"> + <property name="text"> + <string>Write CSS to Separate Directory</string> + </property> + </widget> + </item> + <item row="6" column="0"> <widget class="QLabel" name="mathimgLA"> <property name="font"> <font> @@ -191,7 +185,24 @@ </property> </widget> </item> - <item row="3" column="1"> + <item row="0" column="1"> + <widget class="QCheckBox" name="cssCBbak"> + <property name="text"> + <string>Write CSS to File</string> + </property> + </widget> + </item> + <item row="0" column="0"> + <widget class="QCheckBox" name="strictCB"> + <property name="toolTip"> + <string>Whether to comply strictly with XHTML 1.1.</string> + </property> + <property name="text"> + <string>&Strict XHTML 1.1</string> + </property> + </widget> + </item> + <item row="6" column="1"> <widget class="QDoubleSpinBox" name="mathimgSB"> <property name="font"> <font> @@ -216,36 +227,50 @@ </property> </widget> </item> - <item row="0" column="1"> - <widget class="QCheckBox" name="cssCB"> + <item row="5" column="0"> + <widget class="QLabel" name="mathoutLA"> + <property name="font"> + <font> + <weight>50</weight> + <bold>false</bold> + </font> + </property> <property name="text"> - <string>Write CSS to File</string> + <string>&Math output:</string> + </property> + <property name="buddy"> + <cstring>mathoutCB</cstring> </property> </widget> </item> <item row="1" column="1"> - <widget class="QCheckBox" name="css_in_separate_directoryCB"> - <property name="text"> - <string>Write CSS to Separate Directory</string> + <widget class="QGroupBox" name="verticalGroupBox"> + <property name="title"> + <string>Write CSS to File</string> + </property> + <property name="flat"> + <bool>true</bool> + </property> + <property name="checkable"> + <bool>true</bool> </property> + <property name="checked"> + <bool>false</bool> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <widget class="QRadioButton" name="radioButton"> + <property name="text"> + <string>RadioButton</string> + </property> + </widget> + </item> + </layout> </widget> </item> </layout> </widget> </item> - <item row="3" column="0"> - <spacer name="verticalSpacer"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>40</height> - </size> - </property> - </spacer> - </item> </layout> </widget> <includes> ----------------------------------------------------------------------- Summary of changes: src/Buffer.cpp | 4 +- src/BufferParams.cpp | 8 +- src/BufferParams.h | 2 +- src/frontends/qt4/GuiDocument.cpp | 11 +- src/frontends/qt4/ui/OutputUi.ui | 255 ++++++++++++++++++++----------------- 5 files changed, 155 insertions(+), 125 deletions(-) hooks/post-receive -- Repositories for GSOC work
