Commit Graph

131 Commits

Author SHA1 Message Date
JD Smith bcc652bacf commit view: Ensure buttons display on top of text
... but beneath title line.
2009-06-21 02:26:32 +01:00
Pieter de Bie 64182ea911 Merge commit 'origin/jg/tree_context'
* commit 'origin/jg/tree_context':
  HistoryController: Add "Open Files" menu item
  WebHistoryView: Also use the tree context menu
  HistoryController: Use a programatically created context menu
  WebHistoryController: Refactor menu search to be recursive
  HistoryController: Add some marks
  PBGitHistory: Add "Show in Finder" to files
  Display context menu in the history tree to show related commits
  History fileview: select current item on rightclick
2009-06-20 22:28:19 +01:00
Pieter de Bie 6fd339756e Merge branch 'stable'
* stable:
  PBGitConfig: Add missing sentinel
  Remove use of deprecated stringWithCString
  HistoryView: only add parents if parents array exists
  keyboardNavigation: Fix keys 'c' and 'v' from webView
  Site: add link to Twitter

Conflicts:
	Site/text/contact.markdown
2009-06-20 21:34:49 +01:00
Pieter de Bie a002e3316c WebHistoryView: Also use the tree context menu 2009-06-16 19:41:57 +01:00
Pieter de Bie 5f97caabd1 HistoryView: only add parents if parents array exists
This used to break if a commit had no parents. This wasn't noticed
before because the breakage is only minor -- the only way you see it
is because the detail view didn't scroll up afterwards.
2009-06-12 00:15:00 +01:00
Pieter de Bie 5090d4f159 Merge branch '5a88e3d' (early part)
* '5a88e3d' (early part):
  keyboardNavigation: Fix keys 'c' and 'v' from webView
  PBGitWindowController: Use beginSheetModalForWindow instead of runModal
2009-06-11 23:22:36 +01:00
Steven Michalske 58ac6ed1ff HistoryView: Change the way the HEAD is displayed
It used to be displayed in bold, but this can be easily overlooked when
visualizing all branches. It's easier to see the HEAD when it has its own
colour.
2009-06-11 19:50:45 +01:00
Johannes Gilger 60908fd143 keyboardNavigation: Fix keys 'c' and 'v' from webView
This fixes two small bugs:
1. The JavaScript-method is called "showDiff" instead of "showDiffs"
since cfbcfc1f38. That's why the 'v' button didn't work since then.
2. Commit f05d0188fc introduced an error when trying to access
"event" for key-presses from Cocoa, which resulted in an error and
therefore made the following if-statements unreachable.

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2009-06-11 13:06:09 +01:00
Johannes Gilger ab870c66a8 keyboardNavigation: Fix keys 'c' and 'v' from webView
This fixes two small bugs:
1. The JavaScript-method is called "showDiff" instead of "showDiffs"
since cfbcfc1f38. That's why the 'v' button didn't work since then.
2. Commit f05d0188fc introduced an error when trying to access
"event" for key-presses from Cocoa, which resulted in an error and
therefore made the following if-statements unreachable.

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2009-06-10 16:46:59 +02:00
Johannes Gilger 7b6393570f PBWebChanges: Allow discarding of hunks
This enables a "discard" button for unstaged hunks which simply gets rid of the
changes (by using "git apply --reverse").

To avoid repetition, the stageHunk method was split into a more generic
processHunk method. The "discard" functionality is called through
discardHunk.

The NSAlert shown when discarding can be bypassed by pressing "Alt"
while clicking the discard-button.

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2009-06-06 17:20:30 +01:00
Pieter de Bie a780ad9438 Add an example of how drag-selection for staging lines could work. 2009-05-28 23:26:05 +01:00
Johannes Gilger fe54a464f7 history.js: Fix display of mode-change and rename
Pieter rewrote history.js in cfbcfc1f38, avoiding the use of
.innerHTML for performance reasons. This broke the HTML-arrows when
dealing with renames / mode-changes because createTextNode quotes them.
This is a simple work-around.

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2009-05-28 14:02:16 +01:00
Pieter de Bie cfbcfc1f38 HistoryView: speed up diff display
This speeds up the diff display by using DOM manipulation instead
of .innerHTML. Apparently incremental .innerHTML is really expensive
compared to DOM manipulation (which is expensive compared to a single .innerHTML=).

For example, the v0.2.1 commit, which introduces Sparkle, now loads in 70ms
rather than 230.
2009-05-14 17:05:40 +01:00
Pieter de Bie 7ef15f9154 Update diffHighlighter test 2009-05-14 17:05:40 +01:00
Pieter de Bie b022d81b45 Merge branch 'stable'
* stable:
  Make confirmation of Gists optional
  Add more defaults for handling Gists
  HistoryView: Confirm paste to Gist if github.user is unset
  GitX: CFBuildVersion as x.x.x.xx
  UserManual: Explain the concept of the Amend-button
2009-03-26 23:04:51 +00:00
Pieter de Bie 11c9f51302 Make confirmation of Gists optional
This makes use of the rules that are explicit in the
preferences. By default, Gists are always private and there
will always be a confirmation message.

Both options can be changed from the preferences menu.
2009-03-26 23:03:48 +00:00
Johannes Gilger de31ea193a HistoryView: Confirm paste to Gist if github.user is unset
This patch relates to ticket #58. It adds a method which will ask for
confirmation when pasting to Gist as an anonymous user. Since users
which have github.user and github.token set can easily delete pasted
snippets no confirmation is needed for them.

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2009-03-26 23:03:48 +00:00
Benjamin Kramer df545314f5 HistoryView: Make table header large enough so the text doesn't shift
"Committer" was too big. Use EMs so font size changes won't bother us.
2009-03-25 20:53:36 +01:00
Benjamin Kramer a762ae5219 HistoryView: Show commit date 2009-03-25 20:53:35 +01:00
Benjamin Kramer 89128794c9 HistoryView: Show committer if his name differs from the author's 2009-03-25 20:53:10 +01:00
Benjamin Kramer 5ff9620ec2 HistoryView: Factor out email formatting
The patches to show the committer's name depend on this.
2009-03-25 20:52:42 +01:00
Pieter de Bie 06d6da1fc5 Merge commit '3e21d041efb95b6358c749e021bf5ddbcc05bcd7'
* commit '3e21d041efb95b6358c749e021bf5ddbcc05bcd7':
  Info.plist: Make GitX open any file/folder on drop
  diffHighlighter: Correctly match unified diff hunks
  diffHighlighter: Fix indent-after-stagebutton bug
2009-03-24 00:48:17 +00:00
Pieter de Bie 8616b38eb3 WebHistoryView: Correctly show refs when reloading
We assigned a function instead of the result of that function,
which broke the refreshing
2009-03-23 23:08:27 +00:00
Johannes Gilger 51478449ec diffHighlighter: Correctly match unified diff hunks
Hunks in unified diffs are usually in the form of @@ -a,b +x,y @@, but
sometimes the ,b (i.e. the range) can be ommitted, in which case our
code didn't match the hunk-header at all, resulting in line-numbers
off-by-one in commit-view.

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2009-02-21 23:02:14 +01:00
Johannes Gilger 58990fc318 diffHighlighter: Fix indent-after-stagebutton bug
- display context lines in own <div>.
- Stagebutton no longer is float: left.

This fixes ticket #104

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2009-02-21 22:33:28 +01:00
Johannes Gilger 308a5af02f diffHighlighter: Empty diffs and mode-changes
When there is no diff to display (i.e. empty-file mode-changes, deletion
or creation) we don't draw a diff-box (div) but just list the filename.

Also fixes a bug with mode-changes not displaying new-mode.
2009-02-07 16:31:03 +01:00
Johannes Gilger f23b3c498f diffHighlighter: Display removed, but empty, plain-text files 2009-02-07 15:04:41 +01:00
Johannes Gilger 20b5fa6214 diffHighlighter: Display created, but empty, plain-text files
Plain-text files which have been created are not diffed against
/dev/null, but have a "new file mode" line. This patch catches this case
and also highlights that the control-flow in diffHighlighter is less
than optimal.
2009-02-07 13:47:06 +01:00
Douglas Creager e5104b4069 Use <pre> tag for commit message so that whitespace displays correctly
The contents of the commit message is inserted into the “#message” tag
directly.  If we use a <div> tag, then any whitespace in the commit
message will get collapsed down into a single space as HTML requires.
Since the CSS stylesheet calls for a monospaced font, it makes sense
to use a <pre> tag instead, so that whitespace will be preserved.
2009-02-06 21:09:03 +01:00
Johannes Gilger 8bed6191f5 diffHighlighter.js: Bail out early for deleted binary/image files
If we have an image (png,jpg,...) which was deleted we cant display a
diff or the file itself anymore. In this case the entry in the file-list
is enough.
2009-02-06 21:09:01 +01:00
Johannes Gilger 7cb4930389 diffHighlighter: Fix display for deletion of binary files
When a binary file is deleted the second filename doesn't start with b/
but is "/dev/null". We didn't account for that.
2009-02-06 21:08:01 +01:00
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 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 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 b31eee4ba7 CommitView: Make multiselect a bit prettier 2009-01-25 18:20:48 +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 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 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 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 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
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