News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

RecentFilesHistory

Started by tiwag, January 27, 2006, 02:39:47 PM

Previous topic - Next topic

tiwag

how can files opened by

DefaultMimeHandler::DoOpenFile()

added to the RecentFilesHistory - list ?

tiwag

Index: D:/Devel/CodeBlocks/trunk/src/src/main.cpp
===================================================================
--- D:/Devel/CodeBlocks/trunk/src/src/main.cpp (revision 1886)
+++ D:/Devel/CodeBlocks/trunk/src/src/main.cpp (working copy)
@@ -1104,7 +1104,9 @@
         default:
         {
             cbMimePlugin* plugin = Manager::Get()->GetPluginManager()->GetMIMEHandlerForFile(filename);
-            return plugin && plugin->OpenFile(filename) == 0;
+            bool res = plugin && plugin->OpenFile(filename) == 0;
+            if (res) AddToRecentFilesHistory(filename);
+            return res;
         }
     }
     return true;


would this work ok in all cases ?