Patch #2022 2007-05-27 18:22

meiz

see comments and fix line 900 of file
Download
2022-see_comments_a.patch (37.0 KB)
Category
Application::Bugfix
Status
Closed
Close date
2007-05-28 05:13
Assigned to
biplab
/*
* This file is part of Code::Blocks Studio, an open-source cross-platform IDE
* Copyright (C) 2003  Yiannis An. Mandravellos
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*
* Contact e-mail: Yiannis An. Mandravellos <mandrav@codeblocks.org>
* Program URL   : http://www.codeblocks.org
*
* $Revision: 3996 $
* $Id: editorconfigurationdlg.cpp 3996 2007-05-26 14:53:27Z biplab $
* $HeadURL: svn://svn.berlios.de/codeblocks/trunk/src/sdk/editorconfigurationdlg.cpp $
*/

#include "sdk_precomp.h"

#ifndef CB_PRECOMP
    #include <wx/xrc/xmlres.h>
    #include <wx/spinctrl.h>
    #include <wx/combobox.h>

    #include "manager.h"
    #include "configmanager.h"
    #include "pluginmanager.h"
    #include "editormanager.h"
    #include "cbeditor.h"
    #include "cbplugin.h" // cgEditor
    #include "globals.h"
    #include <wx/listbook.h>
    #include <wx/listbox.h>
    #include <wx/colordlg.h>
    #include <wx/radiobox.h>
    #include <wx/imaglist.h>
#endif

#include <wx/fontdlg.h>
#include <wx/fontutil.h>
#include <wx/fontmap.h>
#include <wx/textctrl.h>
#include <wx/listbook.h>
#include <wx/listctrl.h>

#include "configurationpanel.h"
#include "editorcolourset.h"
#include "editorconfigurationdlg.h"
#include "editkeywordsdlg.h"

// images by order of pages
const wxString base_imgs[] =
{
    _T("editor"),
    _T("folding"),
    _T("gutter-margin"),
    _T("syntax-highlight"),
    _T("abbrev"),
    _T("default-code"),
};
const int IMAGES_COUNT = sizeof(base_imgs) / sizeof(wxString);

// map cmbDefCodeFileType indexes to FileType values
// if more entries are added to cmbDefCodeFileType, edit the mapping here
const FileType IdxToFileType[] = { ftSource, ftHeader };

BEGIN_EVENT_TABLE(EditorConfigurationDlg, wxDialog)
    EVT_BUTTON(XRCID("btnChooseEditorFont"),     EditorConfigurationDlg::OnChooseFont)
    EVT_BUTTON(XRCID("btnKeywords"),             EditorConfigurationDlg::OnEditKeywords)
    EVT_BUTTON(XRCID("btnFilemasks"),             EditorConfigurationDlg::OnEditFilemasks)
    EVT_BUTTON(XRCID("btnColoursReset"),         EditorConfigurationDlg::OnColoursReset)
    EVT_BUTTON(XRCID("btnCaretColour"),             EditorConfigurationDlg::OnChooseColour)
    EVT_BUTTON(XRCID("btnGutterColour"),         EditorConfigurationDlg::OnChooseColour)
    EVT_BUTTON(XRCID("btnColoursFore"),             EditorConfigurationDlg::OnChooseColour)
    EVT_BUTTON(XRCID("btnColoursBack"),             EditorConfigurationDlg::OnChooseColour)
    EVT_BUTTON(XRCID("btnColoursAddTheme"),         EditorConfigurationDlg::OnAddColourTheme)
    EVT_BUTTON(XRCID("btnColoursDeleteTheme"),     EditorConfigurationDlg::OnDeleteColourTheme)
    EVT_BUTTON(XRCID("btnColoursRenameTheme"),     EditorConfigurationDlg::OnRenameColourTheme)
    EVT_CHECKBOX(XRCID("chkColoursBold"),        EditorConfigurationDlg::OnBoldItalicUline)
    EVT_CHECKBOX(XRCID("chkColoursItalics"),        EditorConfigurationDlg::OnBoldItalicUline)
    EVT_CHECKBOX(XRCID("chkColoursUnderlined"),    EditorConfigurationDlg::OnBoldItalicUline)
    EVT_LISTBOX(XRCID("lstComponents"),            EditorConfigurationDlg::OnColourComponent)
    EVT_COMBOBOX(XRCID("cmbLangs"),                EditorConfigurationDlg::OnChangeLang)
    EVT_COMBOBOX(XRCID("cmbDefCodeFileType"),    EditorConfigurationDlg::OnChangeDefCodeFileType)
    EVT_COMBOBOX(XRCID("cmbThemes"),            EditorConfigurationDlg::OnColourTheme)
    EVT_LISTBOX(XRCID("lstAutoCompKeyword"),    EditorConfigurationDlg::OnAutoCompKeyword)
    EVT_BUTTON(XRCID("btnAutoCompAdd"),            EditorConfigurationDlg::OnAutoCompAdd)
    EVT_BUTTON(XRCID("btnAutoCompDelete"),        EditorConfigurationDlg::OnAutoCompDelete)
    EVT_CHECKBOX(XRCID("chkDynamicWidth"),      EditorConfigurationDlg::OnDynamicCheck)

    EVT_LISTBOOK_PAGE_CHANGED(XRCID("nbMain"), EditorConfigurationDlg::OnPageChanged)
END_EVENT_TABLE()

EditorConfigurationDlg::EditorConfigurationDlg(wxWindow* parent)
    : m_TextColourControl(0L),
    m_AutoCompTextControl(0L),
    m_Theme(0L),
    m_Lang(HL_NONE),
    m_DefCodeFileType(0),
    m_ThemeModified(false),
    m_LastAutoCompKeyword(-1)
{
    wxXmlResource::Get()->LoadDialog(this, parent, _T("dlgConfigureEditor"));

    XRCCTRL(*this, "lblEditorFont", wxStaticText)->SetLabel(_("This is sample text"));
    m_FontString = Manager::Get()->GetConfigManager(_T("editor"))->Re
download for full patch...
pauliusz 2007-05-27 21:36

I think this should belong to the bug reports

biplab 2007-05-28 05:13

Thanks for the comments. But I've fixed this crash in revision 3998.

Just make sure you clean the zip files (containing resource files) using "make clean-zipfiles" (on Linux) and run "update.bat" file (on Windows). Otherwise the crash will haunt you.

I'm closing this.