Patch #858 2006-02-24 18:12

sethjackson

XP Manifest
Download
858-XP_Manifest.patch (1.3 KB)
Category
Plugin::Refinement
Status
Accepted
Close date
2006-03-03 09:00
Assigned to
 
Index: C:/CodeBlocks/src/plugins/xpmanifest/windowsxplooknfeel.cpp
===================================================================
--- C:/CodeBlocks/src/plugins/xpmanifest/windowsxplooknfeel.cpp    (revision 2071)
+++ C:/CodeBlocks/src/plugins/xpmanifest/windowsxplooknfeel.cpp    (working copy)
@@ -83,10 +83,6 @@
     if (!m_IsAttached)
         return -1;
 
-#ifndef __WXMSW__
-    #error This plugin is for use under Win32 only!
-#endif // __WXMSW__
-
     cbProject* project = Manager::Get()->GetProjectManager()->GetActiveProject();
     if (!project)
     {
@@ -172,7 +168,7 @@
         wxFile file(filename, wxFile::write);
         cbWrite(file,buffer);
 
-        cbMessageBox(_("Manifest file created"));
+        cbMessageBox(_("Manifest file created"), _("Information"), wxICON_INFORMATION | wxOK);
     }
 
     return 0;
Index: C:/CodeBlocks/src/plugins/xpmanifest/windowsxplooknfeel.h
===================================================================
--- C:/CodeBlocks/src/plugins/xpmanifest/windowsxplooknfeel.h    (revision 2071)
+++ C:/CodeBlocks/src/plugins/xpmanifest/windowsxplooknfeel.h    (working copy)
@@ -17,8 +17,6 @@
         int Execute();
         void OnAttach(); // fires when the plugin is attached to the application
         void OnRelease(bool appShutDown); // fires when the plugin is released from the application
-    protected:
-    private:
 };
 
 CB_DECLARE_PLUGIN();
mandrav 2006-03-02 08:18

What is this supposed to do?

Why do you remove the #error for non-windows platforms?

sethjackson 2006-03-02 16:39

It adds a title to the message box that pops up when the manifest is succesfully created. It removes uneeded protected/private decls. The #error was removed because it is in the header. I submitted a patch to SF.net that ifdef'd the header so the plugin would build on Windows only. Thomas said it was easier to do this in the header.

#ifndef __WXMSW__

#error This plugin is for use under Win32 only!

#endif

So the plugin will not build on Linux AFAIK. Why does the same ifndef block need to be in Execute() seeing that the plugin does not even build on Linux?

mandrav 2006-03-03 09:00

Sorry, my bad. I didn't' notice it removed the #error from the .cpp...

Anyway, this is your first patch that contained full filenames. Please try to avoid this.