Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
The first plugin I written : "AutoReadonly"
nanyu:
We often open a file which under a library directories when we are browsing in source code, or debug into.
etc : <string> , <wx/wxString>..<boost/bind.hpp>
Under these circumstances, we care about "read code", rather than to modify them. Modify the library's code and save it, is a very troublesome thing.
There for, I written a plugin named "Auto Readonly". When a file without a opened project was opened in C::B, the plugin will try to change it to read-only mode (just in IDE, no on disk) automatic. OR, you can change it's read-only status manual by a new menu item (Edit->Readonly Ctrl + Alt + R);
A setting panel was provided. you can set those options:
# whether the non-project file ( file without project) change to read-only automatically.
# white list / black list (for directories)
# alert ...
# case sensitive...
-------------------------------------------------------------------
(Updated for png)CBPlug_AutoReadonly(081119-2).7z
Hi, I have update the "autoreadonly.png" and "autoreadonly-off.png".
now I only compile it under windows...(who would test it under linux?)
[attachment deleted by admin]
MortenMacFly:
--- Quote from: nanyu on November 19, 2008, 04:54:42 am ---There for, I written a plugin named "Auto Readonly".
--- End quote ---
I am testing it currently... Nice idea! :-)
From a quick-look I saw that you probably missed a "return" statement in ReadonlyAbleTool.cpp here:
--- Code: ---bool IsActiveEdtiorReadonly()
{
IsEditorReadonly(GetActiveEditor());
}
--- End code ---
I believe what you meant was something like this:
--- Code: ---bool IsActiveEdtiorReadonly()
{
return IsEditorReadonly(GetActiveEditor());
}
--- End code ---
nanyu:
--- Quote ---From a quick-look I saw that you probably missed a "return" statement in ReadonlyAbleTool.cpp ...
--- End quote ---
Thank you!
Do you test it under Linux? I am worry about the code can't work with unix style path. (//.//...) (pls see the TODO-list)
As you see, my English is bad....include the string in my code, I hope they didn't make you confused .:))
mariocup:
Hi nanyu,
I like the idea. I will try it under Linux.
Bye,
Mario
nanyu:
--- Quote ---I will try it under Linux.
--- End quote ---
to Mario: Thank you for your help, Can it work well under Linux ? (If it can't , I guess you have make it can now ) :P
If it work well, can you add it to the next nightly build? (sorry, i don't know how to post a plugin..)
---------------------
I build a svn version Code::Blocks, and i build the "auto readonly" plugin. but the plugin can run only well with the c::b which I build,
but can't be install with the svn5309 build :[
Navigation
[0] Message Index
[#] Next page
Go to full version