tomolt / GitBlocks

GitBlocks is an easy-to-use and small git plugin for Code::Blocks.
GNU General Public License v3.0
44 stars 27 forks source link

Command execution style #1

Closed alpha0010 closed 9 years ago

alpha0010 commented 9 years ago

You can eliminate much of the platform specific code by dropping the cmd.exe /C and xterm -e prefix from most commands (since they are only needed if you are trying to use built in shell features, such as environment variables and embedded commands), and use wxRmdir() to delete.

Also, when giving a command string, _("xyz") means that the text will be run through translation. Good for menus and dialogues; bad for console commands. Use wxT("xyz") for command literals.

tomolt commented 9 years ago

I used xterm and cmd only for push, pull and fetch, mainly because they interact with the user (gather password etc.). I already knew that one of the two functions _() and _T() also translates the input text, but I somehow confused them.