Commit Graph

539 Commits

Author SHA1 Message Date
Johannes Gilger ef8317bcb0 Allow email-addresses without the @-sign
These addresses are perfectly valid in a local scope, and GitX shouldn't
fail anyway.
2009-02-06 21:08:01 +01:00
Johannes Gilger bb8a615b22 Recognize file-mode changes correctly and display them
diffHighligher.js: Recognize file-mode changes and mark them
history.js: Extend newfile callback by parameters for mode
history.css: Adjust changed-span to accomodate "mode changed"
2009-02-06 21:07:57 +01:00
Pieter de Bie cb40cf6111 GitX 0.6.1 v0.6.1 2009-01-29 23:56:31 +00:00
Anders Carling 67d9ff3262 WebController: Set JS Controller after reloading the view
The WebKit delegate method didStartProvisionalLoadForFrame:
is not called when reloading the frame. This caused the
webviews to appear empty.

We fix it by using a delegate method which is called each
reload, as suggested by weinig in #webkit.

This fixes Lighthouse bug #81.
2009-01-29 23:49:06 +00:00
Johannes Gilger 28127626c1 User manual: small typos/factual errors/missspellings
Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2009-01-28 20:39:16 +00:00
Pieter de Bie a94981f359 RevList: Don't rely on the presence of %x00
The %x00 pretty specifier was only added in git v1.5.6.
This is quite new, so we try to support older git clients in
GitX (v1.5.4 and up). In order to do this, we need to use another
specifier.

Unfortunately, we can't use a real \0 in our argument, as that just
cuts off our argument string. So we get the next best thing -- we use
\01 :).
2009-01-28 20:30:56 +00:00
Pieter de Bie ba80ae0311 Use new help page URL
Some while ago, gitx changed its homepage from
frim.nl/gitx to gitx.frim.nl, and in the process the user
manual was moved. Though there is still a redirect in place,
it's nicer for the user if we go to the correct page at once.
2009-01-28 20:23:26 +00:00
Pieter de Bie ab2ddd87cc CommitView: Show linebreaks with new files
Just before releasing 0.6, I cleaned up some old code.
In c6895105e2 (Remove old code in Commit/Diff views),
I removed some pre and code tags, causing new files
in the commit view to be displayed without line breaks
2009-01-28 20:21:06 +00:00
Pieter de Bie b6693657d9 Update user manual for 0.6 2009-01-26 21:43:58 +00:00
Pieter de Bie e4ed099443 Update site to GitX v0.6 2009-01-26 21:37:05 +00:00
Pieter de Bie dbaa66cf36 GitX Version 0.6 v0.6 2009-01-26 21:31:01 +00:00
Pieter de Bie b65170189a Merge branch 'pu/jg/rename_detection' (early part)
* 'pu/jg/rename_detection' (early part):
  Diff: also show a binary when it's deleted
  DiffHighlighter: Properly show binary changes
  HistoryView: Prettify the file list
  Show renames changes by default
  history.css, history.js: Color changed/deleted/added/moved appendices
  Rudimentary support for renames/deletions of files
2009-01-26 21:30:58 +00:00
Pieter de Bie 1dc649bf09 Diff: also show a binary when it's deleted 2009-01-26 21:18:29 +00:00
Pieter de Bie c6895105e2 Remove old code in Commit/Diff views
We used to put diffs inside a <pre><code> block,
but no longer need to do that as we now use tables anyway.
We changed the code for the History view, but not for the
other two views.
2009-01-25 22:06:56 +00:00
Pieter de Bie b44b0df75a DiffHighlighter: Properly show binary changes
Binary changes don't have a +++ / --- line, just like
a 100% rename doesn't show any changes. We work around
this in much the same way -- by reading the filenames
for that specific case.
2009-01-25 21:45:28 +00:00
Kim Does cf14746bda HistoryView: Prettify the file list 2009-01-25 21:00:25 +00:00
Pieter de Bie 87fae3f03e CommitView: Remove a stray label 2009-01-25 18:29:27 +00:00
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 22f4ac3f13 Show renames changes by default
Now that we have support to show file renames, we can
enable it by default in all the diffs that we use.
2009-01-25 17:46:23 +00:00
Johannes Gilger e2d47cb049 history.css, history.js: Color changed/deleted/added/moved appendices
Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2009-01-25 17:46:23 +00:00
Pieter de Bie 5482dfe450 Rudimentary support for renames/deletions of files
diffHighlighter.js, history.js: Distinguish created, renamed, changed and deleted files and display them accordingly
2009-01-25 17:46: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