Commit Graph

82 Commits

Author SHA1 Message Date
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
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 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 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 da89f38546 HistoryView: Accept an empty email address 2008-12-22 20:40:17 +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 0852f6326c DiffHighlighter: Don't display a diff if there's nothing to display 2008-12-01 15:57:21 +01:00
Pieter de Bie 415ee91b50 WebHistoryView: Add a link to display changed images 2008-12-01 15:57:21 +01:00
Pieter de Bie 359346a2d3 DiffHighlighter: Add a binary file callback
This allows a caller to return custom code when
a file is marked as binary, such as the option
to display the file
2008-12-01 15:57:18 +01:00
Pieter de Bie 7a3166c0e6 WebHistoryView: Use diff callbacks to display history list
This is the start of a callback system we can use to 
make the diff more interactive
2008-12-01 15:09:48 +01:00
Pieter de Bie 4591557e9b WebHistoryView: Fix displaying of parents
This was broken once with the shift away from Prototype,
and even further when using libgit2.
2008-12-01 14:26:42 +01:00
Pieter de Bie 23bb1658d9 WIP: Prettify the diff display by using rounded corners
This wraps each changed file in its own rounded box, making
the diff display easier to the eye :)
2008-11-26 17:44:49 +01:00
Pieter de Bie 07554fbd1f Add toggle function 2008-11-26 17:44:48 +01:00
Pieter de Bie ea30f2bfce JS: Remove stray log 2008-11-25 17:43:11 +01:00
Pieter de Bie 7e2707d979 DiffHilighter: Specific the div in which to hilight
Previously, the diff hilighter was a bit odd in that it would
just search for elements with a diff and highlight those. While
useful in theory, this wasn't used at all. We change it to
receive the diff to hilight, which makes the code somewhat simpler.
2008-11-25 17:43:11 +01:00
Stephen Bannasch f05d0188fc add commit file links and ctrl-arrow navigation
A list of files included in a commit are listed below the
commit message. The list are links which will take you to
that file in the diff display below.

The title of each fileHeader is now just the path to the file
instead of the full diff command.

While the focus is in the commit ctrl-down_arrow and up_arrow
will navigate to to next and previous file in that commit.
2008-11-25 17:43:11 +01:00
Pieter de Bie d2eafc2d52 Include libgit2 as submodule and use it to store sha's
This reduces GitX's memory usage and makes some operations much faster,
like graphing, by having a cheaper comparison
2008-11-24 22:53:48 +01:00
Pieter de Bie 0975426f2f CommitView: move index functions to separate controller
This merges functionality that was previously stored in the
combination of PBGitCommitController / PBChangedFile to a
dedicated controller, PBGitIndexController.
2008-11-18 23:59:25 +01:00
Pieter de Bie 874737fcb5 CommitView: Allow multiple selection 2008-11-18 23:59:25 +01:00
Pieter de Bie 79e5304aa7 WebHistoryView: don't error out when reloading refs
We changed the showRef() prototype to take the current ref, but
didn't change all callers.
2008-11-01 22:51:06 +01:00
Pieter de Bie 90db001409 WebCommitView: Add a state display
This adds a div in the webview to display the current commit
state. It allows us to notify the user of new commits by
showing something in the webview, rather than a modal
dialog.
2008-11-01 20:56:33 +01:00
Pieter de Bie b7645ec967 PBWebHistoryController: show the commit diff async
This should make the GUI more responsive by allowing the diff
to be read in the background. This assumes that

[PBGitCommit details] is threadsafe, so we should keep it that
way.
2008-10-31 23:45:39 +01:00
Pieter de Bie 9382cbf266 Merge commit '9e2618c3ea0e0517e156c3e04b9dba356311f361'
* commit '9e2618c3ea0e0517e156c3e04b9dba356311f361':
  Reorder project
  CommitView: Allow committing per hunk
2008-10-28 23:08:13 +01:00
Pieter de Bie d491f3b3ae CommitWebView: Display new files
This was broken when refactoring the commit code
2008-10-27 17:42:36 +01:00
Pieter de Bie b252de1a76 CommitView: Allow committing per hunk 2008-10-21 23:31:45 +02:00
Pieter de Bie b1e3dd2212 WebCommitView: Use a notification to display errors
This should give GitX some more consistency. Also, it will
give us a basis to build further changes on.
2008-10-21 22:48:50 +02:00
Pieter de Bie bd097b0eff HTML: Restructure html folder
This changes the HTML part of GitX to be more consistent -- we
now use a "views" directory where every web view has it's own
directory.

Furthermore, GitX-wide Javascript is added in the "lib" directory.
The same is true for CSS in the "css" directory. Every view can
have its own custom CSS and JS, and those are put in the views
directory (without JS or CSS prefix directories).
2008-10-21 22:48:47 +02:00
Pieter de Bie 1c7fa93074 WebCommitView: Fix Gistie code
After removing the prototype code, the Gistie XMLHTTPRequest would send
the complete request in the URI, which was often too lang and cause a
failure.

This only sends the request in the body, and also adds additional
diagnostics.
2008-10-21 22:25:29 +02:00
Pieter de Bie b82faa56af Merge branch 'pu/pb/diff_window'
* pu/pb/diff_window:
  Add a diff window
2008-10-21 17:31:31 +02:00
Pieter de Bie e8131c3898 Add a diff window
This allows you to do something like

	gitx --diff

to display a diff similar to 'git diff', but with GitX prettification.

It accepts all git diff parameters, so you can do something like

	gitx --diff HEAD~10

to show the diff compared to the last 10 commits. Or, you can something like

	git diff | gitx

to pipe anything that produces a diff to GitX
2008-10-21 15:43:26 +02:00
Stephen Celis 66f490ff17 HTMLviews: various cleanups 2008-10-21 15:27:47 +02:00
Stephen Celis 43bb12317c WebHistoryView: Don't use Prototype
This removes all dependencies on Prototype in GitX, so we can remove
the library
2008-10-21 15:27:39 +02:00
Pieter de Bie 7b36ac1a2e WebDiffView: Don't use prototype anymore
This is the first step to removing Prototype from GitX.
2008-10-21 15:24:37 +02:00
Pieter de Bie a8d298218b CommitView: Don't always display a horizontal scrollbar
This is based on work from Ben Alpert.
2008-10-19 15:34:28 +02:00
Pieter de Bie 2550d19130 HistoryView: Only show Gravatar if connected to the net
This invokes the SCNetwork framework to check if we can connect to a site
without problems. If we can't, we don't even try to show the gravatar.
2008-10-19 14:05:14 +02:00
Kim Does e75b2fe82f HistoryView: Make the history view prettier
The following things have changed:
* Moved the gravatar icon to the right
* Do not load default image for gravatar to speed up loading of history view
* Changed the notifier
** New spinner
** New location
** Colour coded for success / failure
* Fonts changed
* New button replacing "paste" --> "Gistie it"
2008-10-19 14:05:14 +02:00
Jeremy Sanderson 0e46f27ad0 Added gravatar icons to commit.html (defaults to "wavatar" icons) 2008-10-19 14:05:10 +02:00
Pieter de Bie b4bcc58b3e CommitView/Gistie: Use github.user and github.login
This changes the Gistie paste code to use the github.user
and github.login git config variables for a token and login
name.
2008-10-14 01:02:27 +02:00
Pieter de Bie fe38069e39 HTML: Move tab replacement to start of diffhighlight
This might improve performance, as we don't have to match
again every line.
2008-10-10 21:59:23 +02:00
Pieter de Bie e659e63fc0 CommitView: Add option to amend commits 2008-10-10 21:59:23 +02:00
Pieter de Bie 5010511bdb CommitView: Always use a single PBChangedFile object
This makes sure we don't add a double object to our array,
if a file has both cached and unstaged changes.
2008-10-10 21:59:23 +02:00
Christian Jacobsen 63523d00e8 History view: Make lozenge of currently checked out branch (HEAD) bold, same as gitk. 2008-10-10 21:59:22 +02:00
Pieter de Bie 70bc282982 HTML: Improve diff display performance
This improves the diff performance by a factor of around 10. Things done
to do this are, among others:

	* user String.replace(//g) instead of String.gsub(). It's
		*much* faster
	* Don't use anonymous inner functions for iteration, but instead
		use for loops
	* Don't use String.startsWith() if we can just compare a
		single character

Because we are now so much faster, we can also show bigger diffs
by default.
2008-10-10 21:59:22 +02:00
Pieter de Bie 5c69f31b5a HTML: Update test script with a bigger diff
This way we can profile the JS diff code
2008-10-10 21:59:22 +02:00
Pieter de Bie 64f1957ec9 Gistie: Create private gists by default
We can make this optional once the PrefPane is in
2008-10-10 21:59:22 +02:00
Pieter de Bie 55da6d5bbc HistoryView: Show whitespace in commit message 2008-10-10 21:59:21 +02:00
Pieter de Bie a8cb5905ea DiffView: Hilight trailing whitespace 2008-10-04 22:38:57 +02:00