#include "LyXRC.h"
#include "qt_helpers.h"
#include "Validator.h"
-#include "frontend_helpers.h"
#include "FuncRequest.h"
#include "gettext.h"
* checkbox is unchecked and clearing the line edit if it previously
* said "text".
*/
-void setAutoTextCB(QCheckBox * checkBox, QLineEdit * lineEdit,
+static void setAutoTextCB(QCheckBox * checkBox, QLineEdit * lineEdit,
LengthCombo * lengthCombo/*, string text = "auto"*/)
{
if (!checkBox->isChecked())
lengthCombo->currentLengthItem());
}
-
-
template<class Pair>
vector<typename Pair::first_type> const
getFirst(vector<Pair> const & pr)
return tmp;
}
+/// The (tranlated) GUI std::string and it's LaTeX equivalent.
+typedef std::pair<docstring, std::string> RotationOriginPair;
+///
+std::vector<RotationOriginPair> getRotationOriginData();
+
+
GuiGraphics::GuiGraphics(LyXView & lv)
: GuiDialog(lv, "graphics")
{
void GuiGraphics::change_bb()
{
bbChanged = true;
- LYXERR(Debug::GRAPHICS) << "[bb_Changed set to true]\n";
+ LYXERR(Debug::GRAPHICS, "[bb_Changed set to true]");
changed();
}
// Does user clipart directory exist?
string clipdir = addName(package().user_support().absFilename(), "clipart");
FileName clip(clipdir);
- if (!clip.exists() && clip.isDirectory())
- // No - bail out to system clipart directory
+
+ // bail out to system clipart directory
+ if (!(clip.exists() && clip.isDirectory()))
clipdir = addName(package().system_support().absFilename(), "clipart");
- pair<docstring, docstring> dir1(_("Clipart|#C#c"), from_utf8(clipdir));
- pair<docstring, docstring> dir2(_("Documents|#o#O"), from_utf8(lyxrc.document_path));
- // Show the file browser dialog
+
return browseRelFile(in_name, from_utf8(bufferFilepath()),
- title, FileFilterList(), false, dir1, dir2);
+ title, FileFilterList(), false,
+ _("Clipart|#C#c"), from_utf8(clipdir),
+ _("Documents|#o#O"), from_utf8(lyxrc.document_path));
}
bool GuiGraphics::isFilenameValid(string const & fname) const
{
// It may be that the filename is relative.
- return makeAbsPath(fname, bufferFilepath()).isReadable();
+ return makeAbsPath(fname, bufferFilepath()).isFileReadable();
}