]> git.lyx.org Git - features.git/commitdiff
(Herbert): expand the list of recognised graphics formats.
authorAngus Leeming <leeming@lyx.org>
Fri, 12 Apr 2002 15:25:11 +0000 (15:25 +0000)
committerAngus Leeming <leeming@lyx.org>
Fri, 12 Apr 2002 15:25:11 +0000 (15:25 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3989 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/controllers/ChangeLog
src/frontends/controllers/ControlGraphics.C

index b36b1bc88dc85667f3dcb7ae1dc8bd8260cab75b..2e1d53a1d25ceea691f2646bac5b4aaed3b4400a 100644 (file)
@@ -1,3 +1,7 @@
+2002-04-11  Herbert Voss  <voss@perce.de>
+
+       * ControlGraphics.C: expand "browse-string" to all available formats
+
 2002-04-11  Herbert Voss  <voss@perce.de>
 
        * ControlGraphics.C: read BoundingBox also from non (e)ps files.
index 4437f0f7819ea6a7a95d5e0c8739530ee991caaf..8dc3ba5963dbbbf5e567366d69608f00b0479da4 100644 (file)
 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<InsetGraphics, InsetGraphicsParams>(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<string, string> 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);
 }