[Gtkradiant] r350 - in GtkRadiant/branches/Rambetter-temp-fixes: . radiant
markus at fischer.name
Wed Dec 15 07:25:24 CST 2010
I did some fixes regarding this:
Fix crash when loading a map file with no extension.
Apply previous fix crash also when importing maps, just in case.
Reworked file open dialog handling for win32/gtk.
I think the last one covers the subject, the others may be interesting too.
On 15.12.2010 12:48, Willi wrote:
> On 15.12.2010 03:52:26, svn-noreply at zerowing.idsoftware.com wrote:
>> I AM ONLY COMMITTING THIS SO THAT I CAN CONTINUE FIXING BUGS IN RADIANT IN THE MEANTIME.
> You may want to look into fixing saving on Windows Vista/Windows 7 then.
> The problem is strange code in radiant/gtkmisc.cpp's file_dialog() which
> used to do something which according to the MSDN it shouldn't do, namely
> returning the chosen extension at some point.
> Here's what I wrote about that in March:
> * In *radiant/gtkmisc.cpp*:
> * In the function *file_dialog()*:
> * I deleted the variable
> char customfilter[FILEDLG_CUSTOM_FILTER_LENGTH];
> * and its assignment
> customfilter = customfilter = customfilter = '\0';
> * ofn.nFilterIndex should always be set to 0, so take it out of the
> if(pattern) block and delete the else block.
> * The whole else block can be deleted.
> * Since we don't use custom filters we can delete
> ofn.lpstrCustomFilter = customfilter;
> * the if(pattern != NULL) needs to be changed, too. Replace
> type = typelist.GetTypeForWin32Filter(customfilter+1);
> type = typelist.GetTypeFromIndex(ofn.nFilterIndex-1);
> * The GetTypeFromIndex() method does not yet exist. We need to add
> it to CFileType somewhere in the public scope:
> filetype_t GetTypeFromIndex(int index)
> if(index < m_nTypes && index >= 0)
> return filetype_t(m_pTypes[index].m_name.c_str(),
> return filetype_t();
> I tried redoing my changes (after loosing the original code) in November
> and submitted a (due to the lack of a working windows compile untested)
> patch based on this guide to this list, you may want to have a look at
> it, see if it compiles and maybe even works.
> Gtkradiant mailing list
> Gtkradiant at zerowing.idsoftware.com
More information about the Gtkradiant