[Gtkradiant] r350 - in GtkRadiant/branches/Rambetter-temp-fixes: . radiant

Markus Fischer markus at fischer.name
Wed Dec 15 07:25:24 CST 2010


Hi,

I did some fixes regarding this:

Fix crash when loading a map file with no extension.
https://github.com/mfn/GtkRadiant/commit/f29f2e9e78027c7c9a743e71a64ba6df0d6813ba

Apply previous fix crash also when importing maps, just in case.
https://github.com/mfn/GtkRadiant/commit/09d33a5d2357a362a1ec0a4ffdf6e6b3ee04a95a

Reworked file open dialog handling for win32/gtk.
https://github.com/mfn/GtkRadiant/commit/a8c8893bea63dbf7917aad3025d27d41185fb552

I think the last one covers the subject, the others may be interesting too.

HTH,
- Markus

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[0] = customfilter[1] = customfilter[2] = '\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);
>       with
>       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(),
>       m_pTypes[index].m_pattern.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.
> 
> Willi
> 
> 
> 
> _______________________________________________
> Gtkradiant mailing list
> Gtkradiant at zerowing.idsoftware.com
> http://zerowing.idsoftware.com/cgi-bin/mailman/listinfo/gtkradiant



More information about the Gtkradiant mailing list