Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: DrewBoo on March 14, 2008, 11:19:22 pm

Title: Tiny sdk fix (patch)
Post by: DrewBoo on March 14, 2008, 11:19:22 pm
Code::Blocks has this nice Project Manager feature that will show you if a file in the project is missing.

There's a "broken file" icon that shows you a file should exist, but doesn't.


You're told that the file doesn't exist when you double-click the icon, but you still see the "working file" icon.

Here's a one-line fix that simply sets the correct icon after C::B has already determined the file is missing:
Code
Index: sdk/projectmanager.cpp
===================================================================
--- sdk/projectmanager.cpp      (revision 4957)
+++ sdk/projectmanager.cpp      (working copy)
@@ -1419,6 +1419,7 @@
         wxString msg;
         msg.Printf(_("Could not open the file '%s'.\nThe file does not exist."), filename.c_str());
         cbMessageBox(msg, _("Error"));
+        pf->SetFileState(fvsMissing);
         Manager::Get()->GetLogManager()->LogError(msg);
         return;
     }
Title: Re: Tiny sdk fix (patch)
Post by: Biplab on March 15, 2008, 06:57:50 am
Applied to trunk. Thanks for the patch. :)