Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

SetEditorTitle() and modified files

(1/1)

artoj:
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?

mandrav:
As a workaround, tried calling SetModified(true) before calling SetTitle()?

artoj:

--- Quote from: mandrav on October 03, 2006, 11:04:29 pm ---As a workaround, tried calling SetModified(true) before calling SetTitle()?

--- End quote ---

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.

Navigation

[0] Message Index

Go to full version