summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2007-09-21git-gui: Support native Win32 Tcl/Tk under CygwinShawn O. Pearce
Cygwin has been stuck on the 8.4.1 version of Tcl/Tk for quite some time, even though the main Tcl/Tk distribution is already shipping an 8.4.15. The problem is Tcl/Tk no longer supports Cygwin so apparently building the package for Cygwin is now a non-trivial task. Its actually quite easy to build the native Win32 version of Tcl/Tk by compiling with the -mno-cygwin flag passed to GCC but this means we lose all of the "fancy" Cygwin path translations that the Tcl library was doing for us. This is particularly an issue when we are trying to start git-gui through the git wrapper as the git wrapper is passing off a Cygwin path for $0 and Tcl cannot find the startup script or the library directory. We now use `cygpath -m -a` to convert the UNIX style paths to Windows style paths in our startup script if we are building on Cygwin. Doing so allows either the Cygwin-ized Tcl/Tk 8.4.1 that comes with Cygwin or a manually built 8.4.15 that is running the pure Win32 implementation to read our script. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-20git-gui: Fix missing i18n markup in push/fetch windowsShawn O. Pearce
The console window titles should also be marked up with i18n strings so these can be properly localized. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-20Merge branch 'maint'Shawn O. Pearce
* maint: git-gui: Avoid using bold text in entire gui for some fonts
2007-09-20git-gui: Avoid using bold text in entire gui for some fontsSimon Sasburg
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-17Merge branch 'maint'Shawn O. Pearce
* maint: git-gui: Disable native platform text selection in "lists" Conflicts: lib/browser.tcl
2007-09-17git-gui: Disable native platform text selection in "lists"gitgui-0.8.3Shawn O. Pearce
Sometimes we use a Tk text widget as though it were a listbox. This happens typically when we want to show an icon to the left of the text label or just when a text widget is generally a better choice then the native listbox widget. In these cases if we want the user to have control over the selection we implement our own "in_sel" tag that shows the selected region and we perform our own selection management in the background via keybindings and mouse bindings. In such uses we don't want the user to be able to activate the native platform selection by dragging their mouse through the text widget. Doing so creates a very confusing display and the user is left wondering what it may mean to have two different types of selection in the same widget. Tk doesn't allow us to delete the "sel" tag that it uses internally to manage the native selection but it will allow us to make it invisible by setting the tag to have the same display properties as unselected text. So long as we don't actually use the "sel" tag for anything in code its effectively invisible. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-14git-gui: Paper bag fix missing translated stringsShawn O. Pearce
The Tcl expression "[append [mc Foo] Bar]" does not return the string "FooBar" after translation; instead it is setting the variable Foo to the value Bar, or if Foo is already defined it is appending Bar onto the end of it. This is *not* what we wanted to have happen here. Tcl's join function is actually the correct function but its default joinStr argument is a single space. Unfortunately all of our call sites do not want an extra space added to their string. So we need a small wrapper function to make the call to join with an empty join string. In C this is (roughly) the job of the strcat function. Since strcat is not yet used at the global level it is a reasonable name to use here. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-14git-gui: Make the tree browser also use lightgray selectionShawn O. Pearce
In 9adccb05 Matthijs Melchior changed our selection colors in the main index/working directory file lists to use a lightgray as the background color as this made the UI easier to read on all platforms. When we did that change we missed doing also doing in the file browser UI. Doing so just makes the entire thing UI consistent. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-14git-gui: add some strings to translationMichele Ballabio
Most of these changes were suggested by Shawn Pearce in an answer to Johannes Schindelin. Some strings for the blame module were added too. [sp: Minor edits in blame module formatting] Signed-off-by: Michele Ballabio <barra_cuda@katamail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-14Merge branch 'maint'Shawn O. Pearce
* maint: git-gui: Paper bag fix "Commit->Revert" format arguments git-gui: Provide 'uninstall' Makefile target to undo an installation git-gui: Font chooser to handle a large number of font families
2007-09-14git-gui: Paper bag fix "Commit->Revert" format argumentsShawn O. Pearce
The recent bug fix to correctly handle filenames with %s (or any other valid Tcl format specifier) missed a \ on this line and caused the remaining format arguments to not be supplied when we updated the status bar. This caused a Tcl error anytime the user was trying to perform a file revert. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-14git-gui: Provide 'uninstall' Makefile target to undo an installationShawn O. Pearce
Several users have requested a "make uninstall" target be provided in the stock git-gui Makefile so that they can undo an install if git-gui goes to the wrong place during the initial install, or if they are unhappy with the tool and want to remove it from their system. We currently assume that the complete set of files we need to delete are those defined by our Makefile and current source directory. This could differ from what the user actually has installed if they installed one version then attempt to use another to perform the uninstall. Right now I'm just going to say that is "pilot error". Users should uninstall git-gui using the same version of source that they used to make the installation. Perhaps in the future we could read tclIndex and base our uninstall decisions on its contents. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-13Merge branch 'maint'Shawn O. Pearce
* maint: git-gui: Make backporting changes from i18n version easier
2007-09-13git-gui: Font chooser to handle a large number of font familiesShawn O. Pearce
Simon Sasburg noticed that on X11 if there are more fonts than can fit in the height of the screen Tk's native tk_optionMenu does not offer scroll arrows to the user and it is not possible to review all choices or to select those that are off-screen. On Mac OS X the tk_optionMenu works properly but is awkward to navigate if the list is long. This is a rewrite of our font selection by providing a new modal dialog that the user can launch from the git-gui Options panel. The dialog offers the user a scrolling list of fonts in a pane. An example text shows the user what the font looks like at the size they have selected. But I have to admit the example pane is less than ideal. For example in the case of our diff font we really should show the user an example diff complete with our native diff syntax coloring. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Acked-by: Simon Sasburg <simon.sasburg@gmail.com>
2007-09-13git-gui: Make backporting changes from i18n version easierShawn O. Pearce
This is a very trivial hack to define a global mc procedure that does not actually perform i18n translations on its input strings. By declaring an mc procedure here in our maint version of git-gui we can take patches that are intended for the latest development version of git-gui and easily backport them without needing to tweak the mc calls first. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-12git-gui: Document the new i18n context supportShawn O. Pearce
Translators working on po files will likely need to know what the @@noun and @@verb parts are in the original message text, and why these are different messages in the po files. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-12git-gui: Disambiguate "commit"Harri Ilari Tapio Liusvaara
Commit is used as both verb and noun. While these happen to be the same in some languages, they are not the same in all languages, so disambiguate them using context-sensitive i18n. Signed-off-by: Harri Ilari Tapio Liusvaara <hliusvaa@cc.hut.fi> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-12git-gui: Support context-sensitive i18nShawn O. Pearce
Ocassionally, one would want to translate the same string used in different contexts in diffrent ways. This patch provides a wrapper for msgcat::mc that trims "@@" and anything coming after it, whether or not the string actually got translated. Proposed-by: Harri Ilari Tapio Liusvaara <hliusvaa@cc.hut.fi> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-11Merge branch 'maint'Shawn O. Pearce
* maint: git-gui: Don't delete send on Windows as it doesn't exist
2007-09-11git-gui: Don't delete send on Windows as it doesn't existShawn O. Pearce
The Windows port of Tk does not have the send command so we cannot delete it from our global namespace, but the Mac OS X and X11 ports do have it. Switching this delete attempt into a catch makes send go away, or stay away. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-10git-gui: Localize commit/author dates when displaying themShawn O. Pearce
Currently the Git plumbing is not localized so it does not know how to output weekday and month names that conform to the user's locale preferences. This doesn't fit with the rest of git-gui's UI as some of our dates are formatted in Tcl and some are just read from the Git plumbing so dates aren't consistently presented. Since git-for-each-ref is presenting us formatted dates and it offers no way to change that setting even in git 1.5.3.1 we need to first do a parse of the text strings it produces, correct for timezones, then reformat the timestamp using Tcl's formatting routines. Not exactly what I wanted to do but it gets us consistently presented date strings in areas like the blame viewer and the revision picker mega-widget's tooltips. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-10git-gui: Mark revision chooser tooltip for translationShawn O. Pearce
Someone on #git today pointed out that the revision chooser's tooltips are were being drawn with untranslated strings for the fixed labels we include, such as "updated", "commit" and "remote". These strings are now passed through mc to allow them to be localized. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-10Merge branch 'maint'Shawn O. Pearce
* maint: git-gui: Trim trailing slashes from untracked submodule names git-gui: Assume untracked directories are Git submodules git-gui: handle "deleted symlink" diff marker git-gui: show unstaged symlinks in diff viewer
2007-09-10git-gui: Trim trailing slashes from untracked submodule namesShawn O. Pearce
Oddly enough `git ls-files --others` supplies us the name of an untracked submodule by including the trailing slash but that same git version will not accept the name with a trailing slash through `git update-index --stdin`. Stripping off that final slash character before loading it into our file lists allows git-gui to stage changes to submodules just like any other file. This change should give git-gui users some basic submodule support, but it is strictly at the plumbing level as we do not actually know about calling the git-submodule porcelain that is a recent addition to git 1.5.3. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-10git-gui: Assume untracked directories are Git submodulesShawn O. Pearce
If `git ls-files --others` returned us the name of a directory then it is because Git has decided that this directory itself contains a valid Git repository and its files shouldn't be listed as untracked for this repository. In such a case we should label the object as a Git repository and not just as a directory. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-09git-gui: handle "deleted symlink" diff markerMichele Ballabio
Signed-off-by: Michele Ballabio <barra_cuda@katamail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-09git-gui: show unstaged symlinks in diff viewerMichele Ballabio
git-gui has a minor problem with regards to symlinks that point to directories. git init mkdir realdir ln -s realdir linkdir git gui Now clicking on file names in the "unstaged changes" window, there's a problem coming from the "linkdir" symlink: git-gui complains with error reading "file4": illegal operation on a directory ...even though git-gui can add that same symlink to the index just fine. This patch fix this by adding a check. [sp: Minor fix to use {link} instead of "link" in condition and to only open the path if it is not a symlink.] Signed-off-by: Michele Ballabio <barra_cuda@katamail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-09Merge branch 'maint'Shawn O. Pearce
* maint: git-gui: Avoid use of libdir in Makefile git-gui: Disable Tk send in all git-gui sessions git-gui: lib/index.tcl: handle files with % in the filename properly
2007-09-09git-gui: Avoid use of libdir in MakefileShawn O. Pearce
Dmitry V. Levin pointed out that on GNU linux libdir is often used in Makefiles to mean "/usr/lib" or "/usr/lib64", a directory that is meant to hold platform-specific binary files. Using a different libdir meaning here in git-gui's Makefile breaks idomatic expressions like rpm specifile "make libdir=%_libdir". Originally I asked that the git.git Makefile undefine libdir before it calls git-gui's own Makefile but it turns out this is very hard to do, if not impossible. Renaming our libdir to gg_libdir resolves this case with a minimum amount of fuss on our part. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-09git-gui: Disable Tk send in all git-gui sessionsShawn O. Pearce
The Tk designers blessed us with the "send" command, which on X11 will allow anyone who can connect to your X server to evaluate any Tcl code they desire within any running Tk process. This is just plain nuts. If git-gui wants someone running Tcl code within it then would ask someone to supply that Tcl code to it; waiting for someone to drop any random Tcl code into us is not fantastic idea. By renaming send to the empty name the procedure will be removed from the global namespace and Tk will stop responding to random Tcl evaluation requests sent through the X server. Since there is no facility to filter these requests it is unlikely that we will ever consider enabling this command. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-09git-gui: lib/index.tcl: handle files with % in the filename properlyGerrit Pape
Steps to reproduce the bug: $ mkdir repo && cd repo && git init Initialized empty Git repository in .git/ $ touch 'foo%3Fsuite' $ git-gui Then click on the 'foo%3Fsuite' icon to include it in a changeset, a popup comes with: 'Error: bad field specifier "F"' Vincent Danjean noticed the problem and also suggested the fix, reported through http://bugs.debian.org/441167 Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-04Merge branch 'maint'Shawn O. Pearce
* maint: git-gui: Properly set the state of "Stage/Unstage Hunk" action git-gui: Fix detaching current branch during checkout git-gui: Correct starting of git-remote to handle -w option Conflicts: git-gui.sh
2007-09-04git-gui: Ensure msgfmt failure stops GNU makeShawn O. Pearce
If we have a failure executing msgfmt (such as the process just crashes no matter what arguments you supply it because its own installation is borked) we should stop the build process rather than letting it continue along its merry way as if the .msg files were created. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-04git-gui: Properly set the state of "Stage/Unstage Hunk" actionShawn O. Pearce
Today I found yet another way for the "Stage Hunk" and "Unstage Hunk" context menu actions to leave the wrong state enabled in the UI. The problem this time was that I connected the state determination to the value of $::current_diff_side (the side the diff is from). When the user was last looking at a diff from the index side and unstages everything the diff panel goes empty, but the action stayed enabled as we always assumed unstaging was a valid action. This change moves the logic for determining when the action is enabled away from the individual side selection, as they really are two unrelated concepts. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-04git-gui: Fix detaching current branch during checkoutShawn O. Pearce
If the user tried to detach their HEAD while keeping the working directory on the same commit we actually did not completely do a detach operation internally. The problem was caused by git-gui not forcing the HEAD symbolic ref to be updated to a SHA-1 hash when we were not switching revisions. Now we update the HEAD ref if we aren't currently detached or the hashes don't match. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-04git-gui: Correct starting of git-remote to handle -w optionShawn O. Pearce
Current versions of git-remote apparently are passing the -w option to Perl as part of the shbang line: #!/usr/bin/perl -w this caused a problem in git-gui and gave the user a Tcl error with the message: "git-remote not supported: #!/usr/bin/perl -w". The fix for this is to treat the shbang line as a Tcl list and look at the first element only for guessing the executable name. Once we know the executable name we use the remaining elements (if any exist) as arguments to the executable, before the script filename. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-03git-gui: remove dots in some UI stringsMichele Ballabio
Dots in a UI string usually mean that a dialog box will appear waiting for further input. So this patch removes unneeded dots for actions that do not require user's input. Signed-off-by: Michele Ballabio <barra_cuda@katamail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-03git-gui: Quiet the msgfmt part of the make processShawn O. Pearce
I really prefer having a very short and sweet makefile output that does not flood the user's screen with a ton of commands that they don't care much about. Traditionally git-gui has hidden away the actual commands from output by the $(QUIET*) series of macros but allow them to be seen with either `make QUIET=` or `make V=1`. This change makes our i18n message generation process to be a lot shorter and easier to digest at a glance: GITGUI_VERSION = 0.8.2.19.gb868-dirty * new locations or Tcl/Tk interpreter GEN git-gui BUILTIN git-citool INDEX lib/ MSGFMT po/de.msg 268 translated. MSGFMT po/hu.msg 268 translated. MSGFMT po/it.msg 268 translated. MSGFMT po/ja.msg 268 translated. MSGFMT po/ru.msg 249 translated, 12 fuzzy, 4 untranslated. MSGFMT po/zh_cn.msg 60 translated, 37 fuzzy, 168 untranslated. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-03git-gui: Correct stock message for 'Invalid font specified in %s'Shawn O. Pearce
This particular message is talking about a specific option in the configuration file named "gui.$name". This option is not localized so we cannot localize the "gui." that denotes the section the option $name is found within. Currently there are no plans to localize the configuration options for git-gui, but if that were to change in the future then it would be necessary to localize not only the "gui." section prefix but also the $name (fontui and fontdiff). Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-03git-gui: Update po/README as symlink process is not necessaryShawn O. Pearce
We don't actually need to create the lib/msgs symlink back to our po directory in the source tree. git-gui.sh is smart enough to figure out this is where the msg files are and will load them from the po directory if invoked as git-gui.sh. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-02git-gui: Added initial version of po/glossary/zh_cn.poXudong Guan
with contributions from LI Yang, WANG Cong, ZHANG Le, and rae l from the zh-kernel.org mailing list. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2007-09-02German glossary for translationChristian Stimming
Signed-off-by: Christian Stimming <christian.stimming@ibeo-as.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2007-09-02Hungarian translation of git-guiMiklos Vajna
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2007-09-02git-gui: initial version of russian translationIrina Riesen
Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Irina Riesen <irina.riesen@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2007-09-02Italian translation of git-guiPaolo Ciarrocchi
[jes: includes patches from Michele Ballabio] Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2007-09-02Japanese translation of git-guiしらいしななこ
[jes: Also includes work from Junio Hamano] Signed-off-by: しらいしななこ <nanako3@bluebottle.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2007-09-02Initial Chinese translation for git-guiXudong Guan
Simplified Chinese, in UTF-8 encoding. Signed-off-by: Xudong Guan <xudong.guan@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2007-09-02German translation for git-guiChristian Stimming
Signed-off-by: Christian Stimming <stimming@tuhh.de> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2007-09-02Add glossary translation template into git.Christian Stimming
This way, it should be easier for new translators to actually find out about the glossary. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2007-09-02Add glossary that can be converted into a po file for each language.Christian Stimming
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>