diff --git a/CMakeLists.txt b/CMakeLists.txt index b50214f..80252ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,6 +82,7 @@ target_include_directories(${PROJECT_NAME} PUBLIC src) if(APPLE) set_target_properties(${PROJECT_NAME} PROPERTIES + MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/build/Info.plist.in RESOURCE "build/wxmac.icns" MACOSX_BUNDLE_ICON_FILE wxmac.icns MACOSX_BUNDLE_COPYRIGHT "Copyright wxWidgets" diff --git a/Makefile.in b/Makefile.in deleted file mode 100644 index 982c28f..0000000 --- a/Makefile.in +++ /dev/null @@ -1,277 +0,0 @@ -# ========================================================================= -# This makefile was generated by -# Bakefile 0.2.9 (http://www.bakefile.org) -# Do not modify, all changes will be overwritten! -# ========================================================================= - - -@MAKE_SET@ - -prefix = @prefix@ -exec_prefix = @exec_prefix@ -datarootdir = @datarootdir@ -INSTALL = @INSTALL@ -LIBEXT = @LIBEXT@ -LIBPREFIX = @LIBPREFIX@ -EXEEXT = @EXEEXT@ -SETFILE = @SETFILE@ -NM = @NM@ -BK_DEPS = @BK_DEPS@ -srcdir = @srcdir@ -LIBS = @LIBS@ -LDFLAGS_GUI = @LDFLAGS_GUI@ -AR = @AR@ -AROPTIONS = @AROPTIONS@ -RANLIB = @RANLIB@ -CC = @CC@ -CXX = @CXX@ -CFLAGS = @CFLAGS@ -CXXFLAGS = @CXXFLAGS@ -CPPFLAGS = @CPPFLAGS@ -LDFLAGS = @LDFLAGS@ -WX_VERSION = @WX_VERSION@ -WX_CFLAGS = @WX_CFLAGS@ -WX_CXXFLAGS = @WX_CXXFLAGS@ -WX_LIBS = @WX_LIBS@ -WX_RESCOMP = @WX_RESCOMP@ - -### Variables: ### - -DESTDIR = -WXSQLITE_CFLAGS = -DNOPCH -DSQLITE_CORE -DSQLITE_ENABLE_FTS3 \ - -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_HAS_CODEC \ - -DSQLITE_ENABLE_EXTFUNC -DSQLITE_ENABLE_COLUMN_METADATA \ - -DSQLITE_ENABLE_JSON1 -DSQLITE_USER_AUTHENTICATION \ - -DHAVE_ACOSH -DHAVE_ASINH -DHAVE_ATANH -DHAVE_ISBLANK \ - -DWXSQLITE3_HAVE_CODEC -DWXSQLITE3_HAVE_METADATA \ - -DWXSQLITE3_USER_AUTHENTICATION \ - -I$(srcdir)/3rd/wxsqlite3/sqlite3/secure/src \ - -I$(srcdir)/3rd/wxsqlite3/include $(WX_CFLAGS) $(CPPFLAGS) $(CFLAGS) -WXSQLITE_CXXFLAGS = -DNOPCH -DSQLITE_CORE -DSQLITE_ENABLE_FTS3 \ - -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_HAS_CODEC \ - -DSQLITE_ENABLE_EXTFUNC -DSQLITE_ENABLE_COLUMN_METADATA \ - -DSQLITE_ENABLE_JSON1 -DSQLITE_USER_AUTHENTICATION \ - -DHAVE_ACOSH -DHAVE_ASINH -DHAVE_ATANH -DHAVE_ISBLANK \ - -DWXSQLITE3_HAVE_CODEC -DWXSQLITE3_HAVE_METADATA \ - -DWXSQLITE3_USER_AUTHENTICATION \ - -I$(srcdir)/3rd/wxsqlite3/sqlite3/secure/src \ - -I$(srcdir)/3rd/wxsqlite3/include $(WX_CXXFLAGS) $(CPPFLAGS) $(CXXFLAGS) -WXSQLITE_OBJECTS = \ - wxsqlite_wxsqlite3.o \ - wxsqlite_sqlite3secure.o -WXSQLITEPLUS_CXXFLAGS = -I$(srcdir)/3rd/wxsqlite3/sqlite3/secure/src \ - -I$(srcdir)/3rd/wxsqlite3/include $(WX_CXXFLAGS) $(CPPFLAGS) $(CXXFLAGS) -WXSQLITEPLUS_OBJECTS = \ - wxsqliteplus_aboutdlg.o \ - wxsqliteplus_addcolumn.o \ - wxsqliteplus_attachdbdlg.o \ - wxsqliteplus_backrestdlg.o \ - wxsqliteplus_blobdlg.o \ - wxsqliteplus_createindex.o \ - wxsqliteplus_createtable.o \ - wxsqliteplus_createtrigger.o \ - wxsqliteplus_createview.o \ - wxsqliteplus_dbbook.o \ - wxsqliteplus_describedlg.o \ - wxsqliteplus_detachdbdlg.o \ - wxsqliteplus_dropobject.o \ - wxsqliteplus_encrypkeydlg.o \ - wxsqliteplus_filterdlg.o \ - wxsqliteplus_indexbook.o \ - wxsqliteplus_paneldata.o \ - wxsqliteplus_preferences.o \ - wxsqliteplus_sortdlg.o \ - wxsqliteplus_specgrid.o \ - wxsqliteplus_sqlbook.o \ - wxsqliteplus_sqleditor.o \ - wxsqliteplus_sqlhistory.o \ - wxsqliteplus_sqlite3table.o \ - wxsqliteplus_sqliteplusframe.o \ - wxsqliteplus_sqlparameters.o \ - wxsqliteplus_tablebook.o \ - wxsqliteplus_triggerbook.o \ - wxsqliteplus_triggerparser.o \ - wxsqliteplus_viewbook.o \ - wxsqliteplus_wxsqliteplusapp.o \ - $(__wxsqliteplus___win32rc) - -### Conditionally set variables: ### - -@COND_DEPS_TRACKING_0@CCC = $(CC) -@COND_DEPS_TRACKING_1@CCC = $(BK_DEPS) $(CC) -@COND_DEPS_TRACKING_0@CXXC = $(CXX) -@COND_DEPS_TRACKING_1@CXXC = $(BK_DEPS) $(CXX) -@COND_PLATFORM_MAC_0@__wxsqliteplus___mac_setfilecmd = @true -@COND_PLATFORM_MAC_1@__wxsqliteplus___mac_setfilecmd = \ -@COND_PLATFORM_MAC_1@ $(SETFILE) -t APPL wxsqliteplus$(EXEEXT) -COND_PLATFORM_OS2_1___wxsqliteplus___os2_emxbindcmd = $(NM) \ - wxsqliteplus$(EXEEXT) | if grep -q pmwin.763 ; then emxbind -ep \ - wxsqliteplus$(EXEEXT) ; fi -@COND_PLATFORM_OS2_1@__wxsqliteplus___os2_emxbindcmd = $(COND_PLATFORM_OS2_1___wxsqliteplus___os2_emxbindcmd) -@COND_PLATFORM_WIN32_1@__wxsqliteplus___win32rc = \ -@COND_PLATFORM_WIN32_1@ wxsqliteplus_wxsqliteplus_rc.o -@COND_PLATFORM_MACOSX_1@__wxsqliteplus_app_Contents_PkgInfo___depname \ -@COND_PLATFORM_MACOSX_1@ = wxsqliteplus.app/Contents/PkgInfo -@COND_PLATFORM_MACOSX_1@__wxsqliteplus_bundle___depname \ -@COND_PLATFORM_MACOSX_1@ = wxsqliteplus_bundle - -### Targets: ### - -all: $(LIBPREFIX)wxsqlite$(LIBEXT) wxsqliteplus$(EXEEXT) $(__wxsqliteplus_bundle___depname) - -install: - -uninstall: - -install-strip: install - -clean: - rm -rf ./.deps ./.pch - rm -f ./*.o - rm -f $(LIBPREFIX)wxsqlite$(LIBEXT) - rm -f wxsqliteplus$(EXEEXT) - rm -rf wxsqliteplus.app - -distclean: clean - rm -f config.cache config.log config.status bk-deps bk-make-pch shared-ld-sh Makefile - -$(LIBPREFIX)wxsqlite$(LIBEXT): $(WXSQLITE_OBJECTS) - rm -f $@ - $(AR) $(AROPTIONS) $@ $(WXSQLITE_OBJECTS) - $(RANLIB) $@ - -wxsqliteplus$(EXEEXT): $(WXSQLITEPLUS_OBJECTS) $(LIBPREFIX)wxsqlite$(LIBEXT) $(__wxsqliteplus___win32rc) - $(CXX) -o $@ $(WXSQLITEPLUS_OBJECTS) -L. $(LDFLAGS_GUI) $(LDFLAGS) -lwxsqlite $(WX_LIBS) $(LIBS) - - $(__wxsqliteplus___mac_setfilecmd) - $(__wxsqliteplus___os2_emxbindcmd) - -@COND_PLATFORM_MACOSX_1@wxsqliteplus.app/Contents/PkgInfo: wxsqliteplus$(EXEEXT) $(srcdir)/build/Info.plist.in $(srcdir)/build/wxmac.icns -@COND_PLATFORM_MACOSX_1@ mkdir -p wxsqliteplus.app/Contents -@COND_PLATFORM_MACOSX_1@ mkdir -p wxsqliteplus.app/Contents/MacOS -@COND_PLATFORM_MACOSX_1@ mkdir -p wxsqliteplus.app/Contents/Resources -@COND_PLATFORM_MACOSX_1@ -@COND_PLATFORM_MACOSX_1@ -@COND_PLATFORM_MACOSX_1@ sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \ -@COND_PLATFORM_MACOSX_1@ -e "s/EXECUTABLE/wxsqliteplus/" \ -@COND_PLATFORM_MACOSX_1@ -e "s/VERSION/$(WX_VERSION)/" \ -@COND_PLATFORM_MACOSX_1@ $(srcdir)/build/Info.plist.in > wxsqliteplus.app/Contents/Info.plist -@COND_PLATFORM_MACOSX_1@ -@COND_PLATFORM_MACOSX_1@ -@COND_PLATFORM_MACOSX_1@ echo -n "APPL????" >wxsqliteplus.app/Contents/PkgInfo -@COND_PLATFORM_MACOSX_1@ -@COND_PLATFORM_MACOSX_1@ -@COND_PLATFORM_MACOSX_1@ mv wxsqliteplus$(EXEEXT) wxsqliteplus.app/Contents/MacOS/wxsqliteplus -@COND_PLATFORM_MACOSX_1@ -@COND_PLATFORM_MACOSX_1@ -@COND_PLATFORM_MACOSX_1@ cp -f $(srcdir)/build/wxmac.icns wxsqliteplus.app/Contents/Resources/wxmac.icns - -@COND_PLATFORM_MACOSX_1@wxsqliteplus_bundle: $(__wxsqliteplus_app_Contents_PkgInfo___depname) - -wxsqlite_wxsqlite3.o: $(srcdir)/3rd/wxsqlite3/src/wxsqlite3.cpp - $(CXXC) -c -o $@ $(WXSQLITE_CXXFLAGS) $(srcdir)/3rd/wxsqlite3/src/wxsqlite3.cpp - -wxsqlite_sqlite3secure.o: $(srcdir)/3rd/wxsqlite3/sqlite3/secure/src/sqlite3secure.c - $(CCC) -c -o $@ $(WXSQLITE_CFLAGS) $(srcdir)/3rd/wxsqlite3/sqlite3/secure/src/sqlite3secure.c - -wxsqliteplus_aboutdlg.o: $(srcdir)/src/aboutdlg.cpp - $(CXXC) -c -o $@ $(WXSQLITEPLUS_CXXFLAGS) $(srcdir)/src/aboutdlg.cpp - -wxsqliteplus_addcolumn.o: $(srcdir)/src/addcolumn.cpp - $(CXXC) -c -o $@ $(WXSQLITEPLUS_CXXFLAGS) $(srcdir)/src/addcolumn.cpp - -wxsqliteplus_attachdbdlg.o: $(srcdir)/src/attachdbdlg.cpp - $(CXXC) -c -o $@ $(WXSQLITEPLUS_CXXFLAGS) $(srcdir)/src/attachdbdlg.cpp - -wxsqliteplus_backrestdlg.o: $(srcdir)/src/backrestdlg.cpp - $(CXXC) -c -o $@ $(WXSQLITEPLUS_CXXFLAGS) $(srcdir)/src/backrestdlg.cpp - -wxsqliteplus_blobdlg.o: $(srcdir)/src/blobdlg.cpp - $(CXXC) -c -o $@ $(WXSQLITEPLUS_CXXFLAGS) $(srcdir)/src/blobdlg.cpp - -wxsqliteplus_createindex.o: $(srcdir)/src/createindex.cpp - $(CXXC) -c -o $@ $(WXSQLITEPLUS_CXXFLAGS) $(srcdir)/src/createindex.cpp - -wxsqliteplus_createtable.o: $(srcdir)/src/createtable.cpp - $(CXXC) -c -o $@ $(WXSQLITEPLUS_CXXFLAGS) $(srcdir)/src/createtable.cpp - -wxsqliteplus_createtrigger.o: $(srcdir)/src/createtrigger.cpp - $(CXXC) -c -o $@ $(WXSQLITEPLUS_CXXFLAGS) $(srcdir)/src/createtrigger.cpp - -wxsqliteplus_createview.o: $(srcdir)/src/createview.cpp - $(CXXC) -c -o $@ $(WXSQLITEPLUS_CXXFLAGS) $(srcdir)/src/createview.cpp - -wxsqliteplus_dbbook.o: $(srcdir)/src/dbbook.cpp - $(CXXC) -c -o $@ $(WXSQLITEPLUS_CXXFLAGS) $(srcdir)/src/dbbook.cpp - -wxsqliteplus_describedlg.o: $(srcdir)/src/describedlg.cpp - $(CXXC) -c -o $@ $(WXSQLITEPLUS_CXXFLAGS) $(srcdir)/src/describedlg.cpp - -wxsqliteplus_detachdbdlg.o: $(srcdir)/src/detachdbdlg.cpp - $(CXXC) -c -o $@ $(WXSQLITEPLUS_CXXFLAGS) $(srcdir)/src/detachdbdlg.cpp - -wxsqliteplus_dropobject.o: $(srcdir)/src/dropobject.cpp - $(CXXC) -c -o $@ $(WXSQLITEPLUS_CXXFLAGS) $(srcdir)/src/dropobject.cpp - -wxsqliteplus_encrypkeydlg.o: $(srcdir)/src/encrypkeydlg.cpp - $(CXXC) -c -o $@ $(WXSQLITEPLUS_CXXFLAGS) $(srcdir)/src/encrypkeydlg.cpp - -wxsqliteplus_filterdlg.o: $(srcdir)/src/filterdlg.cpp - $(CXXC) -c -o $@ $(WXSQLITEPLUS_CXXFLAGS) $(srcdir)/src/filterdlg.cpp - -wxsqliteplus_indexbook.o: $(srcdir)/src/indexbook.cpp - $(CXXC) -c -o $@ $(WXSQLITEPLUS_CXXFLAGS) $(srcdir)/src/indexbook.cpp - -wxsqliteplus_paneldata.o: $(srcdir)/src/paneldata.cpp - $(CXXC) -c -o $@ $(WXSQLITEPLUS_CXXFLAGS) $(srcdir)/src/paneldata.cpp - -wxsqliteplus_preferences.o: $(srcdir)/src/preferences.cpp - $(CXXC) -c -o $@ $(WXSQLITEPLUS_CXXFLAGS) $(srcdir)/src/preferences.cpp - -wxsqliteplus_sortdlg.o: $(srcdir)/src/sortdlg.cpp - $(CXXC) -c -o $@ $(WXSQLITEPLUS_CXXFLAGS) $(srcdir)/src/sortdlg.cpp - -wxsqliteplus_specgrid.o: $(srcdir)/src/specgrid.cpp - $(CXXC) -c -o $@ $(WXSQLITEPLUS_CXXFLAGS) $(srcdir)/src/specgrid.cpp - -wxsqliteplus_sqlbook.o: $(srcdir)/src/sqlbook.cpp - $(CXXC) -c -o $@ $(WXSQLITEPLUS_CXXFLAGS) $(srcdir)/src/sqlbook.cpp - -wxsqliteplus_sqleditor.o: $(srcdir)/src/sqleditor.cpp - $(CXXC) -c -o $@ $(WXSQLITEPLUS_CXXFLAGS) $(srcdir)/src/sqleditor.cpp - -wxsqliteplus_sqlhistory.o: $(srcdir)/src/sqlhistory.cpp - $(CXXC) -c -o $@ $(WXSQLITEPLUS_CXXFLAGS) $(srcdir)/src/sqlhistory.cpp - -wxsqliteplus_sqlite3table.o: $(srcdir)/src/sqlite3table.cpp - $(CXXC) -c -o $@ $(WXSQLITEPLUS_CXXFLAGS) $(srcdir)/src/sqlite3table.cpp - -wxsqliteplus_sqliteplusframe.o: $(srcdir)/src/sqliteplusframe.cpp - $(CXXC) -c -o $@ $(WXSQLITEPLUS_CXXFLAGS) $(srcdir)/src/sqliteplusframe.cpp - -wxsqliteplus_sqlparameters.o: $(srcdir)/src/sqlparameters.cpp - $(CXXC) -c -o $@ $(WXSQLITEPLUS_CXXFLAGS) $(srcdir)/src/sqlparameters.cpp - -wxsqliteplus_tablebook.o: $(srcdir)/src/tablebook.cpp - $(CXXC) -c -o $@ $(WXSQLITEPLUS_CXXFLAGS) $(srcdir)/src/tablebook.cpp - -wxsqliteplus_triggerbook.o: $(srcdir)/src/triggerbook.cpp - $(CXXC) -c -o $@ $(WXSQLITEPLUS_CXXFLAGS) $(srcdir)/src/triggerbook.cpp - -wxsqliteplus_triggerparser.o: $(srcdir)/src/triggerparser.cpp - $(CXXC) -c -o $@ $(WXSQLITEPLUS_CXXFLAGS) $(srcdir)/src/triggerparser.cpp - -wxsqliteplus_viewbook.o: $(srcdir)/src/viewbook.cpp - $(CXXC) -c -o $@ $(WXSQLITEPLUS_CXXFLAGS) $(srcdir)/src/viewbook.cpp - -wxsqliteplus_wxsqliteplusapp.o: $(srcdir)/src/wxsqliteplusapp.cpp - $(CXXC) -c -o $@ $(WXSQLITEPLUS_CXXFLAGS) $(srcdir)/src/wxsqliteplusapp.cpp - -wxsqliteplus_wxsqliteplus_rc.o: $(srcdir)/src/wxsqliteplus.rc - $(WX_RESCOMP) -i$< -o$@ --include-dir $(srcdir)/3rd/wxsqlite3/sqlite3/secure/src --include-dir $(srcdir)/3rd/wxsqlite3/include - - -# Include dependency info, if present: -@IF_GNU_MAKE@-include ./.deps/*.d - -.PHONY: all install uninstall clean distclean wxsqliteplus_bundle diff --git a/build/Info.plist.in b/build/Info.plist.in index de35d6d..992d189 100755 --- a/build/Info.plist.in +++ b/build/Info.plist.in @@ -1,36 +1,36 @@ - - + + - CFBundleInfoDictionaryVersion - 6.0 - CFBundleIdentifier - org.wxwindows.IDENTIFIER CFBundleDevelopmentRegion English CFBundleExecutable - EXECUTABLE + ${MACOSX_BUNDLE_EXECUTABLE_NAME} + CFBundleGetInfoString + ${MACOSX_BUNDLE_INFO_STRING} CFBundleIconFile - wxmac.icns + ${MACOSX_BUNDLE_ICON_FILE} + CFBundleIdentifier + ${MACOSX_BUNDLE_GUI_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleLongVersionString + ${MACOSX_BUNDLE_LONG_VERSION_STRING} CFBundleName - EXECUTABLE + ${MACOSX_BUNDLE_BUNDLE_NAME} CFBundlePackageType APPL + CFBundleShortVersionString + ${MACOSX_BUNDLE_SHORT_VERSION_STRING} CFBundleSignature ???? CFBundleVersion - VERSION - CFBundleShortVersionString - VERSION - CFBundleGetInfoString - EXECUTABLE version VERSION, (c) 2002-2006 wxWidgets - CFBundleLongVersionString - VERSION, (c) 2002-2006 wxWidgets - NSHumanReadableCopyright - Copyright 2002-2006 wxWidgets - LSRequiresCarbon - + ${MACOSX_BUNDLE_BUNDLE_VERSION} CSResourcesFileMapped + NSHighResolutionCapable + + NSHumanReadableCopyright + ${MACOSX_BUNDLE_COPYRIGHT} diff --git a/src/indexbook.cpp b/src/indexbook.cpp index b66a382..12bf906 100644 --- a/src/indexbook.cpp +++ b/src/indexbook.cpp @@ -114,12 +114,12 @@ void wxIndexBook::CreateControls() m_PageColumns->SetDefaultRowSize(25); m_PageColumns->SetColLabelSize(25); - wxBitmap m_PageColumnsBitmap(wxGetApp().GetBmp(ID_BMP_FIELD)); + wxBitmapBundle m_PageColumnsBitmap(wxGetApp().GetBmp(ID_BMP_FIELD)); noteBook->AddPage(m_PageColumns, _("Columns"), false, m_PageColumnsBitmap); m_PageDdl = new wxDDLEditor(noteBook, ID_PAGEDDL); - wxBitmap m_PageDdlBitmap(wxGetApp().GetBmp(ID_BMP_RUNSCRIPT)); + wxBitmapBundle m_PageDdlBitmap(wxGetApp().GetBmp(ID_BMP_RUNSCRIPT)); noteBook->AddPage(m_PageDdl, _("DDL"), false, m_PageDdlBitmap); bSizer->Add(noteBook, 1, wxGROW, 0); diff --git a/src/paneldata.cpp b/src/paneldata.cpp index 6f3bff3..f0391d5 100644 --- a/src/paneldata.cpp +++ b/src/paneldata.cpp @@ -109,13 +109,13 @@ void wxPanelData::CreateControls() wxToolBar* iToolBar1 = new wxToolBar(this, ID_DATATOOLBAR, wxDefaultPosition, wxDefaultSize, wxTB_FLAT|wxTB_HORIZONTAL|wxTB_NODIVIDER); - wxBitmap filterBmp(wxGetApp().GetBmp(ID_BMP_FILTER)); + wxBitmapBundle filterBmp(wxGetApp().GetBmp(ID_BMP_FILTER)); iToolBar1->AddTool(ID_MNU_FILTER, _("Filter"), filterBmp, BitmapDisabled, wxITEM_NORMAL, _("Filter"), _("Filter")); - wxBitmap sortBmp(wxGetApp().GetBmp(ID_BMP_SORT)); + wxBitmapBundle sortBmp(wxGetApp().GetBmp(ID_BMP_SORT)); iToolBar1->AddTool(ID_MNU_SORT, _("Sort"), sortBmp, BitmapDisabled, wxITEM_NORMAL, _("Sort"), _("Sort")); - wxBitmap refreshBmp(wxGetApp().GetBmp(ID_BMP_REFRESH)); + wxBitmapBundle refreshBmp(wxGetApp().GetBmp(ID_BMP_REFRESH)); iToolBar1->AddTool(ID_MNU_REFRESH, _("Refresh"), refreshBmp, BitmapDisabled, wxITEM_NORMAL, _("Refresh"), _("Refresh")); iToolBar1->AddSeparator(); diff --git a/src/sqlbook.cpp b/src/sqlbook.cpp index 5625db4..b6cb4bf 100644 --- a/src/sqlbook.cpp +++ b/src/sqlbook.cpp @@ -204,14 +204,14 @@ void wxSQLBook::CreateControls() m_DataResult->SetColLabelSize(25); m_DataResult->SetRowLabelSize(50); - wxBitmap m_DataResultBitmap(wxGetApp().GetBmp(ID_BMP_RUNSQL)); + wxBitmapBundle m_DataResultBitmap(wxGetApp().GetBmp(ID_BMP_RUNSQL)); m_ResultBook->AddPage(m_DataResult, _("Results"), false, m_DataResultBitmap); m_LogResult = new wxTextCtrl(m_ResultBook, ID_LOGRESULT, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY|wxTE_WORDWRAP); - wxBitmap m_LogResultBitmap(wxGetApp().GetBmp(ID_BMP_LOG)); + wxBitmapBundle m_LogResultBitmap(wxGetApp().GetBmp(ID_BMP_LOG)); m_ResultBook->AddPage(m_LogResult, _("Output"), false, m_LogResultBitmap); m_Explain = new wxSpecGrid(m_ResultBook, ID_GRIDEXPLAIN, wxDefaultPosition, @@ -222,7 +222,7 @@ void wxSQLBook::CreateControls() m_Explain->SetColLabelSize(25); m_Explain->SetRowLabelSize(50); - wxBitmap m_ExplainBitmap(wxGetApp().GetBmp(ID_BMP_EXPLAIN)); + wxBitmapBundle m_ExplainBitmap(wxGetApp().GetBmp(ID_BMP_EXPLAIN)); m_ResultBook->AddPage(m_Explain, _("Explain"), false, m_ExplainBitmap); GetAuiManager().AddPane(m_ResultBook, diff --git a/src/sqliteplusframe.cpp b/src/sqliteplusframe.cpp index 91369b7..72e3ef7 100644 --- a/src/sqliteplusframe.cpp +++ b/src/sqliteplusframe.cpp @@ -50,6 +50,7 @@ pour plus de détails. #include #include #include +#include /*---------------------------------------------------------------------------*/ #include "sqliteplusframe.h" #include "wxsqliteplusapp.h" @@ -274,23 +275,22 @@ void wxSQLitePlusFrame::Init() InitNodeParams(); - m_TreeImageList.Create(16, 16); - m_TreeImageList.Add(wxGetApp().GetBmp(ID_BMP_DATABASE)); - m_TreeImageList.Add(wxGetApp().GetBmp(ID_BMP_TABLES)); - m_TreeImageList.Add(wxGetApp().GetBmp(ID_BMP_VIEWS)); - m_TreeImageList.Add(wxGetApp().GetBmp(ID_BMP_INDEXES)); - m_TreeImageList.Add(wxGetApp().GetBmp(ID_BMP_TRIGGERS2)); - m_TreeImageList.Add(wxGetApp().GetBmp(ID_BMP_TABLE)); - m_TreeImageList.Add(wxGetApp().GetBmp(ID_BMP_TABLE_TMP)); - m_TreeImageList.Add(wxGetApp().GetBmp(ID_BMP_VIEW)); - m_TreeImageList.Add(wxGetApp().GetBmp(ID_BMP_VIEW_TMP)); - m_TreeImageList.Add(wxGetApp().GetBmp(ID_BMP_INDEXE)); - m_TreeImageList.Add(wxGetApp().GetBmp(ID_BMP_INDEXE_TMP)); - m_TreeImageList.Add(wxGetApp().GetBmp(ID_BMP_TRIGGER2)); - m_TreeImageList.Add(wxGetApp().GetBmp(ID_BMP_TRIGGER2_TMP)); - m_TreeImageList.Add(wxGetApp().GetBmp(ID_BMP_FIELD)); - // Accelerators + m_images.push_back(wxGetApp().GetBmp(ID_BMP_DATABASE)); + m_images.push_back(wxGetApp().GetBmp(ID_BMP_TABLES)); + m_images.push_back(wxGetApp().GetBmp(ID_BMP_VIEWS)); + m_images.push_back(wxGetApp().GetBmp(ID_BMP_INDEXES)); + m_images.push_back(wxGetApp().GetBmp(ID_BMP_TRIGGERS2)); + m_images.push_back(wxGetApp().GetBmp(ID_BMP_TABLE)); + m_images.push_back(wxGetApp().GetBmp(ID_BMP_TABLE_TMP)); + m_images.push_back(wxGetApp().GetBmp(ID_BMP_VIEW)); + m_images.push_back(wxGetApp().GetBmp(ID_BMP_VIEW_TMP)); + m_images.push_back(wxGetApp().GetBmp(ID_BMP_INDEXE)); + m_images.push_back(wxGetApp().GetBmp(ID_BMP_INDEXE_TMP)); + m_images.push_back(wxGetApp().GetBmp(ID_BMP_TRIGGER2)); + m_images.push_back(wxGetApp().GetBmp(ID_BMP_TRIGGER2_TMP)); + m_images.push_back(wxGetApp().GetBmp(ID_BMP_FIELD)); + wxAcceleratorEntry entries[5]; entries[0].Set(wxACCEL_CTRL, 'E', ID_MNU_EXECUTESQL); @@ -379,7 +379,7 @@ void wxSQLitePlusFrame::CreateControls() GetAuiManager().Update(); - m_TreeCtrl->SetImageList(&m_TreeImageList); + m_TreeCtrl->SetImages(m_images); int widths[3] = {-1, 70, 170}; SetStatusWidths(3, widths); SetStatusText("v" + wxGetApp().GetFileVersion() + "/" + m_db.GetVersion() + "/" + wxVERSION_STRING, 2); @@ -539,26 +539,25 @@ void wxSQLitePlusFrame::CreateMenus() /*---------------------------------------------------------------------------*/ void wxSQLitePlusFrame::CreateToolbars() { - wxBitmap BitmapDisabled; + wxBitmap BitmapDisabled = wxArtProvider::GetBitmap(wxART_MISSING_IMAGE, wxART_TOOLBAR);; m_TbFile = new wxToolBar(this, ID_TB_FILE, wxDefaultPosition, wxDefaultSize, wxTB_FLAT|wxTB_HORIZONTAL|wxTB_NODIVIDER); - m_TbFile->SetToolBitmapSize(wxSize(20, 20)); - - wxBitmap bmp1(wxGetApp().GetBmp(ID_BMP_OPENDB)); + m_TbFile->SetToolBitmapSize(wxSize(32, 32)); + wxBitmapBundle bmp1(wxGetApp().GetBmp(ID_BMP_OPENDB)); m_TbFile->AddTool(wxID_OPEN, wxEmptyString, bmp1, BitmapDisabled, wxITEM_NORMAL, _("Open/Create Database"), _("Open an existing database or create a new database")); - wxBitmap bmp2(wxGetApp().GetBmp(ID_BMP_ATTACH)); + wxBitmapBundle bmp2(wxGetApp().GetBmp(ID_BMP_ATTACH)); m_TbFile->AddTool(ID_MNU_ATTACH_DB, wxEmptyString, bmp2, BitmapDisabled, wxITEM_NORMAL, _("Attach Database"), _("Attach an existing or new database")); - wxBitmap bmp3(wxGetApp().GetBmp(ID_BMP_COMPACTDB)); + wxBitmapBundle bmp3(wxGetApp().GetBmp(ID_BMP_COMPACTDB)); m_TbFile->AddTool(ID_MNU_COMPACT, wxEmptyString, bmp3, BitmapDisabled, wxITEM_NORMAL, _("Compact Database"), _("Delete empty space in database")); m_TbFile->EnableTool(ID_MNU_COMPACT, false); - wxBitmap bmp4(wxGetApp().GetBmp(ID_BMP_REFRESH)); + wxBitmapBundle bmp4(wxGetApp().GetBmp(ID_BMP_REFRESH)); m_TbFile->AddTool(ID_MNU_REFRESHALL, wxEmptyString, bmp4, BitmapDisabled, wxITEM_NORMAL, _("Refresh Structure"), _("Refresh all database structure")); @@ -577,26 +576,26 @@ void wxSQLitePlusFrame::CreateToolbars() m_TbEdit = new wxToolBar(this, ID_TB_EDIT, wxDefaultPosition, wxDefaultSize, wxTB_FLAT|wxTB_HORIZONTAL|wxTB_NODIVIDER); - m_TbEdit->SetToolBitmapSize(wxSize(20, 20)); - wxBitmap bmp5(wxGetApp().GetBmp(ID_BMP_UNDO)); + m_TbEdit->SetToolBitmapSize(wxSize(32, 32)); + wxBitmapBundle bmp5(wxGetApp().GetBmp(ID_BMP_UNDO)); m_TbEdit->AddTool(wxID_UNDO, wxEmptyString, bmp5, BitmapDisabled, wxITEM_NORMAL, _("Undo"), _("Undo the last editor action")); - wxBitmap bmp6(wxGetApp().GetBmp(ID_BMP_REDO)); + wxBitmapBundle bmp6(wxGetApp().GetBmp(ID_BMP_REDO)); m_TbEdit->AddTool(wxID_REDO, wxEmptyString, bmp6, BitmapDisabled, wxITEM_NORMAL, _("Redo"), _("Redo the last editor action")); m_TbEdit->AddSeparator(); - wxBitmap bmp7(wxGetApp().GetBmp(ID_BMP_CUT)); + wxBitmapBundle bmp7(wxGetApp().GetBmp(ID_BMP_CUT)); m_TbEdit->AddTool(wxID_CUT, wxEmptyString, bmp7, BitmapDisabled, wxITEM_NORMAL, _("Cut"), _("Cut the selected text")); - wxBitmap bmp8(wxGetApp().GetBmp(ID_BMP_COPY)); + wxBitmapBundle bmp8(wxGetApp().GetBmp(ID_BMP_COPY)); m_TbEdit->AddTool(wxID_COPY, wxEmptyString, bmp8, BitmapDisabled, wxITEM_NORMAL, _("Copy"), _("Copy the selected text")); - wxBitmap bmp9(wxGetApp().GetBmp(ID_BMP_PASTE)); + wxBitmapBundle bmp9(wxGetApp().GetBmp(ID_BMP_PASTE)); m_TbEdit->AddTool(wxID_PASTE, wxEmptyString, bmp9, BitmapDisabled, wxITEM_NORMAL, _("Paste"), _("Paste in the editor the text in the clipboard")); m_TbEdit->AddSeparator(); - wxBitmap bmp10(wxGetApp().GetBmp(ID_BMP_CLEAR)); + wxBitmapBundle bmp10(wxGetApp().GetBmp(ID_BMP_CLEAR)); m_TbEdit->AddTool(wxID_CLEAR, wxEmptyString, bmp10, BitmapDisabled, wxITEM_NORMAL, _("Clear"), _("Delete the selected text")); @@ -615,17 +614,17 @@ void wxSQLitePlusFrame::CreateToolbars() m_TbQuery = new wxToolBar(this, ID_TBQUERY, wxDefaultPosition, wxDefaultSize, wxTB_FLAT|wxTB_HORIZONTAL|wxTB_NODIVIDER); - m_TbQuery->SetToolBitmapSize(wxSize(20, 20)); - wxBitmap bmp11(wxGetApp().GetBmp(ID_BMP_RUNSQL)); + m_TbQuery->SetToolBitmapSize(wxSize(32, 32)); + wxBitmapBundle bmp11(wxGetApp().GetBmp(ID_BMP_RUNSQL)); m_TbQuery->AddTool(ID_MNU_EXECUTESQL, wxEmptyString, bmp11, BitmapDisabled, wxITEM_NORMAL, _("Execute SQL"), _("Execute the current SQL statement")); - wxBitmap bmp12(wxGetApp().GetBmp(ID_BMP_RUNSCRIPT)); + wxBitmapBundle bmp12(wxGetApp().GetBmp(ID_BMP_RUNSCRIPT)); m_TbQuery->AddTool(ID_MNU_EXECUTESCRIPT, wxEmptyString, bmp12, BitmapDisabled, wxITEM_NORMAL, _("Execute script"), _("Execute the SQL script")); m_TbQuery->AddSeparator(); - wxBitmap bmp13(wxGetApp().GetBmp(ID_BMP_EXPLAIN)); + wxBitmapBundle bmp13(wxGetApp().GetBmp(ID_BMP_EXPLAIN)); m_TbQuery->AddTool(ID_MNU_EXPLAIN, wxEmptyString, bmp13, BitmapDisabled, wxITEM_NORMAL, _("Explain"), _("Explain the current SQL statement")); @@ -644,26 +643,26 @@ void wxSQLitePlusFrame::CreateToolbars() m_TbTransact = new wxToolBar(this, ID_TB_TRANSACT, wxDefaultPosition, wxDefaultSize, wxTB_FLAT|wxTB_HORIZONTAL|wxTB_NODIVIDER); - m_TbTransact->SetToolBitmapSize(wxSize(20, 20)); - wxBitmap bmp14(wxGetApp().GetBmp(ID_BMP_STARTTRANSACT)); + m_TbTransact->SetToolBitmapSize(wxSize(32, 32)); + wxBitmapBundle bmp14(wxGetApp().GetBmp(ID_BMP_STARTTRANSACT)); m_TbTransact->AddTool(ID_MNU_BEGINTRANSACT, wxEmptyString, bmp14, BitmapDisabled, wxITEM_NORMAL, _("Begin Transaction"), _("Begin a new transaction")); - wxBitmap bmp15(wxGetApp().GetBmp(ID_BMP_STOPTRANSACT)); + wxBitmapBundle bmp15(wxGetApp().GetBmp(ID_BMP_STOPTRANSACT)); m_TbTransact->AddTool(ID_MNU_ENDTRANSACT, wxEmptyString, bmp15, BitmapDisabled, wxITEM_NORMAL, _("End Transaction"), _("Stop the current transaction")); m_TbTransact->AddSeparator(); - wxBitmap bmp16(wxGetApp().GetBmp(ID_BMP_COMMIT)); + wxBitmapBundle bmp16(wxGetApp().GetBmp(ID_BMP_COMMIT)); m_TbTransact->AddTool(ID_MNU_COMMIT, wxEmptyString, bmp16, BitmapDisabled, wxITEM_NORMAL, _("Commit"), _("Commit the current transaction")); - wxBitmap bmp17(wxGetApp().GetBmp(ID_BMP_ROLLBACK)); + wxBitmapBundle bmp17(wxGetApp().GetBmp(ID_BMP_ROLLBACK)); m_TbTransact->AddTool(ID_MNU_ROLLBACK, wxEmptyString, bmp17, BitmapDisabled, wxITEM_NORMAL, _("Rollback"), _("Rollback the current transaction")); m_TbTransact->AddSeparator(); - wxBitmap bmp18(wxGetApp().GetBmp(ID_BMP_AUTOTRANSACT)); + wxBitmapBundle bmp18(wxGetApp().GetBmp(ID_BMP_AUTOTRANSACT)); m_TbTransact->AddTool(ID_MNU_AUTOTRANSACT, wxEmptyString, bmp18, BitmapDisabled, wxITEM_CHECK, _("Auto Start Transaction"), @@ -684,39 +683,39 @@ void wxSQLitePlusFrame::CreateToolbars() m_TbDatabase = new wxToolBar(this, ID_MNU_TB_DATABASE, wxDefaultPosition, wxDefaultSize, wxTB_FLAT|wxTB_HORIZONTAL|wxTB_NODIVIDER); - m_TbDatabase->SetToolBitmapSize(wxSize(20, 20)); - wxBitmap bmp19(wxGetApp().GetBmp(ID_BMP_TABLECREATE)); + m_TbDatabase->SetToolBitmapSize(wxSize(32, 32)); + wxBitmapBundle bmp19(wxGetApp().GetBmp(ID_BMP_TABLECREATE)); m_TbDatabase->AddTool(ID_MNU_ADD_TABLE, wxEmptyString, bmp19, BitmapDisabled, wxITEM_NORMAL, _("Create Table"), _("Show dialog to create new table")); - wxBitmap bmp20(wxGetApp().GetBmp(ID_BMP_TABLEDROP)); + wxBitmapBundle bmp20(wxGetApp().GetBmp(ID_BMP_TABLEDROP)); m_TbDatabase->AddTool(ID_MNU_DEL_TABLE, wxEmptyString, bmp20, BitmapDisabled, wxITEM_NORMAL, _("Drop Table"), _("Show dialog to delete table")); m_TbDatabase->AddSeparator(); - wxBitmap bmp21(wxGetApp().GetBmp(ID_BMP_VIEWCREATE)); + wxBitmapBundle bmp21(wxGetApp().GetBmp(ID_BMP_VIEWCREATE)); m_TbDatabase->AddTool(ID_MNU_ADD_VIEW, wxEmptyString, bmp21, BitmapDisabled, wxITEM_NORMAL, _("Create View"), _("Show dialog to create new view")); - wxBitmap bmp22(wxGetApp().GetBmp(ID_BMP_VIEWDROP)); + wxBitmapBundle bmp22(wxGetApp().GetBmp(ID_BMP_VIEWDROP)); m_TbDatabase->AddTool(ID_MNU_DEL_VIEW, wxEmptyString, bmp22, BitmapDisabled, wxITEM_NORMAL, _("Drop View"), _("Show dialog to delete view")); m_TbDatabase->AddSeparator(); - wxBitmap bmp23(wxGetApp().GetBmp(ID_BMP_INDEXECREATE)); + wxBitmapBundle bmp23(wxGetApp().GetBmp(ID_BMP_INDEXECREATE)); m_TbDatabase->AddTool(ID_MNU_ADD_INDEX, wxEmptyString, bmp23, BitmapDisabled, wxITEM_NORMAL, _("Create Index"), _("Show dialog to create new index")); - wxBitmap bmp24(wxGetApp().GetBmp(ID_BMP_INDEXEDROP)); + wxBitmapBundle bmp24(wxGetApp().GetBmp(ID_BMP_INDEXEDROP)); m_TbDatabase->AddTool(ID_MNU_DEL_INDEX, wxEmptyString, bmp24, BitmapDisabled, wxITEM_NORMAL, _("Drop Index"), _("Show dialog to delete index")); m_TbDatabase->AddSeparator(); - wxBitmap bmp25(wxGetApp().GetBmp(ID_BMP_TRIGGERCREATE)); + wxBitmapBundle bmp25(wxGetApp().GetBmp(ID_BMP_TRIGGERCREATE)); m_TbDatabase->AddTool(ID_MNU_ADD_TRIGGER, wxEmptyString, bmp25, BitmapDisabled, wxITEM_NORMAL, _("Create Trigger"), _("Show dialog to create new trigger")); - wxBitmap bmp26(wxGetApp().GetBmp(ID_BMP_TRIGGERDROP)); + wxBitmapBundle bmp26(wxGetApp().GetBmp(ID_BMP_TRIGGERDROP)); m_TbDatabase->AddTool(ID_MNU_DEL_TRIGGER, wxEmptyString, bmp26, BitmapDisabled, wxITEM_NORMAL, _("Drop Trigger"), _("Show dialog to delete trigger")); diff --git a/src/sqliteplusframe.h b/src/sqliteplusframe.h index ad46e0c..fc3ede2 100644 --- a/src/sqliteplusframe.h +++ b/src/sqliteplusframe.h @@ -41,7 +41,6 @@ pour plus de détails. #include #include #include -#include #include "sqlite3table.h" /*---------------------------------------------------------------------------*/ class wxTreeCtrl; @@ -172,7 +171,7 @@ class wxSQLitePlusFrame: public wxFrame wxSQLite3Database m_db; SQLite3HookForCount m_Hook; - wxImageList m_TreeImageList; + wxVector m_images; wxString m_DbName; int m_NodeType; wxString m_NodeText; diff --git a/src/tablebook.cpp b/src/tablebook.cpp index a697db2..9b87e70 100644 --- a/src/tablebook.cpp +++ b/src/tablebook.cpp @@ -126,12 +126,12 @@ void wxTableBook::CreateControls() m_PageColumns->SetDefaultRowSize(25); m_PageColumns->SetColLabelSize(25); - wxBitmap m_PageColumnsBitmap(wxGetApp().GetBmp(ID_BMP_FIELD)); + wxBitmapBundle m_PageColumnsBitmap(wxGetApp().GetBmp(ID_BMP_FIELD)); m_Book->AddPage(m_PageColumns, _("Columns"), false, m_PageColumnsBitmap); m_PageData = new wxPanelData(m_Book, ID_PAGEDATA, wxDefaultPosition, wxDefaultSize); - wxBitmap m_PageDataBitmap(wxGetApp().GetBmp(ID_BMP_TABLE)); + wxBitmapBundle m_PageDataBitmap(wxGetApp().GetBmp(ID_BMP_TABLE)); m_Book->AddPage(m_PageData, _("Data"), false, m_PageDataBitmap); m_PageForeignKey = new wxSpecGrid(m_Book, ID_PAGEFORIEGNKEY, @@ -141,7 +141,7 @@ void wxTableBook::CreateControls() m_PageForeignKey->SetDefaultRowSize(25); m_PageForeignKey->SetColLabelSize(25); - wxBitmap m_PageForeignKeyBitmap(wxGetApp().GetBmp(ID_BMP_FIELD2)); + wxBitmapBundle m_PageForeignKeyBitmap(wxGetApp().GetBmp(ID_BMP_FIELD2)); m_Book->AddPage(m_PageForeignKey, _("Foreign key"), false, m_PageForeignKeyBitmap); m_PageTriggers = new wxSpecGrid(m_Book, ID_PAGETRIGGERS, wxDefaultPosition, @@ -150,7 +150,7 @@ void wxTableBook::CreateControls() m_PageTriggers->SetDefaultRowSize(25); m_PageTriggers->SetColLabelSize(25); - wxBitmap m_PageTriggersBitmap(wxGetApp().GetBmp(ID_BMP_TRIGGER2)); + wxBitmapBundle m_PageTriggersBitmap(wxGetApp().GetBmp(ID_BMP_TRIGGER2)); m_Book->AddPage(m_PageTriggers, _("Triggers"), false, m_PageTriggersBitmap); m_PageIndexes = new wxSpecGrid(m_Book, ID_PAGEINDEXES, wxDefaultPosition, @@ -159,12 +159,12 @@ void wxTableBook::CreateControls() m_PageIndexes->SetDefaultRowSize(25); m_PageIndexes->SetColLabelSize(25); - wxBitmap m_PageIndexesBitmap(wxGetApp().GetBmp(ID_BMP_INDEXE)); + wxBitmapBundle m_PageIndexesBitmap(wxGetApp().GetBmp(ID_BMP_INDEXE)); m_Book->AddPage(m_PageIndexes, _("Indexes"), false, m_PageIndexesBitmap); m_PageDdl = new wxDDLEditor(m_Book, ID_PAGEDDL); - wxBitmap m_PageDdlBitmap(wxGetApp().GetBmp(ID_BMP_RUNSCRIPT)); + wxBitmapBundle m_PageDdlBitmap(wxGetApp().GetBmp(ID_BMP_RUNSCRIPT)); m_Book->AddPage(m_PageDdl, _("DDL"), false, m_PageDdlBitmap); bSizer->Add(m_Book, 1, wxGROW, 0); diff --git a/src/viewbook.cpp b/src/viewbook.cpp index e964176..2a7b76e 100644 --- a/src/viewbook.cpp +++ b/src/viewbook.cpp @@ -120,17 +120,17 @@ void wxViewBook::CreateControls() m_PageColumns->SetDefaultRowSize(25); m_PageColumns->SetColLabelSize(25); - wxBitmap m_PageColumnsBitmap(wxGetApp().GetBmp(ID_BMP_FIELD)); + wxBitmapBundle m_PageColumnsBitmap(wxGetApp().GetBmp(ID_BMP_FIELD)); m_Book->AddPage(m_PageColumns, _("Columns"), false, m_PageColumnsBitmap); m_PageData = new wxPanelData(m_Book, ID_PAGEDATA, wxDefaultPosition, wxDefaultSize); - wxBitmap m_PageDataBitmap(wxGetApp().GetBmp(ID_BMP_TABLE)); + wxBitmapBundle m_PageDataBitmap(wxGetApp().GetBmp(ID_BMP_TABLE)); m_Book->AddPage(m_PageData, _("Data"), false, m_PageDataBitmap); m_PageDdl = new wxDDLEditor(m_Book, ID_PAGEDDL); - wxBitmap m_PageDdlBitmap(wxGetApp().GetBmp(ID_BMP_RUNSCRIPT)); + wxBitmapBundle m_PageDdlBitmap(wxGetApp().GetBmp(ID_BMP_RUNSCRIPT)); m_Book->AddPage(m_PageDdl, _("DDL"), false, m_PageDdlBitmap); bSizer->Add(m_Book, 1, wxGROW, 0); diff --git a/src/wxsqliteplusapp.cpp b/src/wxsqliteplusapp.cpp index 9d9580f..5c1723b 100644 --- a/src/wxsqliteplusapp.cpp +++ b/src/wxsqliteplusapp.cpp @@ -1149,140 +1149,148 @@ wxString wxSQLitePlusApp::GetSQLParameter(const wxString& param) return QueryGetParam(paramname, wxEmptyString); } /*---------------------------------------------------------------------------*/ -wxBitmap wxSQLitePlusApp::GetBmp(int id) +wxBitmapBundle wxSQLitePlusApp::GetBmp(int id) { + const char* * xpm = nullptr; switch (id) { case ID_BMP_ADD : - return wxBitmap(add_xpm); + xpm = add_xpm; break; case ID_BMP_REMOVE : - return wxBitmap(remove_xpm); + xpm = remove_xpm; break; case ID_BMP_COLUP : - return wxBitmap(colup_xpm); + xpm = colup_xpm; break; case ID_BMP_COLDOWN : - return wxBitmap(coldown_xpm); + xpm = coldown_xpm; break; case ID_BMP_DBNEW : - return wxBitmap(dbnew_xpm); + xpm = dbnew_xpm; break; case ID_BMP_OPENDB : - return wxBitmap(opendb_xpm); + xpm = opendb_xpm; break; case ID_BMP_ATTACH : - return wxBitmap(attachdb_xpm); + xpm = attachdb_xpm; break; case ID_BMP_COMPACTDB : - return wxBitmap(compactdb_xpm); + xpm = compactdb_xpm; break; case ID_BMP_REFRESH : - return wxBitmap(refresh_xpm); + xpm = refresh_xpm; break; case ID_BMP_UNDO : - return wxBitmap(undo_xpm); + xpm = undo_xpm; break; case ID_BMP_REDO : - return wxBitmap(redo_xpm); + xpm = redo_xpm; break; case ID_BMP_CUT : - return wxBitmap(cut_xpm); + xpm = cut_xpm; break; case ID_BMP_COPY : - return wxBitmap(copy_xpm); + xpm = copy_xpm; break; case ID_BMP_PASTE : - return wxBitmap(paste_xpm); + xpm = paste_xpm; break; case ID_BMP_CLEAR : - return wxBitmap(clear_xpm); + xpm = clear_xpm; break; case ID_BMP_RUNSQL : - return wxBitmap(runsql_xpm); + xpm = runsql_xpm; break; case ID_BMP_RUNSCRIPT : - return wxBitmap(runscript_xpm); + xpm = runscript_xpm; break; case ID_BMP_EXPLAIN : - return wxBitmap(explain_xpm); + xpm = explain_xpm; break; case ID_BMP_STARTTRANSACT : - return wxBitmap(starttransact_xpm); + xpm = starttransact_xpm; break; case ID_BMP_STOPTRANSACT : - return wxBitmap(stoptransact_xpm); + xpm = stoptransact_xpm; break; case ID_BMP_COMMIT : - return wxBitmap(commit_xpm); + xpm = commit_xpm; break; case ID_BMP_ROLLBACK : - return wxBitmap(rollback_xpm); + xpm = rollback_xpm; break; case ID_BMP_AUTOTRANSACT : - return wxBitmap(autotransact_xpm); + xpm = autotransact_xpm; break; case ID_BMP_TABLECREATE : - return wxBitmap(tablecreate_xpm); + xpm = tablecreate_xpm; break; case ID_BMP_TABLEDROP : - return wxBitmap(tabledrop_xpm); + xpm = tabledrop_xpm; break; case ID_BMP_VIEWCREATE : - return wxBitmap(viewcreate_xpm); + xpm = viewcreate_xpm; break; case ID_BMP_VIEWDROP : - return wxBitmap(viewdrop_xpm); + xpm = viewdrop_xpm; break; case ID_BMP_INDEXECREATE : - return wxBitmap(indexecreate_xpm); + xpm = indexecreate_xpm; break; case ID_BMP_INDEXEDROP : - return wxBitmap(indexedrop_xpm); + xpm = indexedrop_xpm; break; case ID_BMP_TRIGGERCREATE : - return wxBitmap(triggercreate_xpm); + xpm = triggercreate_xpm; break; case ID_BMP_TRIGGERDROP : - return wxBitmap(triggerdrop_xpm); + xpm = triggerdrop_xpm; break; case ID_BMP_INDEXE : - return wxBitmap(indexe_xpm); + xpm = indexe_xpm; break; case ID_BMP_INDEXE_TMP : - return wxBitmap(indexe_tmp_xpm); + xpm = indexe_tmp_xpm; break; case ID_BMP_INDEXES : - return wxBitmap(indexes_xpm); + xpm = indexes_xpm; break; case ID_BMP_TABLE : - return wxBitmap(table_xpm); + xpm = table_xpm; break; case ID_BMP_TABLE_TMP : - return wxBitmap(table_tmp_xpm); + xpm = table_tmp_xpm; break; case ID_BMP_TABLES : - return wxBitmap(tables_xpm); + xpm = tables_xpm; break; case ID_BMP_TRIGGER2 : - return wxBitmap(trigger2_xpm); + xpm = trigger2_xpm; break; case ID_BMP_TRIGGER2_TMP : - return wxBitmap(trigger2_tmp_xpm); + xpm = trigger2_tmp_xpm; break; case ID_BMP_TRIGGERS2 : - return wxBitmap(triggers2_xpm); + xpm = triggers2_xpm; break; case ID_BMP_VIEW : - return wxBitmap(view_xpm); + xpm = view_xpm; break; case ID_BMP_VIEW_TMP : - return wxBitmap(view_tmp_xpm); + xpm = view_tmp_xpm; break; case ID_BMP_VIEWS : - return wxBitmap(views_xpm); + xpm = views_xpm; break; case ID_BMP_LOG : - return wxBitmap(log_xpm); + xpm = log_xpm; break; case ID_BMP_DATABASE : - return wxBitmap(database_xpm); + xpm = database_xpm; break; case ID_BMP_FIELD : - return wxBitmap(field_xpm); + xpm = field_xpm; break; case ID_BMP_FIELD2 : - return wxBitmap(field2_xpm); + xpm = field2_xpm; break; case ID_BMP_RIGHTARROW1 : - return wxBitmap(rightarrow1_xpm); + xpm = rightarrow1_xpm; break; case ID_BMP_RIGHTARROW2 : - return wxBitmap(rightarrow2_xpm); + xpm = rightarrow2_xpm; break; case ID_BMP_LEFTARROW1 : - return wxBitmap(leftarrow1_xpm); + xpm = leftarrow1_xpm; break; case ID_BMP_LEFTARROW2 : - return wxBitmap(leftarrow2_xpm); + xpm = leftarrow2_xpm; break; case ID_BMP_ALLTOLEFT : - return wxBitmap(alltoleft_xpm); + xpm = alltoleft_xpm; break; case ID_BMP_ALLTORIGHT : - return wxBitmap(alltoright_xpm); + xpm = alltoright_xpm; break; case ID_BMP_LEFT : - return wxBitmap(left_xpm); + xpm = left_xpm; break; case ID_BMP_RIGHT : - return wxBitmap(right_xpm); + xpm = right_xpm; break; case ID_BMP_FIRST : - return wxBitmap(first_xpm); + xpm = first_xpm; break; case ID_BMP_LAST : - return wxBitmap(last_xpm); + xpm = last_xpm; break; case ID_BMP_UP : - return wxBitmap(up_xpm); + xpm = up_xpm; break; case ID_BMP_DOWN : - return wxBitmap(down_xpm); + xpm = down_xpm; break; case ID_BMP_FILTER : - return wxBitmap(filter_xpm); + xpm = filter_xpm; break; case ID_BMP_SORT : - return wxBitmap(sort_xpm); + xpm = sort_xpm; break; case ID_BMP_LOGO32 : - return wxBitmap(logo128_xpm); + xpm = logo128_xpm; break; case ID_BMP_POWEREDBYSQLITE : - return wxBitmap(power_sqlite_xpm); + xpm = power_sqlite_xpm; break; default: - return wxNullBitmap; + return wxBitmapBundle(); // Return an empty bundle } + + wxVector bitmaps; + bitmaps.push_back(wxBitmap(wxImage(xpm).Scale(64, 64))); + bitmaps.push_back(wxBitmap(wxImage(xpm).Scale(32, 32))); + bitmaps.push_back(wxBitmap(wxImage(xpm).Scale(48, 48))); + + return wxBitmapBundle::FromBitmaps(bitmaps); } /*---------------------------------------------------------------------------*/ wxIcon wxSQLitePlusApp::GetIcon(int id) @@ -1342,7 +1350,7 @@ wxString wxSQLitePlusApp::GetLegalCopyright() const wxString tmp; tmp = ("Copyright (c) 2007-2009, Fred Cailleau-Lepetit"); - tmp += ("\nCopyright (c) 2014, Guan Lisheng"); + tmp += ("\nCopyright (c) 2014,2024 Guan Lisheng"); #if WXSQLITE3_HAVE_CODEC tmp += ("\nPart of encryption code:\nCopyright (c) 1990, RSA Data Security"); #endif diff --git a/src/wxsqliteplusapp.h b/src/wxsqliteplusapp.h index d1c2559..ad26779 100644 --- a/src/wxsqliteplusapp.h +++ b/src/wxsqliteplusapp.h @@ -66,7 +66,7 @@ class wxSQLitePlusApp: public wxApp void SetSQLParameter(const wxString& param, const wxString& value); wxString GetSQLParameter(const wxString& param); - wxBitmap GetBmp(int id); + wxBitmapBundle GetBmp(int id); wxIcon GetIcon(int id); wxString GetCompanyName() const;