Changeset 64 for trunk/src/IDocument.cxx

Show
Ignore:
Timestamp:
04/14/06 15:05:24 (3 years ago)
Author:
jordi
Message:

Added the reload action to the GTK's MainView?.

Also I fixed a weird bug (although I don't really know if it's mine) that deleted the m_FileName of the IDocument when reloaded the new file.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/IDocument.cxx

    r63 r64  
    540540    g_assert (NULL != fileName && "Tried to set a NULL file name."); 
    541541 
    542     g_free (m_FileName); 
     542    // Don't ask me why, but then I set like this: 
     543    //      g_free (m_FileName); 
     544    //      m_FileName = fileName 
     545    // Somehow the g_free also frees the parameter ???????? 
     546    //       
     547    gchar *oldFileName = m_FileName; 
    543548    m_FileName = g_strdup (fileName); 
     549    g_free (oldFileName); 
    544550} 
    545551