Commit Graph

519 Commits

Author SHA1 Message Date
Pieter de Bie b31eee4ba7 CommitView: Make multiselect a bit prettier 2009-01-25 18:20:48 +00:00
Pieter de Bie 29641f3746 HistoryView: Use the realSha for the searchfield predicate
This still used the old sha value that we used before switching
to libgit2, and thus caused  searching for sha's to fail
2009-01-25 17:54:19 +00:00
Pieter de Bie 9c0468a4dc Update release notes 2009-01-25 16:01:20 +00:00
Pieter de Bie 31cf9cfbee WebHistoryView: Don't try to display PDF files anymore
This used to work, but it probably changed with 1.5.6 or something,
so let's just remove PDF support
2009-01-25 15:38:23 +00:00
Pieter de Bie c890193ab5 Change keyboard shortcuts for switching views
This remaps Command-1/2 to the History/Commit view.

The keys used to be used to switch the subview in the history view.
As these views are probably less frequently changed than the history/
commit view, we'd better use the easier shortcut for the latter.

The subviews can now be changed by using command-option-1/2/3
2009-01-25 15:36:58 +00:00
Pieter de Bie 83f2bcf9c2 Add a link to GitX Homepage in the about dialog 2009-01-25 15:33:15 +00:00
Pieter de Bie 2cb0a37af5 Make a document the active window if it already exists 2009-01-25 15:14:57 +00:00
Pieter de Bie cc6a91579e PBEasyPipe: Might catch an exception 2009-01-25 15:14:42 +00:00
Pieter de Bie f16febf0e8 WebCommit: Empty diff display if there's a binary file 2009-01-25 15:02:17 +00:00
Pieter de Bie 2c29f5bda2 WebCommit: Fix displaying of files after multiselect
This was borked when adding the context sizing, because
the multiselect still changed the whole title rather than
only the text span part.
2009-01-25 15:01:22 +00:00
Pieter de Bie 8fde62f1b0 PBEasyPipe: Wait until exit if we're not in the main thread
There have been numerous bug reports about zombie processes in GitX,
because if an NSThread dies before an NSTask is finished it won't
kill the child process properly.

We tried to fix this by adding an [NSTask waitUntilExit] to wait for the
process to die, fixing the problem with the zombies. However, this caused
another problem: rendering glitches in the history view.

The problem is that [NSTask waitUntilExit] does NOT wait until the task has
finished (yeah, took me some time to figure that one out). Instead, it runs
the main loop and periodically queries if the task has finished yet.

What happens then is that during the drawing of one of the cells a call
is made to [repository headRef] to determine whether we should show the
cell in bold or not.

[repository headRef] then invokes an NSTask to figure out what the HEAD ref
really is. This in turn runs the [NSTask waitUntilExit].

Now, rather than really wait, the NSTask continues the main loop, and Cocoa
tries to display the next cell. This cell again calls an NSTask, etc...

So, what we basically have then is that halfway through the NSCell's drawing
code, the NSCell will be asked to draw another cell. It then changes the
data members and calls the [drawInRect] stuff again. the cell finishes
drawing, and control is returned to the previous draw. This path happily
continues, but now its data members are changed because of the second
draw, so it continues drawing something different than what it started
with.

As you might imagine, it took me some time to figure that one out :) The
next part is to fix it, of course, which might be somewhat tougher.
There's the easy fix to only [waitUntilExit] if the current thread is
not the main thread. This fixes our problem because nothing is drawn
in other threads, and nothing is zombie'd if it's called from the
main thread.

Another way is to fix the drawing code not to use data members. That
way the drawing can continue happily as if nothing ever happend

A third way is to fix the drawing part to never execute a git call.

I think the first and third way are OK to do. The second option doesn't
look very entertaining or practical.

Of course, the first option is only working around the problem, and
only solves this particular case. I guess this is one of those cases
of "I'll work around it this time.. if it bugs me later, I'll fix
it properly".
2009-01-25 02:14:13 +00:00
Pieter de Bie ddc9ae7654 PBGitCommit: Don't store refs
We already keep this dictionary in our repository. Rather than adding a
pointer to it on every commit in our rev walk, just look it up lazily in the
dictionary when we need to. That cuts down some time in the initial revwalk
and also removes some stupid code :)
2009-01-25 02:14:09 +00:00
Till Salzer 4f1fe8a1f6 Gravatar: Sanitize email address before calculating MD5
The MD5 of the email address that Gravatar uses should be without any
capitalized characters or spaces.
2009-01-21 20:49:00 +00:00
Pieter de Bie 971e8e5bcc PBRefController: Only set title if we have a rev
We used to unconditionally set the title of the branch
to the current branch. This worked fine in most cases
where the current branch was already known, but failed
when you use 'gitx -c' and then switch to the HistoryView,
because then the currentBranch isn't known yet.

The simple fix is to check if we know it. If we don't,
it'll be set later on.
2009-01-19 22:20:16 +00:00
Pieter de Bie bad99be131 DiffView: Fix displaying of diffs
This was lost when changing the diff mechanism to
highlight only a single div, rather than all diffs
in the body.
2009-01-19 21:41:29 +00:00
Pieter de Bie 9c4c2a347b CommitView: Allow changing of context size
This adds a slider in the commit view with
which the user can change the context size.

This is useful for example if the hunks are too
big; by changing the context size, a hunk can be
split and then the changes can be committed.
2009-01-19 21:37:37 +00:00
Pieter de Bie 8c34fc9d84 CommitView: Actually show commit message
The message that the commit was succesful used to disappear
because after the commit, the index would refresh and another
file would be shown. We fix this by never requiring a file to be
selected.
2009-01-19 20:08:55 +00:00
Pieter de Bie f94ab0f5fe Use NSISOLatin1 encoding instead of ASCII
We used to fall back on the ASCII encoding if UTF-8 did not work out. However,
this causes its own problems; ASCII is only valid for the lower 7 bytes. We
solve this by using Latin-1, which should have a valid character for every
byte sequence
2009-01-19 17:05:32 +00:00
Johannes Gilger ed08bf64bd diffHighlighter.js: Off-by-one for last file in diff, resulting in wrong href 2009-01-19 17:00:59 +00:00
Ben Alpert 086a1c3a12 remove double path init in drawCircleInRect: 2009-01-19 16:57:12 +00:00
Rick Berry 40cceebc9b Fix file path construction when using NSString 2009-01-19 16:55:43 +00:00
Ben Walding feb0b64f29 Fix spelling of successfully in
* commit message
 * documentation
2009-01-19 16:54:56 +00:00
Daniel Lundqvist 47fa714714 Properly handle deselection in file lists. 2009-01-19 16:52:32 +00:00
Daniel Lundqvist 5d4a8c7a66 Improve margins now that we can toggle things in rightcontent div. 2009-01-19 16:50:52 +00:00
Daniel Lundqvist 31d2e1ad41 Have history view react to configuration changes. 2009-01-19 16:50:52 +00:00
Daniel Lundqvist 865ae5f422 Have PBWebController react to configuration changes.
Override preferencesChanged in subclasses to actually react to changes.
Base class does nothing by default.
2009-01-19 16:50:52 +00:00
Daniel Lundqvist 55d57ba076 Add panel for integration settings. 2009-01-19 16:48:41 +00:00
Daniel Lundqvist 0f8ac90743 WebHistoryController: Only show Gravatar and Gist if they are enabled
This add an "enableFeature" JS function that checks if a given feature is
enabled. If it is, the correct div is shown, otherwise it is hidden.
2009-01-19 16:48:26 +00:00
Daniel Lundqvist eb971b3ca7 Add settings reader for Gist and Gravatar integration. 2009-01-19 16:41:09 +00:00
Daniel Lundqvist 0724dc8eaa Set Controller earlier so it can be used while loading pages. 2009-01-19 16:38:07 +00:00
Daniel Lundqvist 09cc80522d Use the passed in image element in setGravatar. 2009-01-19 16:38:07 +00:00
Daniel Lundqvist 8ef733518e Add id to "Gist it" button so we can refer to it from JS. 2009-01-19 16:38:07 +00:00
Pieter de Bie 23f1672831 PrefencesWindow: Add a reset icon to the path view
This allows you to remove a custom executable
2009-01-19 16:38:07 +00:00
Pieter de Bie 5a8ddeb096 GitBinary: Show an error if someone entered an invalid git binary 2009-01-19 16:38:07 +00:00
Christian Jacobsen 0f09401aa6 Add a preferences window
This adds a preference window with default preferences to change the
sparkle options and to set a custom path to a git binary.
2009-01-19 16:38:02 +00:00
Pieter de Bie 85fa5a1d8f GitCommit: Restore revert functionality
This restores the "Revert Changes.." functionality
that was removed when changing the file list stuff.

It's now possible to revert multiple files. Also, it
now uses 'git checkout-index', which should be a bit
more robust.
2008-12-22 22:22:10 +01:00
Pieter de Bie d0c5db47ea Merge branch 'pu/mb/add_gitignore'
* pu/mb/add_gitignore:
  CommitView: Add option to add files to .gitignore
2008-12-22 21:59:45 +01:00
Mark Bestley fc00f6c087 CommitView: Add option to add files to .gitignore
In the commit view, add an option in the context menu to have git
ignore them by adding the file names to .gitignore file in the root
of the workarea.
2008-12-22 21:59:11 +01:00
Pieter de Bie 8d729dae4c CommitView: Don't change selection when refreshing
We used to read in a completely new array when refreshing
the index. The problem with this is that the selection
changes when reading in the new array. We avoid this
by changing the current array, rather than loading in
a completely new one.
2008-12-22 21:31:05 +01:00
Pieter de Bie cd4ee1b993 Update views when switching 2008-12-22 20:47:36 +01:00
Pieter de Bie da89f38546 HistoryView: Accept an empty email address 2008-12-22 20:40:17 +01:00
Pieter de Bie 641d2dbdce GitGrapher: Reduce number of lines we output
We used to output a line for every lane after the
lane in which the current commit is in, and also
make it have the wrong color. This fixes the buglet
and also makes sure not to draw a line when
the commit has no parents.
2008-12-22 20:11:57 +01:00
Kevin Ballard 83fff61b6a Always build in the project-relative build/ folder with rake build_app 2008-12-15 18:05:24 +01:00
Pieter de Bie 530377a121 PBEasyPipe: Fall back to ASCII encoding when UTF-8 fails
This seems to be the only sensible thing to do, as we can't guess
what the encoding would otherwise be.
2008-12-15 18:00:34 +01:00
Pieter de Bie 56a6adc234 GitGrapher: Do not crash on only a single commit
This was somewhat unfortunate, as we don't check
on if we have at least a single parent when adding
new parents. That would cause a wild pointer, or null
dereference when creating a new lane.
2008-12-15 17:33:50 +01:00
Pieter de Bie cbf2608dfa Site: Fix display of the User Manual
This was accidentally broken when 578edf879
changed the 'body' variable to be global.
2008-12-04 20:56:15 +01:00
Kim Does 0434062a7e DiffView: Make the lines and shadows more subtle 2008-12-02 01:00:18 +01:00
Pieter de Bie d977d90b2c Diffs: overflow the text 2008-12-02 01:00:18 +01:00
Pieter de Bie e0d8df63e8 IndexController: Don't try to be smart when diffing staged changes
We previously used some cool git syntax to display changes in the index.
The unfortunate side-effect of this was that the diff headers weren't correct,
so the unstage button didn't work anymore.
2008-12-02 01:00:18 +01:00
Martin Svangren 41154efa15 Rakefile: Fixed broken copy in install_app
Seems like File.copy doesn't do directories (as source, that is),
only files (as far as I can tell from reading the docs and trying
it in irb, punch me if I'm wrong). It only creates a zero byte file
in the target directory on my system.

Replaced File.copy with a system call to 'cp -R ...' to do the job.
Seems like FileUtils could have done it just as well (with cp_r),
but I figured making a system call was better than introducing a
new dependency.
2008-12-02 00:04:40 +01:00