From 4ad10a66f1910198c3c767d5d468950d71537bcb Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Sat, 28 Jan 2006 07:07:11 +0000
Subject: [PATCH] - complete file type list - call
 Fl_File_Icon::load_system_icons() in the GUI ctor so we have all   the nice
 icons and the image preview in the file browser

---
 Fltk/Callbacks.cpp | 7 ++++++-
 Fltk/GUI.cpp       | 5 ++++-
 Fltk/GUI.h         | 1 +
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/Fltk/Callbacks.cpp b/Fltk/Callbacks.cpp
index b82f602f4d..1ba0aa8b7e 100644
--- a/Fltk/Callbacks.cpp
+++ b/Fltk/Callbacks.cpp
@@ -1,4 +1,4 @@
-// $Id: Callbacks.cpp,v 1.404 2006-01-27 21:15:30 geuzaine Exp $
+// $Id: Callbacks.cpp,v 1.405 2006-01-28 07:07:11 geuzaine Exp $
 //
 // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
 //
@@ -596,7 +596,12 @@ static char *file_types =
   "\tGmsh mesh (*.msh)"
   "\tGmsh post-processing view (*.pos)"
   "\tSTL triangulation (*.stl)"
+  "\tJPEG (*.jpg)"
+  "\tPNG (*.png)"
+  "\tBMP (*.bmp)"
   "\tPPM (*.ppm)"
+  "\tPGM (*.pgm)"
+  "\tPBM (*.pbm)"
   "\tPNM (*.pnm)";
 
 void file_open_cb(CALLBACK_ARGS)
diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp
index 9cde3ecefa..74668648f8 100644
--- a/Fltk/GUI.cpp
+++ b/Fltk/GUI.cpp
@@ -1,4 +1,4 @@
-// $Id: GUI.cpp,v 1.485 2006-01-28 06:40:41 geuzaine Exp $
+// $Id: GUI.cpp,v 1.486 2006-01-28 07:07:11 geuzaine Exp $
 //
 // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
 //
@@ -873,6 +873,9 @@ GUI::GUI(int argc, char **argv)
     Fl::scheme(CTX.scheme);
   Fl_Tooltip::size(fontsize);
 
+  // load system icons
+  Fl_File_Icon::load_system_icons();
+
   // add callback to respond to the Mac Finder (when you click on a
   // document)
 #if defined(__APPLE__) && defined(HAVE_FLTK_1_1_5_OR_ABOVE)
diff --git a/Fltk/GUI.h b/Fltk/GUI.h
index 77fb46db64..8a90988267 100644
--- a/Fltk/GUI.h
+++ b/Fltk/GUI.h
@@ -47,6 +47,7 @@
 #include <FL/Fl_Color_Chooser.H>
 #include <FL/fl_ask.H>
 #include <FL/Fl_Tooltip.H>
+#include <FL/Fl_File_Icon.H>
 #if defined(__APPLE__) && defined(HAVE_FLTK_1_1_5_OR_ABOVE)
 #include <FL/Fl_Sys_Menu_Bar.H>
 #endif
-- 
GitLab