Commit Graph

18 Commits

Author SHA1 Message Date
Roddi 9a5efabba3 added missing delegate protocol declaration to remove warnings for 10.6 2010-05-17 16:51:53 +02:00
André Berg 10daa222b5 Major overhaul of the handling/effect of CLI args (gitx/PBCLIProxy).
Since we now have that gorgeous sidebar and commit list with branch filters, 
command line arguments to gitx should utilize these to greater effect.

For example, if I pass:

"--local" >> read current branch and set the branch filter to "Local"
"--all" >> same as above but set "All" branch filter
- partial or full SHA-1 >> should get the branch most likely associated with 
that SHA, select it in the sidebar and scroll the commit list to the commit 
with the passed SHA.
- partial ref like "xyz/master" >> select the master branch
of the "xyz" folder in the sidebar and scroll the commit list to its most
recent commit.
"--subject=Test" >> filter commit list using a predicate on the commit list's 
array controller (basically populating the search field programmatically).
For other "--..." CLI switches it's the same, just the filter predicate is a 
bit different each time. You get the idea.

To accomplish this we make the following changes:

- gitx sets two environment variables via setenv(), one for a concatenated 
  version of the CLI args, and one for the indicator that we launched from gitx.
  Using setenv() is unfortunate but I couldn't find a way to do it through DO
  and PBCLIProxy since that proxy will do it's processing far too late into 
  the app's event cycle. 

- the now shared application controller stores the two env vars in a BOOL
  'launchedFromGitx' and an NSString 'cliArgs'.

- Because GitX makes heavy use of KVO and context switching during the app
  launch we introduce the notion of a deferred selection so that we can worry
  about selecting the branch and commit the user has passed to gitx in some 
  form or another, when the app has finished launching completely and all 
  KVO notifications up to this point have been handled.
  
- ApplicationController does the bulk work. It stores most state
  changes, handles most command line switches (except for a few still in gitx.m),
  deals with the deferredSelectObject.

- PBGitSidebarController populateList includes logic for fixing up a ref or 
  a partial SHA when appController.launchedFromGitx is true. If it can be
  resolved we set this as the deferred select object so it can be selected
  later on.

I'll leave the excess NSLogs in there for this commit so another can see
what went into this before.
2010-04-05 23:50:03 +02:00
André Berg 5fb70a8a3e Make ApplicationController a singleton class. 2010-04-05 12:53:06 +02:00
André Berg 79c928dcdd Remove my 10.6 QuickLook panel code since Nathan's implementation handles this more gracefully (includes 10.5 support). 2010-03-24 08:09:10 +01:00
André Berg 38177ed968 Merge remote branch 'brotherbard/experimental' into local branch 'bb/experimental' 2010-03-24 01:41:00 +01:00
Nathan Kinsinger 0ad92349e6 Add Clone Repository
Added Clone… to the File menu which opens a window to select the repository URL and the path for the destination.
2010-03-13 22:11:00 -07:00
André Berg 75e8a5b9b1 Bug fix: Make QuickLook panel work by using the now public API.
Also implements Finder's fade transitions, handles preview icon creation
through GCD block dispatch and does the right thing regarding events:
Mouse events go to the panel, key events to the fileBrowser outline view.
2009-10-20 04:12:06 +02:00
Johannes Gilger 0b81911d76 About-Panel: Show git-describe using Info.plist
This patch adds a CFBundleGitRevision key to Info.plist which is set to
the output of "git describe" when building.

The menu-entry for "About GitX" was reconnected to a custom method in
the AppController, which reads the CF-string from the .plist and also
indicates if the build is a DEBUG-build.

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2009-09-06 13:23:38 +02:00
Christian Jacobsen 0f09401aa6 Add a preferences window
This adds a preference window with default preferences to change the
sparkle options and to set a custom path to a git binary.
2009-01-19 16:38:02 +00:00
Pieter de Bie f26cbee2fc Add a help menu item 2008-10-10 21:59:20 +02:00
Pieter de Bie 97f80a2e51 Remove leftover code 2008-10-10 21:59:18 +02:00
Ciarán Walsh 3773a739b7 Adding a menu item to install the CLI tool. 2008-08-18 18:44:08 +01:00
Ciarán Walsh d8dd74c59b The ApplicationController does not own a repository any more 2008-08-18 18:29:41 +01:00
Ciarán Walsh 0bb4cbc197 Adding a basic command-line tool to interface with the application through distributed objects.
Currently it simply launches the app and connects, however this will allow passing of arguments (for example, a revision to show).
2008-08-18 16:02:34 +01:00
Ciarán Walsh b85a205698 Completing the document-based app setup.
Multiple repositories can now be opened by using the File → Open… menu option.
Each document is a PBGitRepository with a PBDetailController controlling the window. PBRepositoryDocumentController is the document controller.
When launched, the application will attempt to open a repository with the current directory as its path. If this fails it will display an open panel to allow the user to select one.
2008-08-18 08:58:39 +01:00
Pieter de Bie 60e0684b4b Quit on closing the window
Also add some fancy buttons that don't do anything :)
2008-06-16 05:24:27 +02:00
Pieter de Bie d6a0b1bb4c Use a separate controller for tabs 2008-06-16 02:19:26 +02:00
Pieter de Bie 154b78b70c Rename to GitX 2008-06-16 00:25:34 +02:00