47 Commits

Author SHA1 Message Date
David Catmull 91026f857e base PBWebHistoryController on PBWebCommitController 2011-06-12 09:25:37 -06:00
David Catmull 0da73789eb saner method name 2011-06-10 17:12:50 -06:00
David Catmull e254a4488f fix some tabs 2011-06-08 16:35:30 -06:00
David Catmull 50388f57eb add some spaces 2011-06-05 17:16:55 -06:00
David Catmull 800a143b04 modernize loop 2011-06-05 17:11:53 -06:00
German Laullon ac1019d5cc no libgit2 2011-05-20 00:46:13 +02:00
Romain Muller c1b3658e05 Explicit cast to remove warning. 2011-05-19 18:22:02 +02:00
Romain Muller e546078dd9 Fixed issue with the initial commit by adding --root in diff-tree arguments. 2011-05-09 22:38:17 -07:00
Romain Muller 7d82aa0761 Rename cleanupHTML: to escapeHTML: 2011-05-01 13:49:15 -07:00
Romain Muller 3f416bb8e7 Tidy up the commit message to ensure it won't break the diff view.
Renamed the GLFileView's +parseHTML into something more meaningful regarding what it actually does.

Also, the method might need to be moved to somewhere else...
2011-04-30 13:16:22 -07:00
German Laullon 656cb824a3 NSLog => Dlog (Log only on debug build) 2011-04-05 11:39:01 -07:00
German Laullon bb4f5e3897 new Diff parser 2011-04-01 00:38:04 -07:00
German Laullon 1ec2ef2596 FileMerge.app on FileView diffs 2011-03-19 13:32:30 -07:00
German Laullon 82f69a7ec3 minor details 2011-03-08 17:59:37 -08:00
German Laullon dbbc7dfafa correct parameters 2011-03-08 17:40:02 -08:00
German Laullon 8896dc993c basic FileMerge support 2011-03-04 13:38:55 -08:00
German Laullon 812c2ad079 images on diff 2011-01-04 00:36:57 -08:00
German Laullon f0b1b74ae4 some history view improvements. 2011-01-02 22:30:51 -08:00
German Laullon b689ac6760 remove javascript and logs 2010-12-31 00:07:24 -08:00
German Laullon ad90b3390a Initial file list stats on history view.
Based on kelan work
2010-12-30 23:54:44 -08:00
German Laullon 8aa4333530 correct date 2010-12-30 00:17:58 -08:00
German Laullon 3f7a79c491 New History view
Less javascript
2010-12-29 01:08:23 -08:00
German Laullon 77b843116e better diff process 2010-12-09 17:44:48 -08:00
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 c17215e55e Create wrapper class around git_oid and use it
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.
2010-07-04 09:46:12 -06:00
Nathan Kinsinger 693a23d545 Bugfix: don't remove all notifications from the web history controller
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.
2010-07-04 09:45:06 -06:00
Nathan Kinsinger 9e8002a97e Only allow the "Copy Image" menu item for images
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.
2010-06-27 06:26:59 -06:00
Nathan Kinsinger 2b0c2b200a Retry loadCommit() script when it fails
Fixes a problem when opening a number of repos at once where the commit information does not show up. Get a webKit error "TypeError: Result of expression 'commit' [undefined] is not an object."

For some reason the callWebScriptMethod:withArguments: method returns nil (even after the webView:didFinishLoadForFrame: delegate is called) when the app is busy. Seems like the web view is not really ready yet and so it never actually calls loadCommit().

If we get nil (normally should get WebUndefined) then try changeContentTo: again after a little delay. This stops the loadCommitDetails() script from running before the commit object is created.
2010-03-13 22:16:06 -07:00
Nathan Kinsinger ff5f3f7979 Add methods dealing with menus needed for future features.
Switch from storing both the ref and the commit to storing just one or the other as a refish.

Change action methods that receive PBRefMenuItem to support the change in functionality. In particular the removeRefSheetDidEnd:returnCode:contextInfo: method in PBRefController now looks up the commit for the ref (this was the only place that needed both the ref and the commit).
2010-03-06 15:58:20 -07:00
Pieter de Bie 0363eea494 HistoryView: don't load in commit information in a separate thread anymore
I've seen this hang or crash a few times, so I hope this works better.
Instead of running a task in a separate thread, we just let it go through
the run loop and catch it when the task is done.

This ruins the second subview in the history view, but I don't think
anybody ever used that, so I'm going to remove it.
2009-09-17 23:29:06 +02:00
Pieter de Bie a002e3316c WebHistoryView: Also use the tree context menu 2009-06-16 19:41:57 +01:00
Pieter de Bie c9609f22b6 WebHistoryController: Refactor menu search to be recursive
This way it doesn't matter where in an element you click, as
long as one of its parents has the required attributes, you
get the menu
2009-06-16 19:30:12 +01:00
Benjamin Kramer 6dcefe5bec Fix many gcc 4.2 compiler warnings 2009-05-18 23:08:51 +01: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
Daniel Lundqvist 31d2e1ad41 Have history view react to configuration changes. 2009-01-19 16:50:52 +00:00
Pieter de Bie 415ee91b50 WebHistoryView: Add a link to display changed images 2008-12-01 15:57:21 +01:00
Pieter de Bie 3dd6385440 Fix memory leaks 2008-11-26 17:44:24 +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 a9dad9dd31 GitRevisionCell: Allow right-clicking on refs
This reuses the code in the RefController to show context menus
when right-clicking on refs.
2008-11-01 22:51:10 +01:00
Pieter de Bie e02ee5231c WebHistoryController: Move ref deletion to RefController
That's why it's there, after all. This also makes the system
more robust and catches some more errors.

The next thing this enables is to also allow right-clicking
on refs in the commit list.
2008-11-01 22:51:10 +01:00
Pieter de Bie 304a1a5d03 Remove stray debug messages 2008-11-01 21:14:57 +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 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 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
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 6589279383 WebController: Move common functions to superclass 2008-10-10 21:59:22 +02:00
Pieter de Bie 40e9726254 WebControllers: Refactor to use common code 2008-10-10 21:59:21 +02:00