25 Commits

Author SHA1 Message Date
Nathan Kinsinger 53d92fb73e Cleanup the views when the repository window closes and stop memory leaks.
- make sure to remove themselves from KV and notification center observers
    - add the PBWebHistoryController to PBHistoryController so it can be told to close
    - replaced the -removeView methods with -closeView (-removeView was not being used)
    - clear any obj-c objects set in web scripting objects

This last item seems to be the reason that the web controllers and the current commit did not get collected which then held the repository document from being collected as well.
2010-07-04 09:46:22 -06:00
Nathan Kinsinger c0744f19ec Switch "Discard Hunk" panel to a window modal sheet 2010-02-19 22:28:00 -07:00
Pieter de Bie 9b1fcd7628 Remove cruft 2009-09-13 16:55:40 +02:00
Pieter de Bie 6265c774ac CommitView: Remove cruft 2009-09-13 16:55:39 +02:00
Pieter de Bie cdae809f41 CommitView: Migrate patch apply stuff to GitIndex 2009-09-13 16:55:39 +02:00
Pieter de Bie 64a52ad9e0 CommitView: Migrate diff displaying away from IndexController 2009-09-13 16:55:38 +02:00
Pieter de Bie 03e1d3e882 WIP: Add GUI support for the new index 2009-09-13 16:55:38 +02:00
Nicholas Riley 7baf854666 Remove extraneous space in "Are you sure you wish to revert changes?" message. 2009-07-07 11:56:40 +01: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 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
Daniel Lundqvist 47fa714714 Properly handle deselection in file lists. 2009-01-19 16:52:32 +00: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 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 b252de1a76 CommitView: Allow committing per hunk 2008-10-21 23:31:45 +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 4f212f04b5 CommitView: Remove checking if same file is displayed
This causes trouble if a file was partially staged,
or if we switch from the staged changes to the
unstaged changes.

It should be quick enough not to matter anyway, so
let's simplify things and remove the check.
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
Pieter de Bie 40e9726254 WebControllers: Refactor to use common code 2008-10-10 21:59:21 +02:00
Pieter de Bie 37cda5faa4 CommitView: Intelligently add files
Rather than rereading our status every time we add something,
calculate where a file should go.
2008-09-25 23:57:48 +02:00
Pieter de Bie 9b3909e759 CommitView: Add a status bar to the diff view 2008-09-23 21:51:20 +02:00
Pieter de Bie 44009b6f3e CommitView: use only one array for all files 2008-09-23 02:04:12 +02:00
Pieter de Bie 252796ee26 CommitView: Show basic files 2008-09-23 01:02:33 +02:00