Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

RecentFilesHistory

(1/1)

tiwag:
how can files opened by

DefaultMimeHandler::DoOpenFile()

added to the RecentFilesHistory - list ?

tiwag:

--- Code: ---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;

--- End code ---

would this work ok in all cases ?

Navigation

[0] Message Index

Go to full version