The class method and the instance method had different types for the window controller. The instance method should be using the NSWindowController since the sheet can be shown in a non PBGitWindowController window (the PBCloneRepositoryPanel).
- use something close to the standard HIG spacing
- add the app's icon and a title so people know what app is asking for a password
- save the position of the window and only center the window if the user hasn't moved it before
- the NSSecureTextField spews some garbage to STDERR which GitX would show in the success/failure sheet so close STDERR
Set the environment variables for our tool. We have a rudimentary but working password panel now. Prettification later.
Label on password window so it's less cryptic.
Set the debug configuration to NATIVE_ARCH_ACTUAL because NATIVE_ARCH will always be i386
Move the "compile libgit2" script build phase to it's own target. By setting the script to run in it's own target we get the ability to clean it durning the clean phase (normal build phase scripts don't run during clean). This will be needed if someone has built GitX prior to this commit because the object files will be for the old architectures.
Also give an error if there is no git repository. This is from several questions I've received after someone has downloaded the source from github instead of cloning the project. The problem is that there is no submodule setting to update.
This is important for large repositories as the commit will be selected when it is added instead of waiting for all the commits to be loaded.
Stop attempts to select the current commit again if it's already selected.
No longer need the updatedGraph property on the history list.
- 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.
The cleanup method cancels any background threads and removes KV observers when the repository document is closed.
Also removed KV observers that are no longer needed.
This is a convenience class to replace using NSStrings to store and compare SHAs. PBGitSHA has a much faster isEqual: function.
It is <NSCopying> compliant and implements isEqual: and hash so it can be used as a key in dictionaries.
If the commit's detail is not UTF8 then PBWebHistoryController's commitDetailsLoaded: method will drop down to Latin1. That can cause character's in the committer's name to not be converted correctly.
Move parsing the name to PBGitRevList where the correct encoding can be determined.
1) stop a threading issue with old commits being added after the commits array was reset
2) stop using --early-output (shouldn't there be an incremental output option???)
Example: If GitX started in stage view and the window was closed without ever looking at the history view, then [self view] will cause the history view's nib to be loaded which kicks off loading in the rev list. Wastes a lot of CPU cycles for no reason.
removeObserver: removes the controller from all notifications.
The PBWebHistoryController's super class registers it for "preferencesChangedWithNotification". This stops the controller from missing that notification and allows it to respond to changes in the preferences.
If the current branch filter is switched to "All" or "Local" the index that's
calculated as being the targeted index to scroll to visible, is off by the amount
in Y that the bottom split view separator is off from a multiple of rows.
-adjustScroll: on PBCommitList is called automatically whenever the list needs
laying out.
An ivar keeps track if we come from the -scrollSelectionToTopOfViewFrom: method
of PBGitHistoryController.
I'll leave the commented out NSLogs in there in case they're needed for debugging
again later.
André Berg pointed out that the "Open Image in New Window" and "Download Image" items from the contextual menu for images in the web view does not work and may cause crashes.
So limit the menu to either just show "Copy Image" or don't have a menu at all.
After the last line is read from the fileDescriptor the callee will call
readLine once last time. If the (uninitialized) buffer just happened to
contain '\r' then this method would increment bytesReceived, then
decrement it (because it has '\r' in it), then decrement it agin and
assign a null byte to the byte before the buffer (stepping on who knows
what). Then it would return the '\r'. Then, since it received something,
the callee would call readLine again, malloc would give the same buffer
it did before (with the '\r') and everything would repeat.
- initialize the buffer
- increment bytesReceived only if a byte is actually received
- don't do any work in the loop if there were no bytes received
- EINTR is a recoverable error, just reread
- give the actual reason for an error rather than some random string
- free the buffer when a newline is found or when there is an error