Code::Blocks Forums
Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: artoj on October 03, 2006, 08:37:37 pm
-
Hi,
I'm using the SetEditorTitle() function to set a more descriptive title to my editor tab; I'm creating a temporary file and the file name is usually something like "389fk3.tmp". Everything works ok until I edit the file and C::B puts the "*" mark and changes the tab's title to the original, i.e. ugly file name "389fk3.tmp".
Is there any way to get around this?
-
As a workaround, tried calling SetModified(true) before calling SetTitle()?
-
As a workaround, tried calling SetModified(true) before calling SetTitle()?
Nope, doesn't work. When I try to edit the file it restores the ugly file name again.
I could of course set the better title every time EVT_EDITOR_MODIFIED fires but I think it's an ugly way to do it.
The trouble function is in cbeditor.cpp, SetModified() @ 527. It always uses the m_Shortname when restoring the tab's title.