Commit Graph

20 Commits

Author SHA1 Message Date
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