X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fxforms%2FFormTexinfo.C;h=98677ef2ce703776f2c2b5a200f43ff7dea1cb93;hb=d5443737342903de489d527802cd2cdd38987d74;hp=b82b198c6c9b9c2fccc26b5a21e64ebf4d92d93b;hpb=318bdb52f3ecfd2c2f1ef5bd9f7dcfa4a5ad8edd;p=lyx.git diff --git a/src/frontends/xforms/FormTexinfo.C b/src/frontends/xforms/FormTexinfo.C index b82b198c6c..98677ef2ce 100644 --- a/src/frontends/xforms/FormTexinfo.C +++ b/src/frontends/xforms/FormTexinfo.C @@ -24,15 +24,13 @@ using std::string; namespace lyx { -using support::OnlyFilename; - namespace frontend { typedef FormController > base_class; FormTexinfo::FormTexinfo(Dialog & parent) - : base_class(parent, _("LaTeX Information")), + : base_class(parent, _("TeX Information")), activeStyle(ControlTexinfo::cls) {} @@ -89,8 +87,12 @@ ButtonPolicy::SMInput FormTexinfo::input(FL_OBJECT * ob, long ob_value) { // double click in browser: view selected file ContentsType::size_type const sel = fl_get_browser(ob); ContentsType const & data = texdata_[activeStyle]; + string file = data[sel-1]; + if (!fl_get_button(dialog_->check_fullpath)) + file = getTexFileFromList(data[sel-1], + controller().getFileType(activeStyle)); if (sel >= 1 && sel <= data.size()) - controller().viewFile(data[sel-1]); + controller().viewFile(file); // reset the browser so that the following single-click // callback doesn't do anything @@ -125,17 +127,14 @@ ButtonPolicy::SMInput FormTexinfo::input(FL_OBJECT * ob, long ob_value) { void FormTexinfo::updateStyles(ControlTexinfo::texFileSuffix whichStyle) { ContentsType & data = texdata_[whichStyle]; - getTexFileList(whichStyle, data); - bool const withFullPath = fl_get_button(dialog_->check_fullpath); + getTexFileList(whichStyle, data, withFullPath); fl_clear_browser(dialog_->browser); ContentsType::const_iterator it = data.begin(); ContentsType::const_iterator end = data.end(); - for (; it != end; ++it) { - string const line = withFullPath ? *it : OnlyFilename(*it); - fl_add_browser_line(dialog_->browser, line.c_str()); - } + for (; it != end; ++it) + fl_add_browser_line(dialog_->browser, (*it).c_str()); activeStyle = whichStyle; }