From: Angus Leeming Date: Fri, 12 Apr 2002 15:25:11 +0000 (+0000) Subject: (Herbert): expand the list of recognised graphics formats. X-Git-Tag: 1.6.10~19417 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=3ee9f0ac7d787e6219a2530d80c2133715986daf;p=features.git (Herbert): expand the list of recognised graphics formats. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3989 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/controllers/ChangeLog b/src/frontends/controllers/ChangeLog index b36b1bc88d..2e1d53a1d2 100644 --- a/src/frontends/controllers/ChangeLog +++ b/src/frontends/controllers/ChangeLog @@ -1,3 +1,7 @@ +2002-04-11 Herbert Voss + + * ControlGraphics.C: expand "browse-string" to all available formats + 2002-04-11 Herbert Voss * ControlGraphics.C: read BoundingBox also from non (e)ps files. diff --git a/src/frontends/controllers/ControlGraphics.C b/src/frontends/controllers/ControlGraphics.C index 4437f0f781..8dc3ba5963 100644 --- a/src/frontends/controllers/ControlGraphics.C +++ b/src/frontends/controllers/ControlGraphics.C @@ -46,6 +46,18 @@ using std::pair; using std::make_pair; using std::ifstream; + +namespace { + +// FIXME: currently we need the second '|' to prevent mis-interpretation! +// All supported graphic formats with their file-extension and the +// gzip-ext for zipped (e)ps-files. +string const grfx_pattern = + "*.(agr|bmp|eps|epsi|fits|gif|jpg|obj|pdf|pbm|pgm|png|" + "ppm|ps|tif|tiff|xbm|xpm|xwd|gz)|"; + +} + ControlGraphics::ControlGraphics(LyXView & lv, Dialogs & d) : ControlInset(lv, d) @@ -90,8 +102,6 @@ extern string user_lyxdir; string const ControlGraphics::Browse(string const & in_name) { string const title = _("Select graphics file"); - // FIXME: currently we need the second '|' to prevent mis-interpretation - string const pattern = "*.(ps|eps|png|jpeg|jpg|gif|gz)|"; // Does user clipart directory exist? string clipdir = AddName (user_lyxdir, "clipart"); @@ -103,7 +113,7 @@ string const ControlGraphics::Browse(string const & in_name) pair dir2(_("Documents|#o#O"), string(lyxrc.document_path)); // Show the file browser dialog return browseRelFile(&lv_, in_name, lv_.buffer()->filePath(), - title, pattern, dir1, dir2); + title, ::grfx_pattern, dir1, dir2); }