Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

GitBlock

<< < (2/4) > >>

stahta01:

--- Quote from: uriotcea on April 13, 2023, 08:49:37 pm ---HI,

Thank you for your fast answer, it's getting really complicated, it's really annoying
Is there any way to integrate Git in codeblock?

--- End quote ---

I used the ToolPlus plugin for some simple commands.

Tim S.

uriotcea:
Ok tool+, I'm not very comfortable with this, do you have an example configuration?

cacb:

--- Quote from: uriotcea on April 13, 2023, 08:49:37 pm ---HI,

Thank you for your fast answer, it's getting really complicated, it's really annoying
Is there any way to integrate Git in codeblock?

--- End quote ---


I have simply added "Git Gui here" in the Tools menu. Below is for Linux. The same can be done under Windows, but you need an intermediate tiny application to filter out a return value from "git gui" on windows.
https://github.com/arnholm/cpde_utils/blob/master/git_gui_win/main.cpp

For more advanced git commands I use a similar "Terminal Here"

stahta01:
I got GitBlocks to build using wxWidgets 3.2.2.1 with 28 compatible mode; but, I would guess it will not work well

https://github.com/stahta01/GitBlocks/commit/5f90a704b6b54a10afb80b0a4528765f76e53054

Edit: I got it to build and install using wxWidgets 3.2.2.1 with default 3.0 compatibility; but, it crashes when trying to use it.

Tim S.

Workaround patch to get CB to build with wxWidgets 3.2.2.1 with 28 compatible mode.


--- Code: ------ src/src/main.cpp    (revision 13260)
+++ src/src/main.cpp    (working copy)
@@ -1478,7 +1478,7 @@

 void MainFrame::AddToolbarItem(int id, const wxString& title, const wxString& shortHelp, const wxString& longHelp, const wxString& image)
 {
-    m_pToolbar->AddTool(id, title, cbLoadBitmap(image, wxBITMAP_TYPE_PNG));
+    m_pToolbar->AddTool(id, title, wxBitmapBundle(cbLoadBitmap(image, wxBITMAP_TYPE_PNG)));
     m_pToolbar->SetToolShortHelp(id, shortHelp);
     m_pToolbar->SetToolLongHelp(id, longHelp);
 }

--- End code ---

Miguel Gimenez:
I compiled it with current trunk and wx3.2.2.1 using the attached project. I did not test the plugin, though.

To remove a warning about "no return value" just edit GitBlocks.cpp so it reads

--- Code: ---int GitBlocks::Configure()
{
return 0;
}

--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version