Skip to content

Commit

Permalink
Update for Code::Blocks Release 17.12
Browse files Browse the repository at this point in the history
fix type assert error in CFortranIndentConfigDlg
  • Loading branch information
ywx committed Jan 17, 2018
1 parent 15b7e45 commit 2ecf17f
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 40 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*.[oa]
*.obj
# Ignore build
cbplugin
*.dll
*.so
*.zip
Expand Down
6 changes: 3 additions & 3 deletions CFortranIndentConfigDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void CFortranIndentConfigDlg::LoadSettings()
XRCCTRL(*this, "cb_UseTab", wxCheckBox)->SetValue( myFortranIndentConfig.isUseTab );
XRCCTRL(*this, "cb_UseTab", wxCheckBox)->Enable( ! myFortranIndentConfig.isSameAsEditor );
XRCCTRL(*this, "sp_TabWidth", wxSpinCtrl)->SetValue( myFortranIndentConfig.iTabWidth );
XRCCTRL(*this, "sp_TabWidth", wxCheckBox)->Enable( ! ( myFortranIndentConfig.isSameAsEditor || myFortranIndentConfig.isUseTab ) );
XRCCTRL(*this, "sp_TabWidth", wxSpinCtrl)->Enable( ! ( myFortranIndentConfig.isSameAsEditor || myFortranIndentConfig.isUseTab ) );
XRCCTRL(*this, "cb_KeepBlankLineOnly", wxCheckBox)->SetValue( myFortranIndentConfig.isKeepBlankLineOnly );
XRCCTRL(*this, "cb_TrimLineFromRight", wxCheckBox)->SetValue( myFortranIndentConfig.isTrimLineFromRight );
XRCCTRL(*this, "rb_PreprocessorType", wxRadioBox)->SetSelection( myFortranIndentConfig.iPreprocessorType );
Expand All @@ -75,11 +75,11 @@ void CFortranIndentConfigDlg::OnIsSameAsEditorClick(wxCommandEvent& event)
bool isSameAsEditor = XRCCTRL(*this, "cb_SameAsEditor", wxCheckBox)->GetValue();
XRCCTRL(*this, "cb_UseTab", wxCheckBox)->Enable( ! ( isSameAsEditor ) );
bool isUseTab = XRCCTRL(*this, "cb_UseTab", wxCheckBox)->GetValue();
XRCCTRL(*this, "sp_TabWidth", wxCheckBox)->Enable( ! ( isSameAsEditor || isUseTab ) );
XRCCTRL(*this, "sp_TabWidth", wxSpinCtrl)->Enable( ! ( isSameAsEditor || isUseTab ) );
}

void CFortranIndentConfigDlg::OnIsUseTabClick(wxCommandEvent& event)
{
///
XRCCTRL(*this, "sp_TabWidth", wxCheckBox)->Enable( ! ( XRCCTRL(*this, "cb_UseTab", wxCheckBox)->GetValue() ) );
XRCCTRL(*this, "sp_TabWidth", wxSpinCtrl)->Enable( ! ( XRCCTRL(*this, "cb_UseTab", wxCheckBox)->GetValue() ) ); // event.IsChecked()
}
26 changes: 12 additions & 14 deletions FormatFortranIndentPlugin-unix.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -7,57 +7,55 @@
<Option compiler="gcc" />
<Build>
<Target title="Unix Release">
<Option output="FormatFortranIndentPlugin" prefix_auto="0" extension_auto="1" />
<Option object_output=".objs/release" />
<Option output="cbplugin/unix/release/FormatFortranIndentPlugin" prefix_auto="0" extension_auto="1" />
<Option object_output=".objs/unix/release" />
<Option type="3" />
<Option compiler="gcc" />
<Option host_application="codeblocks" />
<Option run_host_application_in_terminal="0" />
<Compiler>
<Add option="-ansi" />
<Add option="-O2" />
<Add option="`pkg-config --cflags codeblocks`" />
<Add option="`wx-config --cflags`" />
<Add option="-fPIC" />
<Add option="-DEXPORT_FUNC" />
</Compiler>
<Linker>
<Add option="-s" />
<Add option="`pkg-config --libs codeblocks`" />
<Add option="`wx-config --libs`" />
</Linker>
<ExtraCommands>
<Add after="zip -j9 FormatFortranIndentPlugin.zip manifest.xml FormatFortranIndentPlugin.xrc" />
<Add after="zip -j9 FormatFortranIndentPlugin.cbplugin FormatFortranIndentPlugin.so FormatFortranIndentPlugin.zip FormatFortranIndentPlugin.png FormatFortranIndentPlugin-off.png" />
<Add after="zip -j9 $(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).zip manifest.xml FormatFortranIndentPlugin.xrc" />
<Add after="zip -j9 $(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).cbplugin $(TARGET_OUTPUT_FILE) $(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).zip FormatFortranIndentPlugin.png FormatFortranIndentPlugin-off.png" />
<Mode after="always" />
</ExtraCommands>
</Target>
<Target title="Unix Debug">
<Option output="FormatFortranIndentPlugin" prefix_auto="0" extension_auto="1" />
<Option object_output=".objs/debug" />
<Option output="cbplugin/unix/debugult/FormatFortranIndentPlugin" prefix_auto="0" extension_auto="1" />
<Option object_output=".objs/unix/debug" />
<Option type="3" />
<Option compiler="gcc" />
<Option host_application="codeblocks" />
<Option run_host_application_in_terminal="0" />
<Compiler>
<Add option="-ansi" />
<Add option="-g" />
<Add option="`pkg-config --cflags codeblocks`" />
<Add option="`wx-config --cflags`" />
<Add option="-fPIC" />
<Add option="-DEXPORT_FUNC" />
</Compiler>
<Linker>
<Add option="`pkg-config --libs codeblocks`" />
<Add option="`wx-config --libs`" />
</Linker>
<ExtraCommands>
<Add after="zip -j9 FormatFortranIndentPlugin.zip manifest.xml FormatFortranIndentPlugin.xrc" />
<Add after="zip -j9 FormatFortranIndentPlugin.cbplugin FormatFortranIndentPlugin.so FormatFortranIndentPlugin.zip FormatFortranIndentPlugin.png FormatFortranIndentPlugin-off.png" />
<Add after="zip -j9 $(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).zip manifest.xml FormatFortranIndentPlugin.xrc" />
<Add after="zip -j9 $(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).cbplugin $(TARGET_OUTPUT_FILE) $(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).zip FormatFortranIndentPlugin.png FormatFortranIndentPlugin-off.png" />
<Mode after="always" />
</ExtraCommands>
</Target>
</Build>
<Compiler>
<Add option="-std=c++11" />
<Add option="-fPIC" />
</Compiler>
<Unit filename="CFortranIndentConfigDlg.cpp" />
<Unit filename="CFortranIndentConfigDlg.h" />
<Unit filename="CMyFortranIndentConfig.cpp" />
Expand Down
55 changes: 35 additions & 20 deletions FormatFortranIndentPlugin.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<Option compiler="gcc" />
<Build>
<Target title="Win32 Release">
<Option output="FormatFortranIndentPlugin" prefix_auto="0" extension_auto="1" />
<Option object_output=".objs/Release" />
<Option output="cbplugin/win/release/FormatFortranIndentPlugin" prefix_auto="0" extension_auto="1" />
<Option object_output=".objs/win/release" />
<Option type="3" />
<Option compiler="gcc" />
<Option host_application="$(#cb)/devel/codeblocks.exe" />
Expand All @@ -20,6 +20,7 @@
<Add option="-fmessage-length=0" />
<Add option="-fexceptions" />
<Add option="-Winvalid-pch" />
<Add option="-std=gnu++11" />
<Add option="-DBUILDING_PLUGIN" />
<Add option="-DHAVE_W32API_H" />
<Add option="-D__WXMSW__" />
Expand All @@ -28,6 +29,7 @@
<Add option="-DWX_PRECOMP" />
<Add option="-DwxUSE_UNICODE" />
<Add directory="$(#cb)/include" />
<Add directory="$(#cb)/include/tinyxml" />
<Add directory="$(#cb)/sdk/wxscintilla/include" />
<Add directory="$(#wx.include)" />
<Add directory="$(#wx.lib)/gcc_dll/mswu" />
Expand All @@ -41,14 +43,14 @@
<Add directory="$(#wx.lib)/gcc_dll" />
</Linker>
<ExtraCommands>
<Add after="zip -j9 FormatFortranIndentPlugin.zip manifest.xml FormatFortranIndentPlugin.xrc" />
<Add after="zip -j9 FormatFortranIndentPlugin.cbplugin FormatFortranIndentPlugin.dll FormatFortranIndentPlugin.zip FormatFortranIndentPlugin.png FormatFortranIndentPlugin-off.png" />
<Add after="zip -j9 $(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).zip manifest.xml FormatFortranIndentPlugin.xrc" />
<Add after="zip -j9 $(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).cbplugin $(TARGET_OUTPUT_FILE) $(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).zip FormatFortranIndentPlugin.png FormatFortranIndentPlugin-off.png" />
<Mode after="always" />
</ExtraCommands>
</Target>
<Target title="Win32 Debug">
<Option output="FormatFortranIndentPlugin" prefix_auto="0" extension_auto="1" />
<Option object_output=".objs/Debug" />
<Option output="cbplugin/win/debug/FormatFortranIndentPlugin" prefix_auto="0" extension_auto="1" />
<Option object_output=".objs/win/debug" />
<Option type="3" />
<Option compiler="gcc" />
<Option host_application="$(#cb)/devel/codeblocks.exe" />
Expand All @@ -60,6 +62,7 @@
<Add option="-fmessage-length=0" />
<Add option="-fexceptions" />
<Add option="-Winvalid-pch" />
<Add option="-std=gnu++11" />
<Add option="-DBUILDING_PLUGIN" />
<Add option="-DHAVE_W32API_H" />
<Add option="-D__WXMSW__" />
Expand All @@ -69,6 +72,7 @@
<Add option="-DWX_PRECOMP" />
<Add option="-DwxUSE_UNICODE" />
<Add directory="$(#cb)/include" />
<Add directory="$(#cb)/include/tinyxml" />
<Add directory="$(#cb)/sdk/wxscintilla/include" />
<Add directory="$(#wx.include)" />
<Add directory="$(#wx.lib)/gcc_dll/mswu" />
Expand All @@ -81,59 +85,70 @@
<Add directory="$(#wx.lib)/gcc_dll" />
</Linker>
<ExtraCommands>
<Add after="zip -j9 FormatFortranIndentPlugin.zip manifest.xml FormatFortranIndentPlugin.xrc" />
<Add after="zip -j9 FormatFortranIndentPlugin.cbplugin FormatFortranIndentPlugin.dll FormatFortranIndentPlugin.zip FormatFortranIndentPlugin.png FormatFortranIndentPlugin-off.png" />
<Add after="zip -j9 $(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).zip manifest.xml FormatFortranIndentPlugin.xrc" />
<Add after="zip -j9 $(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).cbplugin $(TARGET_OUTPUT_FILE) $(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).zip FormatFortranIndentPlugin.png FormatFortranIndentPlugin-off.png" />
<Mode after="always" />
</ExtraCommands>
</Target>
<Target title="Unix Release">
<Option output="FormatFortranIndentPlugin" prefix_auto="0" extension_auto="1" />
<Option object_output=".objs/release" />
<Option output="cbplugin/unix/release/FormatFortranIndentPlugin" prefix_auto="0" extension_auto="1" />
<Option object_output=".objs/unix/release" />
<Option type="3" />
<Option compiler="gcc" />
<Option host_application="codeblocks" />
<Option run_host_application_in_terminal="0" />
<Compiler>
<Add option="-ansi" />
<Add option="-std=c++11" />
<Add option="-O2" />
<Add option="`pkg-config --cflags codeblocks`" />
<Add option="`wx-config --cflags`" />
<Add option="-fPIC" />
<Add option="-DEXPORT_FUNC" />
<Add directory="$(#cb)/include" />
<Add directory="$(#cb)/include/tinyxml" />
<Add directory="$(#cb)/sdk/wxscintilla/include" />
<Add directory="$(#cb)/include/codeblocks" />
<Add directory="$(#cb)/include/codeblocks/wxscintilla/include" />
</Compiler>
<Linker>
<Add option="-s" />
<Add option="`pkg-config --libs codeblocks`" />
<Add option="`wx-config --libs`" />
<Add library="codeblocks" />
<Add directory="$(#cb)/devel" />
</Linker>
<ExtraCommands>
<Add after="zip -j9 FormatFortranIndentPlugin.zip manifest.xml FormatFortranIndentPlugin.xrc" />
<Add after="zip -j9 FormatFortranIndentPlugin.cbplugin FormatFortranIndentPlugin.so FormatFortranIndentPlugin.zip FormatFortranIndentPlugin.png FormatFortranIndentPlugin-off.png" />
<Add after="zip -j9 $(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).zip manifest.xml FormatFortranIndentPlugin.xrc" />
<Add after="zip -j9 $(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).cbplugin $(TARGET_OUTPUT_FILE) $(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).zip FormatFortranIndentPlugin.png FormatFortranIndentPlugin-off.png" />
<Mode after="always" />
</ExtraCommands>
</Target>
<Target title="Unix Debug">
<Option output="FormatFortranIndentPlugin" prefix_auto="0" extension_auto="1" />
<Option object_output=".objs/debug" />
<Option output="cbplugin/unix/debug/FormatFortranIndentPlugin" prefix_auto="0" extension_auto="1" />
<Option object_output=".objs/unix/debug" />
<Option type="3" />
<Option compiler="gcc" />
<Option host_application="codeblocks" />
<Option run_host_application_in_terminal="0" />
<Compiler>
<Add option="-ansi" />
<Add option="-std=c++11" />
<Add option="-g" />
<Add option="`pkg-config --cflags codeblocks`" />
<Add option="`wx-config --cflags`" />
<Add option="-fPIC" />
<Add option="-DEXPORT_FUNC" />
<Add directory="$(#cb)/include" />
<Add directory="$(#cb)/include/tinyxml" />
<Add directory="$(#cb)/sdk/wxscintilla/include" />
<Add directory="$(#cb)/include/codeblocks" />
<Add directory="$(#cb)/include/codeblocks/wxscintilla/include" />
</Compiler>
<Linker>
<Add option="`pkg-config --libs codeblocks`" />
<Add option="`wx-config --libs`" />
<Add directory="$(#cb)/devel" />
</Linker>
<ExtraCommands>
<Add after="zip -j9 FormatFortranIndentPlugin.zip manifest.xml FormatFortranIndentPlugin.xrc" />
<Add after="zip -j9 FormatFortranIndentPlugin.cbplugin FormatFortranIndentPlugin.so FormatFortranIndentPlugin.zip FormatFortranIndentPlugin.png FormatFortranIndentPlugin-off.png" />
<Add after="zip -j9 $(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).zip manifest.xml FormatFortranIndentPlugin.xrc" />
<Add after="zip -j9 $(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).cbplugin $(TARGET_OUTPUT_FILE) $(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).zip FormatFortranIndentPlugin.png FormatFortranIndentPlugin-off.png" />
<Mode after="always" />
</ExtraCommands>
</Target>
Expand Down
4 changes: 1 addition & 3 deletions FormatFortranIndentPlugin.xrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,14 @@
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<object class="wxCheckBox" name="cb_SameAsEditor">
<label>Config Same As CB Editor</label>
<checked>1</checked>
<label>Config Same As Code::Blocks Editor</label>
</object>
<flag>wxALL|wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP</flag>
<border>8</border>
</object>
<object class="sizeritem">
<object class="wxCheckBox" name="cb_UseTab">
<label>Use Tabs instead of spaces</label>
<checked>1</checked>
</object>
<flag>wxALL|wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP</flag>
<border>8</border>
Expand Down

0 comments on commit 2ecf17f

Please sign in to comment.