Index: ChangeLog =================================================================== RCS file: /cvs/ecos/ecos/host/tools/configtool/ChangeLog,v retrieving revision 1.76 diff -u -5 -r1.76 ChangeLog --- ChangeLog 31 Dec 2008 16:11:51 -0000 1.76 +++ ChangeLog 16 Feb 2009 09:10:54 -0000 @@ -1,5 +1,19 @@ +2009-02-16 John Dallaway + + * standalone/wxwin/mainwin.cpp: Tweak the conflicts status pane width. + + * standalone/wxwin/configtooldoc.cpp, standalone/wxwin/filename.cpp: + Accommodate UNC file paths. + + * standalone/wxwin/propertywin.cpp, standalone/wxwin/conflictwin.cpp: + Automatically size the last column. + + * standalone/wxwin/configitem.cpp, standalone/wxwin/configitem.h, + standalone/wxwin/configtree.cpp: Do not grey tree item text for + active non-modifiable items. + 2008-12-31 John Dallaway * standalone/wxwin/outputwin.cpp, standalone/wxwin/outputwin.h, standalone/wxwin/mainwin.cpp: Migrate save output method from ecMainFrame to ecOutputWindow and manipulate state of associated Index: standalone/common/ecosconfig.cxx =================================================================== RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/common/ecosconfig.cxx,v retrieving revision 1.19 diff -u -5 -r1.19 ecosconfig.cxx --- standalone/common/ecosconfig.cxx 29 Jan 2009 17:47:50 -0000 1.19 +++ standalone/common/ecosconfig.cxx 16 Feb 2009 09:10:55 -0000 @@ -46,11 +46,11 @@ #endif #include "cdl_exec.hxx" #include "ecosconfig.hxx" #define TOOL_VERSION "3.net" -#define TOOL_COPYRIGHT "Copyright (c) 2002-2008 Free Software Foundation, Inc." +#define TOOL_COPYRIGHT "Copyright (c) 2002-2009 Free Software Foundation, Inc." #define DEFAULT_SAVE_FILE "ecos.ecc" static const char* tool = "ecosconfig"; int main (int argc, char * argv []) { Index: standalone/wxwin/configitem.cpp =================================================================== RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/configitem.cpp,v retrieving revision 1.8 diff -u -5 -r1.8 configitem.cpp --- standalone/wxwin/configitem.cpp 29 Jan 2009 17:47:50 -0000 1.8 +++ standalone/wxwin/configitem.cpp 16 Feb 2009 09:10:57 -0000 @@ -1,9 +1,9 @@ // ####ECOSHOSTGPLCOPYRIGHTBEGIN#### // ------------------------------------------- // This file is part of the eCos host tools. -// Copyright (C) 1998, 1999, 2000, 2006, 2008 Free Software Foundation, Inc. +// Copyright (C) 1998, 1999, 2000, 2006, 2008, 2009 Free Software Foundation, Inc. // // 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 or (at your option) any // later version. @@ -22,12 +22,12 @@ // configitem.cpp : // //=========================================================================== //#####DESCRIPTIONBEGIN#### // -// Author(s): julians -// Contact(s): julians +// Author(s): julians, jld +// Contact(s): julians, jld // Date: 2000/09/01 // Version: $Id: configitem.cpp,v 1.10 2001/04/30 17:12:32 julians Exp $ // Purpose: // Description: Implementation file for the ConfigTool application class // Requires: @@ -127,10 +127,11 @@ m_configType = ecConfigTypeNone; m_optionType = ecOptionTypeNone; m_optionFlavor = ecFlavorNone; m_enabled = FALSE; m_active = FALSE; + m_modifiable = FALSE; m_parent = parent; m_CdlItem = vitem; m_hint = ecHintNone; m_treeItem = wxTreeItemId(); @@ -218,10 +219,11 @@ } } m_active = IsActive(); m_enabled = IsEnabled(); + m_modifiable = IsModifiable(); return TRUE; } wxString ecConfigItem::GetItemNameOrMacro() const @@ -326,11 +328,11 @@ } } if (!iconName.IsEmpty()) { - int iconId = treeCtrl.GetIconDB().GetIconId(iconName, iconState, GetActive()); + int iconId = treeCtrl.GetIconDB().GetIconId(iconName, iconState, GetModifiable()); treeCtrl.SetItemImage(m_treeItem, iconId, wxTreeItemIcon_Normal); treeCtrl.SetItemImage(m_treeItem, iconId, wxTreeItemIcon_Selected); } return TRUE; @@ -346,19 +348,19 @@ switch (GetOptionFlavor()) { case ecFlavorBool: case ecFlavorBoolData: { - if (GetActive()) + if (GetModifiable()) { wxGetApp().GetConfigToolDoc()->SetEnabled(*this, !m_enabled); } break; } case ecFlavorData: { - if (GetActive()) + if (GetModifiable()) { switch (GetOptionType()) { case ecLong: { @@ -497,11 +499,11 @@ } // Can we start editing this item? bool ecConfigItem::CanEdit() const { - if (!GetActive()) + if (!GetModifiable()) return FALSE; if (GetConfigType() != ecOption) return FALSE; @@ -936,17 +938,28 @@ { const CdlValuable valuable = GetCdlValuable(); return NULL==valuable ||valuable->is_enabled(); } +bool ecConfigItem::IsModifiable() const +{ + const CdlValuable valuable = GetCdlValuable(); + if (valuable && ((GetOptionType() != ecOptionTypeNone) || HasBool())) + { + return (valuable->is_modifiable () && valuable->is_active ()); + } + else + return GetCdlItem()->is_active(); +} + bool ecConfigItem::IsActive() const { // return GetCdlItem()->is_active(); const CdlValuable valuable = GetCdlValuable(); if (valuable && ((GetOptionType() != ecOptionTypeNone) || HasBool())) { - return (valuable->is_modifiable () && valuable->is_active ()); + return (valuable->is_active ()); } else return GetCdlItem()->is_active(); } Index: standalone/wxwin/configitem.h =================================================================== RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/configitem.h,v retrieving revision 1.2 diff -u -5 -r1.2 configitem.h --- standalone/wxwin/configitem.h 29 Jan 2009 17:47:50 -0000 1.2 +++ standalone/wxwin/configitem.h 16 Feb 2009 09:10:57 -0000 @@ -1,9 +1,9 @@ // ####ECOSHOSTGPLCOPYRIGHTBEGIN#### // ------------------------------------------- // This file is part of the eCos host tools. -// Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. +// Copyright (C) 1998, 1999, 2000, 2009 Free Software Foundation, Inc. // // 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 or (at your option) any // later version. @@ -22,12 +22,12 @@ // configitem.h : // //=========================================================================== //#####DESCRIPTIONBEGIN#### // -// Author(s): julians -// Contact(s): julians +// Author(s): julians, jld +// Contact(s): julians, jld // Date: 2000/09/01 // Version: $Id: configitem.h,v 1.4 2001/04/09 12:51:34 julians Exp $ // Purpose: // Description: Header file for ecConfigItem, which describes a config item // from this tool's perspective. Note that this duplicates @@ -172,11 +172,15 @@ // Only appropriate if Bool or BoolData. Otherwise, assume always enabled. void SetEnabled(bool enabled) { m_enabled = enabled; } bool GetEnabled() const { return m_enabled; } - // Whether greyed out or not + // Whether value and icon greyed out or not + void SetModifiable(bool modifiable) { m_modifiable = modifiable; } + bool GetModifiable() const { return m_modifiable; } + + // Whether tree item text greyed out or not void SetActive(bool active) { m_active = active; } bool GetActive() const { return m_active; } // UI hint void SetUIHint(ecUIHint hint) { m_hint = hint; } @@ -234,10 +238,11 @@ ecConfigItem *NextSibling() const; bool HasModifiedChildren() const; bool IsEnabled() const; bool IsActive() const; // Added JACS + bool IsModifiable() const; bool Modified() const; void DumpItem(); @@ -276,10 +281,11 @@ protected: wxString m_name; wxString m_macro; bool m_enabled; bool m_active; + bool m_modifiable; ecConfigType m_configType; ecOptionType m_optionType; ecOptionFlavor m_optionFlavor; ecUIHint m_hint; wxVariant m_value; Index: standalone/wxwin/configtool.cpp =================================================================== RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/configtool.cpp,v retrieving revision 1.25 diff -u -5 -r1.25 configtool.cpp --- standalone/wxwin/configtool.cpp 29 Jan 2009 17:47:50 -0000 1.25 +++ standalone/wxwin/configtool.cpp 16 Feb 2009 09:10:59 -0000 @@ -1,9 +1,9 @@ // ####ECOSHOSTGPLCOPYRIGHTBEGIN#### // ------------------------------------------- // This file is part of the eCos host tools. -// Copyright (C) 1998, 1999, 2000, 2003, 2004, 2005, 2006, 2008 Free Software Foundation, Inc. +// Copyright (C) 1998, 1999, 2000, 2003, 2004, 2005, 2006, 2008, 2009 Free Software Foundation, Inc. // // 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 or (at your option) any // later version. @@ -282,11 +282,11 @@ { #ifdef __WXGTK__ wxLog::SetActiveTarget(new wxLogStderr); #endif wxString msg; - msg.Printf(wxT("eCos Configuration Tool (c) Free Software Foundation, Inc., 1998-2008 Version %s, %s"), ecCONFIGURATION_TOOL_VERSION, __DATE__); + msg.Printf(wxT("eCos Configuration Tool (c) Free Software Foundation, Inc., 1998-2009 Version %s, %s"), ecCONFIGURATION_TOOL_VERSION, __DATE__); wxLogMessage(msg); return FALSE; } /* Index: standalone/wxwin/configtooldoc.cpp =================================================================== RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/configtooldoc.cpp,v retrieving revision 1.20 diff -u -5 -r1.20 configtooldoc.cpp --- standalone/wxwin/configtooldoc.cpp 29 Jan 2009 17:47:50 -0000 1.20 +++ standalone/wxwin/configtooldoc.cpp 16 Feb 2009 09:11:02 -0000 @@ -1,9 +1,9 @@ // ####ECOSHOSTGPLCOPYRIGHTBEGIN#### // ------------------------------------------- // This file is part of the eCos host tools. -// Copyright (C) 1998, 1999, 2000, 2003, 2005, 2006, 2008 Free Software Foundation, Inc. +// Copyright (C) 1998, 1999, 2000, 2003, 2005, 2006, 2008, 2009 Free Software Foundation, Inc. // // 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 or (at your option) any // later version. @@ -1384,10 +1384,11 @@ case ecInternal: rc = ShowInternalHtmlHelp(strURL); break; case ecAssociatedExternal: { + QualifyDocURL(strURL, FALSE); rc = ShowExternalHtmlHelp(strURL); } break; case ecCustomExternal: @@ -1404,11 +1405,15 @@ { #if defined(__WXMSW__) || defined(__WXGTK__) wxString url; +#ifdef __WXMSW__ + wxString sep(wxT("\\")); +#else wxString sep(wxFILE_SEP_PATH); +#endif wxString docDir(wxString(m_strRepository) + sep + wxString(wxT("doc"))); if (wxDirExists(docDir + sep + wxT("html"))) docDir += sep + wxT("html") ; if (strURL.Left(7) == wxT("http://") || strURL.Left(7) == wxT("file://")) Index: standalone/wxwin/configtree.cpp =================================================================== RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/configtree.cpp,v retrieving revision 1.5 diff -u -5 -r1.5 configtree.cpp --- standalone/wxwin/configtree.cpp 29 Jan 2009 17:47:50 -0000 1.5 +++ standalone/wxwin/configtree.cpp 16 Feb 2009 09:11:03 -0000 @@ -1,9 +1,9 @@ // ####ECOSHOSTGPLCOPYRIGHTBEGIN#### // ------------------------------------------- // This file is part of the eCos host tools. -// Copyright (C) 1998, 1999, 2000, 2008 Free Software Foundation, Inc. +// Copyright (C) 1998, 1999, 2000, 2008, 2009 Free Software Foundation, Inc. // // 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 or (at your option) any // later version. @@ -22,12 +22,12 @@ // configtree.cpp : // //=========================================================================== //#####DESCRIPTIONBEGIN#### // -// Author(s): julians -// Contact(s): julians +// Author(s): julians, jld +// Contact(s): julians, jld // Date: 2000/08/24 // Version: $Id: configtree.cpp,v 1.8 2001/04/24 14:39:13 julians Exp $ // Purpose: // Description: Implementation file for ecConfigTreeCtrl // Requires: @@ -434,11 +434,11 @@ static wxColour disabledColour = wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT); #else static wxColour normalColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOWTEXT); static wxColour disabledColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_GRAYTEXT); #endif - dc.SetTextForeground( (item->GetActive() && (item->GetConfigType() != ecPackage)) ? normalColour : disabledColour ); + dc.SetTextForeground( (item->GetModifiable() && (item->GetConfigType() != ecPackage)) ? normalColour : disabledColour ); int textW, textH; dc.GetTextExtent(text, & textW, & textH); int x = 2; Index: standalone/wxwin/conflictwin.cpp =================================================================== RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/conflictwin.cpp,v retrieving revision 1.2 diff -u -5 -r1.2 conflictwin.cpp --- standalone/wxwin/conflictwin.cpp 29 Jan 2009 17:47:50 -0000 1.2 +++ standalone/wxwin/conflictwin.cpp 16 Feb 2009 09:11:04 -0000 @@ -1,9 +1,9 @@ // ####ECOSHOSTGPLCOPYRIGHTBEGIN#### // ------------------------------------------- // This file is part of the eCos host tools. -// Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. +// Copyright (C) 1998, 1999, 2000, 2009 Free Software Foundation, Inc. // // 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 or (at your option) any // later version. @@ -22,11 +22,11 @@ // configtree.cpp : // //=========================================================================== //#####DESCRIPTIONBEGIN#### // -// Author(s): julians +// Author(s): julians, jld // Contact(s): julians // Date: 2000/09/04 // Version: $Id: conflictwin.cpp,v 1.3 2001/04/24 14:39:13 julians Exp $ // Purpose: // Description: Implementation file for ecConflictListCtrl @@ -87,11 +87,11 @@ SetFont(wxGetApp().GetSettings().GetWindowSettings().GetFont(wxT("Conflicts"))); } InsertColumn(0, "Item", wxLIST_FORMAT_LEFT, 200); InsertColumn(1, "Conflict", wxLIST_FORMAT_LEFT, 80); - InsertColumn(2, "Property", wxLIST_FORMAT_LEFT, 200); + InsertColumn(2, "Property", wxLIST_FORMAT_LEFT, 100); m_contextMenu = new wxMenu; m_contextMenu->Append(ecID_WHATS_THIS, _("&What's This?")); m_contextMenu->AppendSeparator(); m_contextMenu->Append(ecID_LOCATE_ITEM, _("&Locate")); @@ -224,10 +224,13 @@ void ecConflictListCtrl::AddConflicts (const std::list& conflicts) { for (std::list::const_iterator conf_i=conflicts.begin (); conf_i != conflicts.end (); conf_i++) { AddConflict(*conf_i); } + SetColumnWidth(2, wxLIST_AUTOSIZE); // resize the property column for the longest item + if (GetColumnWidth(2) < 100) // but at least wide enough for the column heading + SetColumnWidth(2, 100); } ecConfigItem *ecConflictListCtrl::AssociatedItem(int nRow,int nCol) { const CdlConflict conflict = (CdlConflict) GetItemData (nRow); Index: standalone/wxwin/filename.cpp =================================================================== RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/filename.cpp,v retrieving revision 1.10 diff -u -5 -r1.10 filename.cpp --- standalone/wxwin/filename.cpp 29 Jan 2009 17:47:50 -0000 1.10 +++ standalone/wxwin/filename.cpp 16 Feb 2009 09:11:04 -0000 @@ -1,9 +1,9 @@ // ####ECOSHOSTGPLCOPYRIGHTBEGIN#### // ------------------------------------------- // This file is part of the eCos host tools. -// Copyright (C) 1998, 1999, 2000, 2003, 2005 Free Software Foundation, Inc. +// Copyright (C) 1998, 1999, 2000, 2003, 2005, 2009 Free Software Foundation, Inc. // // 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 or (at your option) any // later version. @@ -71,11 +71,16 @@ #include #define wxTChar wxT +#ifdef __WXMSW__ +const wxChar ecFileName::cSep=wxT('\\'); +#else const wxChar ecFileName::cSep=wxFILE_SEP_PATH; +#endif + ecFileName::ecFileName(const wxChar* psz1,const wxChar* psz2): wxString(psz1) { Normalize(); Index: standalone/wxwin/mainwin.cpp =================================================================== RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/mainwin.cpp,v retrieving revision 1.25 diff -u -5 -r1.25 mainwin.cpp --- standalone/wxwin/mainwin.cpp 29 Jan 2009 17:47:50 -0000 1.25 +++ standalone/wxwin/mainwin.cpp 16 Feb 2009 09:11:07 -0000 @@ -1,9 +1,9 @@ // ####ECOSHOSTGPLCOPYRIGHTBEGIN#### // ------------------------------------------- // This file is part of the eCos host tools. -// Copyright (C) 1998, 1999, 2000, 2003, 2004, 2005, 2006, 2008 Free Software Foundation, Inc. +// Copyright (C) 1998, 1999, 2000, 2003, 2004, 2005, 2006, 2008, 2009 Free Software Foundation, Inc. // // 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 or (at your option) any // later version. @@ -402,11 +402,11 @@ #else CreateStatusBar(4, 0); #endif int* widths = new int[4]; - widths[0] = -1; widths[1] = 100; widths[2] = 40; widths[3] = 80; + widths[0] = -1; widths[1] = 100; widths[2] = 40; widths[3] = 100; SetStatusWidths(4, widths); delete[] widths; SetStatusText(_("No conflicts"), ecFailRulePane); SetStatusText(_("Ready"), ecStatusPane); @@ -569,11 +569,11 @@ // dialog.ShowModal(); wxString msg; int iTclVerMajor, iTclVerMinor, iTclVerPatchLevel; Tcl_GetVersion (&iTclVerMajor, &iTclVerMinor, &iTclVerPatchLevel, NULL); msg.Printf("eCos Configuration Tool %s (%s %s)\n\n" - "Copyright (c) Free Software Foundation, Inc. 1998-2008\n\n" + "Copyright (c) Free Software Foundation, Inc. 1998-2009\n\n" "Using %s %s and Tcl %d.%d.%d", ecCONFIGURATION_TOOL_VERSION, __DATE__, __TIME__, wxPlatformInfo::Get().GetPortIdName().c_str(), wxVERSION_NUM_DOT_STRING, iTclVerMajor, iTclVerMinor, iTclVerPatchLevel); wxMessageBox(msg, _("About eCos Configuration Tool"), wxICON_INFORMATION | wxOK); Index: standalone/wxwin/propertywin.cpp =================================================================== RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/propertywin.cpp,v retrieving revision 1.3 diff -u -5 -r1.3 propertywin.cpp --- standalone/wxwin/propertywin.cpp 29 Jan 2009 17:47:50 -0000 1.3 +++ standalone/wxwin/propertywin.cpp 16 Feb 2009 09:11:07 -0000 @@ -1,9 +1,9 @@ // ####ECOSHOSTGPLCOPYRIGHTBEGIN#### // ------------------------------------------- // This file is part of the eCos host tools. -// Copyright (C) 1998, 1999, 2000, 2008 Free Software Foundation, Inc. +// Copyright (C) 1998, 1999, 2000, 2008, 2009 Free Software Foundation, Inc. // // 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 or (at your option) any // later version. @@ -22,11 +22,11 @@ // propertywin.cpp : // //=========================================================================== //#####DESCRIPTIONBEGIN#### // -// Author(s): julians +// Author(s): julians, jld // Contact(s): julians // Date: 2000/09/04 // Version: $Id: propertywin.cpp,v 1.7 2001/04/24 14:39:13 julians Exp $ // Purpose: // Description: Implementation file for ecPropertyListCtrl @@ -185,11 +185,11 @@ } void ecPropertyListCtrl::AddColumns() { InsertColumn(0, "Property", wxLIST_FORMAT_LEFT, 100); - InsertColumn(1, "Value", wxLIST_FORMAT_LEFT, 300); + InsertColumn(1, "Value", wxLIST_FORMAT_LEFT, 100); } void ecPropertyListCtrl::Fill(ecConfigItem *pti) { if(NULL==pti){ @@ -317,10 +317,14 @@ m_f[1]=double(w)/double(rect.Width()); SetColumnWidth(1,w); #endif } + SetColumnWidth(1, wxLIST_AUTOSIZE); // resize the value column for the longest item + if (GetColumnWidth(1) < 100) // but at least wide enough for the column heading + SetColumnWidth(1, 100); + Refresh(); } bool ecPropertyListCtrl::PropertyInConflictsList (CdlProperty property, const std::list & conflicts) {