Bug #2785557 unproper folder

Display language list correctly after opening a file
Moved project file because we used the absolute path
Removed a auto generated file
This commit is contained in:
Zane U. Ji 2012-08-03 23:21:10 +08:00
parent 4527ffba1b
commit 4081c8b9de
8 changed files with 12 additions and 8633 deletions

8527
libtool

File diff suppressed because it is too large Load Diff

View File

@ -12,7 +12,7 @@
</extensions> </extensions>
</storageModule> </storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0"> <storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.exe.debug.747771716" name="Debug" parent="cdt.managedbuild.config.gnu.mingw.exe.debug" prebuildStep="windres.exe -IE:/wxWidgets/include -i../src/xmlcopyeditor.rc -Ocoff -osrc/xmlcopyeditor.res"> <configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.exe.debug.747771716" name="Debug" parent="cdt.managedbuild.config.gnu.mingw.exe.debug" prebuildStep="windres.exe ${RCDEFS} ${RCINCS} -I${WXWIDGETS}/include -i../xmlcopyeditor.rc -Ocoff -oxmlcopyeditor.res">
<folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.debug.747771716." name="/" resourcePath=""> <folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.debug.747771716." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.mingw.exe.debug.1964333246" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.exe.debug"> <toolChain id="cdt.managedbuild.toolchain.gnu.mingw.exe.debug.1964333246" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.exe.debug">
<targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.exe.debug.1899344235" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.exe.debug"/> <targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.exe.debug.1899344235" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.exe.debug"/>
@ -85,7 +85,7 @@
<listOptionValue builtIn="false" value="${WXWIDGETS}\lib\gcc_lib"/> <listOptionValue builtIn="false" value="${WXWIDGETS}\lib\gcc_lib"/>
</option> </option>
<option id="gnu.cpp.link.option.userobjs.598298270" name="Other objects" superClass="gnu.cpp.link.option.userobjs" valueType="userObjs"> <option id="gnu.cpp.link.option.userobjs.598298270" name="Other objects" superClass="gnu.cpp.link.option.userobjs" valueType="userObjs">
<listOptionValue builtIn="false" value="${ConfigName}/src/xmlcopyeditor.res"/> <listOptionValue builtIn="false" value="${ConfigName}/xmlcopyeditor.res"/>
</option> </option>
<option id="gnu.cpp.link.option.flags.1824716786" name="Linker flags" superClass="gnu.cpp.link.option.flags" value="-mwindows" valueType="string"/> <option id="gnu.cpp.link.option.flags.1824716786" name="Linker flags" superClass="gnu.cpp.link.option.flags" value="-mwindows" valueType="string"/>
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.405462048" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input"> <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.405462048" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
@ -110,7 +110,7 @@
</extensions> </extensions>
</storageModule> </storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0"> <storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.exe.release.710071756" name="Release" parent="cdt.managedbuild.config.gnu.mingw.exe.release" prebuildStep="windres.exe -IE:/wxWidgets/include -i../src/xmlcopyeditor.rc -Ocoff -osrc/xmlcopyeditor.res"> <configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.exe.release.710071756" name="Release" parent="cdt.managedbuild.config.gnu.mingw.exe.release" prebuildStep="windres.exe ${RCDEFS} ${RCINCS} -I${WXWIDGETS}/include -i../xmlcopyeditor.rc -Ocoff -oxmlcopyeditor.res">
<folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.release.710071756." name="/" resourcePath=""> <folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.release.710071756." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.mingw.exe.release.1386364382" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.exe.release"> <toolChain id="cdt.managedbuild.toolchain.gnu.mingw.exe.release.1386364382" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.exe.release">
<targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.exe.release.1941985969" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.exe.release"/> <targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.exe.release.1941985969" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.exe.release"/>
@ -183,7 +183,7 @@
<listOptionValue builtIn="false" value="${WXWIDGETS}\lib\gcc_lib"/> <listOptionValue builtIn="false" value="${WXWIDGETS}\lib\gcc_lib"/>
</option> </option>
<option id="gnu.cpp.link.option.userobjs.30870315" name="Other objects" superClass="gnu.cpp.link.option.userobjs" valueType="userObjs"> <option id="gnu.cpp.link.option.userobjs.30870315" name="Other objects" superClass="gnu.cpp.link.option.userobjs" valueType="userObjs">
<listOptionValue builtIn="false" value="${ConfigName}/src/xmlcopyeditor.res"/> <listOptionValue builtIn="false" value="${ConfigName}/xmlcopyeditor.res"/>
</option> </option>
<option id="gnu.cpp.link.option.flags.1247614174" name="Linker flags" superClass="gnu.cpp.link.option.flags" value="-mwindows" valueType="string"/> <option id="gnu.cpp.link.option.flags.1247614174" name="Linker flags" superClass="gnu.cpp.link.option.flags" value="-mwindows" valueType="string"/>
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1542313773" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input"> <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1542313773" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">

View File

@ -21,7 +21,7 @@ xmlcopyeditor_SOURCES = xmlcopyeditor.cpp associatedialog.cpp casehandler.cpp \
xmlassociatexsl.cpp xmlctrl.cpp xmldoc.cpp xmlencodinghandler.cpp xmlfilterreader.cpp \ xmlassociatexsl.cpp xmlctrl.cpp xmldoc.cpp xmlencodinghandler.cpp xmlfilterreader.cpp \
xmlpromptgenerator.cpp xmlrulereader.cpp xmlschemalocator.cpp xmlutf8reader.cpp xsllocator.cpp \ xmlpromptgenerator.cpp xmlrulereader.cpp xmlschemalocator.cpp xmlutf8reader.cpp xsllocator.cpp \
wrapexpat.cpp mypropertysheet.cpp rule.cpp housestylewriter.cpp myipc.cpp aboutdialog.cpp pathresolver.cpp mynotebook.cpp \ wrapexpat.cpp mypropertysheet.cpp rule.cpp housestylewriter.cpp myipc.cpp aboutdialog.cpp pathresolver.cpp mynotebook.cpp \
insertpanel.cpp xmlwordcount.cpp getword.cpp locationpanel.cpp catalogresolver.cpp getlinuxappdir.cpp \ insertpanel.cpp xmlwordcount.cpp getword.cpp locationpanel.cpp catalogresolver.cpp \
xmlparseschemans.cpp xmlshallowvalidator.cpp wrapxerces.cpp \ xmlparseschemans.cpp xmlshallowvalidator.cpp wrapxerces.cpp \
findreplacepanel.cpp commandpanel.cpp xercescatalogresolver.cpp \ findreplacepanel.cpp commandpanel.cpp xercescatalogresolver.cpp \
binaryfile.cpp xmlencodingspy.cpp wrapaspell.cpp validationthread.cpp \ binaryfile.cpp xmlencodingspy.cpp wrapaspell.cpp validationthread.cpp \

View File

@ -70,7 +70,7 @@ am_xmlcopyeditor_OBJECTS = xmlcopyeditor.$(OBJEXT) \
mynotebook.$(OBJEXT) insertpanel.$(OBJEXT) \ mynotebook.$(OBJEXT) insertpanel.$(OBJEXT) \
xmlwordcount.$(OBJEXT) getword.$(OBJEXT) \ xmlwordcount.$(OBJEXT) getword.$(OBJEXT) \
locationpanel.$(OBJEXT) catalogresolver.$(OBJEXT) \ locationpanel.$(OBJEXT) catalogresolver.$(OBJEXT) \
getlinuxappdir.$(OBJEXT) xmlparseschemans.$(OBJEXT) \ xmlparseschemans.$(OBJEXT) \
xmlshallowvalidator.$(OBJEXT) wrapxerces.$(OBJEXT) \ xmlshallowvalidator.$(OBJEXT) wrapxerces.$(OBJEXT) \
findreplacepanel.$(OBJEXT) commandpanel.$(OBJEXT) \ findreplacepanel.$(OBJEXT) commandpanel.$(OBJEXT) \
xercescatalogresolver.$(OBJEXT) binaryfile.$(OBJEXT) \ xercescatalogresolver.$(OBJEXT) binaryfile.$(OBJEXT) \
@ -263,7 +263,7 @@ xmlcopyeditor_SOURCES = xmlcopyeditor.cpp associatedialog.cpp casehandler.cpp \
xmlassociatexsl.cpp xmlctrl.cpp xmldoc.cpp xmlencodinghandler.cpp xmlfilterreader.cpp \ xmlassociatexsl.cpp xmlctrl.cpp xmldoc.cpp xmlencodinghandler.cpp xmlfilterreader.cpp \
xmlpromptgenerator.cpp xmlrulereader.cpp xmlschemalocator.cpp xmlutf8reader.cpp xsllocator.cpp \ xmlpromptgenerator.cpp xmlrulereader.cpp xmlschemalocator.cpp xmlutf8reader.cpp xsllocator.cpp \
wrapexpat.cpp mypropertysheet.cpp rule.cpp housestylewriter.cpp myipc.cpp aboutdialog.cpp pathresolver.cpp mynotebook.cpp \ wrapexpat.cpp mypropertysheet.cpp rule.cpp housestylewriter.cpp myipc.cpp aboutdialog.cpp pathresolver.cpp mynotebook.cpp \
insertpanel.cpp xmlwordcount.cpp getword.cpp locationpanel.cpp catalogresolver.cpp getlinuxappdir.cpp \ insertpanel.cpp xmlwordcount.cpp getword.cpp locationpanel.cpp catalogresolver.cpp \
xmlparseschemans.cpp xmlshallowvalidator.cpp wrapxerces.cpp \ xmlparseschemans.cpp xmlshallowvalidator.cpp wrapxerces.cpp \
findreplacepanel.cpp commandpanel.cpp xercescatalogresolver.cpp \ findreplacepanel.cpp commandpanel.cpp xercescatalogresolver.cpp \
binaryfile.cpp xmlencodingspy.cpp wrapaspell.cpp validationthread.cpp \ binaryfile.cpp xmlencodingspy.cpp wrapaspell.cpp validationthread.cpp \
@ -414,7 +414,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/contexthandler.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/contexthandler.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exportdialog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exportdialog.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findreplacepanel.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findreplacepanel.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getlinuxappdir.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getword.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getword.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/globalreplacedialog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/globalreplacedialog.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/housestyle.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/housestyle.Po@am__quote@

View File

@ -1,46 +0,0 @@
/*
* Copyright 2005-2007 Gerald Schmidt.
*
* This file is part of Xml Copy Editor.
*
* Xml Copy Editor 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; version 2 of the License.
*
* Xml Copy Editor 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 Xml Copy Editor; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "getlinuxappdir.h"
#include <wx/stdpaths.h>
//#include <wx/filename.h>
wxString GetLinuxAppDir::run()
{
wxStandardPaths *paths = ( wxStandardPaths *) &wxStandardPaths::Get();
return paths->GetDataDir();
/*
wxString s;
const int stringArrayLen = 2;
wxString stringArray[stringArrayLen];
stringArray[0] = _T ( "/usr/share/xmlcopyeditor" );
stringArray[1] = _T ( "/usr/local/share/xmlcopyeditor" );
for ( int i = 0; i < stringArrayLen; i++ )
{
s = stringArray[i];
if ( wxFileName::DirExists ( s ) )
break;
}
if ( s.empty() )
s = wxGetCwd();
return s;
*/
}

View File

@ -1,31 +0,0 @@
/*
* Copyright 2005-2007 Gerald Schmidt.
*
* This file is part of Xml Copy Editor.
*
* Xml Copy Editor 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; version 2 of the License.
*
* Xml Copy Editor 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 Xml Copy Editor; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef GET_LINUX_APP_DIR
#define GET_LINUX_APP_DIR
#include <wx/wx.h>
class GetLinuxAppDir
{
public:
static wxString run();
};
#endif

View File

@ -48,7 +48,6 @@
#include "insertpanel.h" #include "insertpanel.h"
#include "xmlwordcount.h" #include "xmlwordcount.h"
#include "mynotebook.h" #include "mynotebook.h"
#include "getlinuxappdir.h"
#include "commandpanel.h" #include "commandpanel.h"
#include "binaryfile.h" #include "binaryfile.h"
#include "exportdialog.h" #include "exportdialog.h"
@ -58,6 +57,7 @@
#include <wx/artprov.h> #include <wx/artprov.h>
#include <wx/stockitem.h> #include <wx/stockitem.h>
#include <iconv.h> #include <iconv.h>
#include <wx/stdpaths.h>
#define ngettext wxGetTranslation #define ngettext wxGetTranslation
@ -292,12 +292,9 @@ MyApp::MyApp() : checker ( NULL ), server ( NULL ), connection ( NULL ),
wxLocale::AddCatalogLookupPathPrefix ( wxT ( "." ) ); wxLocale::AddCatalogLookupPathPrefix ( wxT ( "." ) );
wxLocale::AddCatalogLookupPathPrefix ( wxT ( ".." ) ); wxLocale::AddCatalogLookupPathPrefix ( wxT ( ".." ) );
#ifndef __WXMSW__ wxString poDir = wxStandardPaths::Get().GetDataDir() +
wxString poDir = GetLinuxAppDir::run() + wxFileName::GetPathSeparator() + _T ( "po" ) + wxFileName::GetPathSeparator(); wxFileName::GetPathSeparator() + _T ( "po" ) + wxFileName::GetPathSeparator();
wxLocale::AddCatalogLookupPathPrefix ( poDir ); wxLocale::AddCatalogLookupPathPrefix ( poDir );
#else
wxLocale::AddCatalogLookupPathPrefix ( wxT ( "po" ) );
#endif
if ( !myLocale.AddCatalog ( _T ( "messages" ) ) ) if ( !myLocale.AddCatalog ( _T ( "messages" ) ) )
; ;
@ -643,16 +640,7 @@ MyFrame::MyFrame (
config->Read ( _T ( "exportFullDaisy" ), (long)true ); config->Read ( _T ( "exportFullDaisy" ), (long)true );
applicationDir = applicationDir =
config->Read ( _T ( "applicationDir" ), wxEmptyString ); config->Read ( _T ( "applicationDir" ), wxStandardPaths::Get().GetDataDir() );
if ( applicationDir.empty() )
{
#ifdef __WXMSW__
applicationDir =
config->Read ( _T ( "InstallPath" ), wxGetCwd() );
#else
applicationDir = GetLinuxAppDir::run();
#endif
}
browserCommand = browserCommand =
config->Read ( _T ( "browserCommand" ), wxEmptyString ); config->Read ( _T ( "browserCommand" ), wxEmptyString );
@ -732,11 +720,7 @@ MyFrame::MyFrame (
properties.wrap = properties.whitespaceVisible = false; properties.wrap = properties.whitespaceVisible = false;
properties.zoom = 0; properties.zoom = 0;
properties.colorScheme = COLOR_SCHEME_DEFAULT; properties.colorScheme = COLOR_SCHEME_DEFAULT;
#ifdef __WXMSW__ applicationDir = wxStandardPaths::Get().GetDataDir();
applicationDir = wxGetCwd();
#else
applicationDir = GetLinuxAppDir::run();//getLinuxApplicationDir();
#endif
ruleSetPreset = _ ( "Default style" ); ruleSetPreset = _ ( "Default style" );
dictionaryPreset = _ ( "en_US" ); dictionaryPreset = _ ( "en_US" );
filterPreset = _ ( "No filter" ); filterPreset = _ ( "No filter" );