void XpmEditorBase::UpdateModified()
{
if ( GetModified() )
SetTitle( _T("*") + GetShortName() );
else
SetTitle( GetShortName() );
}
void XpmEditorBase::SetFilename(const wxString& filename)
{
m_Filename = filename;
wxFileName fname;
fname.Assign(m_Filename);
m_Shortname = fname.GetFullName();
}
I have updated the code on sourceforge:It took me a while to find out you are not using SVN on sourceforge... (why?!). Now I can give tit a try, too... :)
https://sourceforge.net/projects/xpmeditor/ (https://sourceforge.net/projects/xpmeditor/)
Does not work on linux.
You copied the source of the bitmap-togglebutton from the msw-sources of wxWidgets, that does not work.
And using the sources from src/gtk is not so easy.
No bitmaps shown (OnPaint is never called) and after a click on any button C::B blocks xfce and I have to kill it from a console.
I started to move to wxCustmButton of wxSmithContribItems, bitmaps are shown, but no other functions (yet).
wxSmithContribItems
Is it possible that you missed to add/commit wxResizeCtrl.cpp/wxResizeCtrl.h?
I had the same problem.I doubt that this is it. If I look at the project file I see references to missing files not in the SVN tree. If you open the project tree in C::B they are missing, too and obviously the linker won't find them.
The cause was a non-empty .obj-directory,
You are right.I had the same problem.I doubt that this is it. If I look at the project file I see references to missing files not in the SVN tree. If you open the project tree in C::B they are missing, too and obviously the linker won't find them.
The cause was a non-empty .obj-directory,
Edit: I am talking about SVN trunk, Revision 26.
But after removing them I have no problems compiling the plugin.Stupid me :?. I should have tried that. I was thinking they were needed somehow... Works here now, too. :-)
Hello,
[...]
In parallel, I have found a way to install Ubuntu 10.4 on my computer (using VirtualBox, to avoid a nasty and potentially dangerous hard disk partionning).
2 - I would like to display the images files that the XPMEditor can open in a specific virtual folder (such as "images" or "resources").You can define that *.bmp files can go to folder "images", somewhere in the Project menu. The menu option should be something related to file types/file associations.
(see 2nd screenshot)
Right click on project, select:
- project tree -> edit file types and categories
-> setup ad desired
Enable:
- project tree -> categorize by file types
(- project tree -> hide folder names)
PS: 1st impression: it is a lot faster than on Vista (same laptop...) Code completions is much more reactive, load time of the codeblocks project took only a few seconds (against 30 seconds approximately on Vista). Do you know why there are so much differences ?I have a similar experience about the parsing time of CodeCompletion. In the same notebook, Windows Vista is much slower than windows XP. To load the codeblocks.cbp, in Vista, it will take more than 1 minutes, but in XP, it is only 20 seconds. I'm not sure why, but surely XP is faster than Vista. Vista is too "bloat". :D
PS: 1st impression: it is a lot faster than on Vista (same laptop...) Code completions is much more reactive, load time of the codeblocks project took only a few seconds (against 30 seconds approximately on Vista). Do you know why there are so much differences ?I have a similar experience about the parsing time of CodeCompletion. In the same notebook, Windows Vista is much slower than windows XP. To load the codeblocks.cbp, in Vista, it will take more than 1 minutes, but in XP, it is only 20 seconds. I'm not sure why, but surely XP is faster than Vista. Vista is too "bloat". :D
I have never used any linux like OS though.
- I have found the "update" script and ran it. The output directory was created, as expectedYou cannot run C::B directly (that would need a make install, indeed) - but the update script also creates a run.sh script for you. You need to use this to run C::B.
- I cannot run codeblocks from output (using "./codeblocks" command line), it complains about "libwxscintilla.
To start your new C::B you can run it through C::B or call the wrapper-script output/run.sh, using the new executable will not work directly.
I've found that adding '-z defs' to the linking options of a plugin helps a lot in the debugging undefined references... 8)True. We should add this to EVERY plugin in fact (I've done this partially already some time back...)
A few thoughts:
- AFAIK it is not foreseen to add a file filter in the global CodeBlocks file open / save dialog box. The only way I found is to generate a lexer-configuration file (even if there does not exist a scintilla-lexer for bitmaps ).
- Why do you not commit the code to the svn repo on sorceforge? It is also helpful for you.
- Most other plugins use CamelCase namings (class and filenames) but this is only a matter of personal taste.
regards,
danselmi
void XPMEditor::AddFileMasksToFileOpenSaveDialog(wxArrayString sFileMasks)
{
wxString sImageMasks;
wxString sMask;
size_t i;
//sImageMasks = wxImage::GetImageExtWildcard();
sImageMasks = _("");
for(i=0;i<sFileMasks.GetCount();i++)
{
sMask = sFileMasks.Item(i);
if (sImageMasks.Len() > 0) sImageMasks += _(",");
sImageMasks += sMask;
}
FileFilters::Add(_("Image Files"), sImageMasks);
}
SVN Updated (47)...these images are missing in SVN and therefore break compilation. :-)
1 - add 2 icons (spray can + gradient) to Project
SVN Updated (47)...these images are missing in SVN and therefore break compilation. :-)
1 - add 2 icons (spray can + gradient) to Project
void MainFrame::OnSettingsEnvironment()
{
...
Manager::Get()->GetLogManager()->NotifyUpdate();
}
Logger
QUESTION FOR THE CODE::BLOCKS TEAM:That is true. If this makes sense for plugin we can think of an event. Nevertheless, you can always query configmanager if this setting is persisted (which is normally in the case for settings). That might be another option.
There are, at my knowledge, no events indicating that settings have been updated.
QUESTION FOR THE CODE::BLOCKS TEAM:That is true. If this makes sense for plugin we can think of an event. Nevertheless, you can always query configmanager if this setting is persisted (which is normally in the case for settings). That might be another option.
There are, at my knowledge, no events indicating that settings have been updated.
Besides that if you come up with a patch that's surely worth a look into.
But it is a bit overkill for just setting wxAUI colour. Therefore I will go with the patch.Why? That's how C::B stores / reads the settings. I mean you should do this only once on startup. That might be sufficient.
But it is a bit overkill for just setting wxAUI colour. Therefore I will go with the patch.Why? That's how C::B stores / reads the settings. I mean you should do this only once on startup. That might be sufficient.
UpdateAUIColours();
void XPMEditor::OnAttach()
{
if (m_Singleton == NULL)
{
const FilesGroupsAndMasks *fm = Manager::Get()->GetProjectManager()->GetFilesGroupsAndMasks();
wxString sMask;
if (fm) sMask = fm->GetFileMasks(0);
m_Singleton = this;
}
}
<frame level="0" function="wxFatalSignalHandler" offset="00000026"/>
<frame level="1"/>
<frame level="2" function="wxBaseArrayPtrVoid::GetCount() const" offset="00000006"/>
<frame level="3" function="FilesGroupsAndMasks::GetFileMasks(unsigned int) const" offset="00000021"/>
<frame level="4" function="XPMEditor::OnAttach()" offset="000001d2"/>
But I sometimes get a crash, if I close the editor-tab, it does not happen reliable.
I will see if I find a cause or a regularity, but at the moment it seems more or less random.
1.) Although clicking on ICO (icon resource) files works, the editor does not handle them correctly, i.e. all is white.
2.) XPM files with multiple resources are handled as if they had just one image. After saving the other images are all lost.I did not know that XPM can have multiple images into it. It can be a bit tricky to handle (Open multiple editors ? Ask the user which image to open ?). Besides, wxWidgets handler does not make provisions for it. But since I have already patched it (to handle XPM with C++ comments inside), I can maybe improve it.
3.) The tool section "image modification" has no icons - only buttons with long text. This is probably by design.This is by design. The reason is: I have not found explicit icons for them. It can be improved, but it is not critical.
...besides I created / manipulated quite some resource files meanwhile. It seems to have become quite stable. Good work! :-)Thank you for the support ! There is still a crash occuring on Linux, to fix.
I have started to program a new Code::Blocks plugin.I've sent you a patch through the patch tracker at SF.net to make this plugin compile again on recent C::B, including project files for wx30 andwx30-64 bit. Feel free to apply.
I've sent you a patch through the patch tracker at SF.net to make this plugin compile again on recent C::B, including project files for wx30 andwx30-64 bit. Feel free to apply.
BTW: I am not the only one still using this plugin...