1. 15 3月, 2008 3 次提交
  2. 14 3月, 2008 2 次提交
  3. 13 3月, 2008 2 次提交
  4. 12 3月, 2008 1 次提交
    • J
      git-gui: Simplify MSGFMT setting in Makefile · 72766078
      Junio C Hamano 提交于
      To prepare msg files for Tcl scripts, the command that is set to MSGFMT
      make variable needs to be able to grok "--tcl -l <lang> -d <here>" options
      correctly.  This patch simplifies the tests done in git-gui's Makefile to
      directly test this condition.  If the test run does not exit properly with
      zero status (either because you do not have "msgfmt" itself, or your
      "msgfmt" is too old to grok --tcl option --- the reason does not matter),
      have it fall back to po/po2msg.sh
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      72766078
  5. 08 3月, 2008 1 次提交
  6. 06 3月, 2008 2 次提交
  7. 05 3月, 2008 2 次提交
  8. 28 2月, 2008 2 次提交
  9. 22 2月, 2008 6 次提交
    • S
      Merge branch 'maint' · b5e2f805
      Shawn O. Pearce 提交于
      * maint:
        git-gui: Focus insertion point at end of strings in repository chooser
        git-gui: Avoid hardcoded Windows paths in Cygwin package files
        git-gui: Default TCL_PATH to same location as TCLTK_PATH
        git-gui: Paper bag fix error dialogs opening over the main window
      b5e2f805
    • S
      git-gui: Focus insertion point at end of strings in repository chooser · 3baee1f3
      Shawn O. Pearce 提交于
      When selecting a local working directory for a new repository or a
      location to clone an existing repository into we now set the insert
      point at the end of the selected path, allowing the user to type in
      any additional parts of the path if they so desire.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      3baee1f3
    • S
      git-gui: Avoid hardcoded Windows paths in Cygwin package files · df4ec4cf
      Shawn O. Pearce 提交于
      When we are being built by the Cygwin package maintainers we need to
      embed the POSIX path to our library files and not the Windows path.
      Embedding the Windows path means all end-users who install our Cygwin
      package would be required to install Cygwin at the same Windows path
      as the package maintainer had Cygwin installed to.  This requirement
      is simply not user-friendly and may be infeasible for a large number
      of our users.
      
      We now try to auto-detect if the Tcl/Tk binary we will use at runtime
      is capable of translating POSIX paths into Windows paths the same way
      that cygpath does the translations.  If the Tcl/Tk binary gives us the
      same results then it understands the Cygwin path translation process
      and should be able to read our library files from a POSIX path name.
      
      If it does not give us the same answer as cygpath then the Tcl/Tk
      binary might actually be a native Win32 build (one that is not
      linked against Cygwin) and thus requires the native Windows path
      to our library files.  We can assume this is not a Cygwin package
      as the Cygwin maintainers do not currently ship a pure Win32 build
      of Tcl/Tk.
      
      Reported on the git mailing list by Jurko Gospodnetić.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      df4ec4cf
    • S
      git-gui: Default TCL_PATH to same location as TCLTK_PATH · 651fbba2
      Shawn O. Pearce 提交于
      Most users set TCLTK_PATH to tell git-gui where to find wish, but they
      fail to set TCL_PATH to the same Tcl installation.  We use the non-GUI
      tclsh during builds so headless systems are still able to create an
      index file and create message files without GNU msgfmt.  So it matters
      to us that we find a working TCL_PATH at build time.
      
      If TCL_PATH hasn't been set yet we can take a better guess about what
      tclsh executable to use by replacing 'wish' in the executable path with
      'tclsh'.  We only do this replacement on the filename part of the path,
      just in case the string "wish" appears in the directory paths.  Most of
      the time the tclsh will be installed alongside wish so this replacement
      is a sensible and safe default.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      651fbba2
    • S
      git-gui: Paper bag fix error dialogs opening over the main window · 85ec3e77
      Shawn O. Pearce 提交于
      If the main window is the only toplevel we have open then we
      don't have a valid grab right now, so we need to assume the
      best toplevel to use for the parent is ".".
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      85ec3e77
    • M
      afdb4be0
  10. 21 2月, 2008 8 次提交
    • S
      git-gui: Shorten Aspell version strings to just Aspell version number · bb760f02
      Shawn O. Pearce 提交于
      We really only support Aspell, so showing the compatibility line from
      ispell is of little value to end users.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      bb760f02
    • S
      git-gui: Gracefully display non-aspell version errors to users · 827743b2
      Shawn O. Pearce 提交于
      If the user has somehow managed to make us execute ispell instead
      of aspell, even though our code is invoking aspell, and ispell is
      not recognizing the aspell command line options we use to invoke
      it then we don't want a giant usage message back from ispell.
      
      Instead we show the ispell version number, letting the user know
      we don't actually support that spell checker.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      827743b2
    • S
      git-gui: Catch and display aspell startup failures to the user · de83f8cc
      Shawn O. Pearce 提交于
      If we feed a bad dictionary name to aspell on startup it may appear
      to start (as Tcl found the executable in our $PATH) but it fails to
      give us the version string.  In such a case the close of the pipe
      will report the exit status of the process (failure) and that is
      an error in Tcl.
      
      We now trap the subprocess failure and display the stderr message
      from it, letting the user know why the failure is happening.  We then
      disable the spell checker, but keep our object instance so the user
      can alter their preferred dictionary through the options dialog, and
      possibly restart the spell checker.
      
      I was also originally wrong to use "error" here for the display
      of the problem to the user.  I meant to use "error_popup", which
      will open a message box and show the failure in a GUI context,
      rather than killing git-gui and showing the message on the console.
      
      Noticed by Ilari on #git.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      de83f8cc
    • S
      git-gui: Only bind the spellcheck popup suggestion hook once · 35d04b3b
      Shawn O. Pearce 提交于
      If we reconnect to the spellchecker there is no reason to resetup
      the binding for button 3 on our text widget to show the suggestion
      list (if available).
      
      Plus, by moving it out of _connect and into init we can now break
      out of _connect earlier if there is something wrong with the pipe,
      for example if the dictionary we were asked to load is not valid.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      35d04b3b
    • S
      git-gui: Remove explicit references to 'aspell' in message strings · dd096288
      Shawn O. Pearce 提交于
      Users may or may not be using aspell here.  About the only thing
      we are using that is aspell specific (and not supported by ispell
      or an ispell variant) is some command line options when we start
      up aspell, and a forced encoding of UTF-8.  Both of these can be
      corrected and/or cleaned up by users through an aspell wrapper
      script, or through further improvements to git-gui.  There is no
      reason to require our translated strings to reference a specific
      spell checker, especially if that spell checker implementation is
      not very suitable for the language being translated.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      dd096288
    • S
      git-gui: Ensure all spellchecker 'class' variables are initialized · f57ca1ef
      Shawn O. Pearce 提交于
      If we somehow managed to get our spellchecker instance created but
      aspell wasn't startable we may not finish _connect and thus may
      find one or more of our fields was not initialized in the instance.
      
      If we have an instance but no version, there is no reason to show
      a version to the user in our about dialog.  We effectively have no
      spellchecker available.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      f57ca1ef
    • S
      Merge branch 'maint' · f4d93486
      Shawn O. Pearce 提交于
      * maint:
        git-gui: Ensure error dialogs always appear over all other windows
      f4d93486
    • S
      git-gui: Ensure error dialogs always appear over all other windows · aba15f7f
      Shawn O. Pearce 提交于
      If we are opening an error dialog we want it to appear above all of
      the other windows, even those that we may have opened with a grab
      to make the window modal.  Failure to do so may allow an error
      dialog to open up (and grab focus!) under an existing toplevel,
      making the user think git-gui has frozen up and is unresponsive,
      as they cannot get to the dialog.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      aba15f7f
  11. 20 2月, 2008 2 次提交
  12. 17 2月, 2008 2 次提交
  13. 14 2月, 2008 2 次提交
  14. 12 2月, 2008 3 次提交
    • S
      git-gui: Automatically spell check commit messages as the user types · 95b002ee
      Shawn O. Pearce 提交于
      Many user friendly tools like word processors, email editors and web
      browsers allow users to spell check the message they are writing
      as they type it, making it easy to identify a common misspelling
      of a word and correct it on the fly.
      
      We now open a bi-directional pipe to Aspell and feed the message
      text the user is editing off to the program about once every 300
      milliseconds.  This is frequent enough that the user sees the results
      almost immediately, but is not so frequent as to cause significant
      additional load on the system.  If the user has modified the message
      text during the last 300 milliseconds we delay until the next period,
      ensuring that we avoid flooding the Aspell process with a lot of
      text while the user is actively typing their message.
      
      We wait to send the current message buffer to Aspell until the user
      is at a word boundary, thus ensuring that we are not likely to ask
      for misspelled word detection on a word that the user is actively
      typing, as most words are misspelled when only partially typed,
      even if the user has thus far typed it correctly.
      
      Misspelled words are highlighted in red and are given an underline,
      causing the word to stand out from the others in the buffer.  This is
      a very common user interface idiom for displaying misspelled words,
      but differs from one platform to the next in slight variations.
      For example the Mac OS X system prefers using a dashed red underline,
      leaving the word in the original text color.  Unfortunately the
      control that Tk gives us over text display is not powerful enough
      to handle such formatting so we have to work with the least common
      denominator.
      
      The top suggestions for a misspelling are saved in an array and
      offered to the user when they right-click (or on the Mac ctrl-click)
      a misspelled word.  Selecting an entry from this menu will replace
      the misspelling with the correction shown.  Replacement is integrated
      with the undo/redo stack so undoing a replacement will restore the
      misspelled original text.
      
      If Aspell could not be started during git-gui launch we silently eat
      the error and run without spell checking support.  This way users
      who do not have Aspell in their $PATH can continue to use git-gui,
      although they will not get the advanced spelling functionality.
      
      If Aspell started successfully the version line and language are
      shown in git-gui's about box, below the Tcl/Tk versions.  This way
      the user can verify the Aspell function has been activated.
      
      If Aspell crashes while we are running we inform the user with an
      error dialog and then disable Aspell entirely for the rest of this
      git-gui session.  This prevents us from fork-bombing the system
      with Aspell instances that always crash when presented with the
      current message text, should there be a bug in either Aspell or in
      git-gui's output to it.
      
      We escape all input lines with ^, as recommended by the Aspell manual
      page, as this allows Aspell to properly ignore any input line that is
      otherwise looking like a command (e.g. ! to enable terse output).  By
      using this escape however we need to correct all word offsets by -1 as
      Aspell is apparently considering the ^ escape to be part of the line's
      character count, but our Tk text widget obviously does not.
      
      Available dictionaries are offered in the Options dialog, allowing
      the user to select the language they want to spellcheck commit
      messages with for the current repository, as well as the global
      user setting that all repositories inherit.
      
      Special thanks to Adam Flott for suggesting connecting git-gui
      to Aspell for the purpose of spell checking the commit message,
      and to Wincent Colaiuta for the idea to wait for a word boundary
      before passing the message over for checking.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      95b002ee
    • S
      Merge branch 'maint' · 88965d19
      Shawn O. Pearce 提交于
      * maint:
        git-gui: support Git Gui.app under OS X 10.5
      88965d19
    • J
      git-gui: support Git Gui.app under OS X 10.5 · 20a87ecc
      Jay Soffian 提交于
      The Tk Framework moved its location in 10.5 compared to 10.4
      Signed-off-by: NJay Soffian <jaysoffian@gmail.com>
      Tested-by: NSeth Falcon <seth@userprimary.net>
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      20a87ecc
  15. 04 2月, 2008 2 次提交