{"thread":{"id":"20449","subject":"Droppable Git Gui in Mac OS X","startedAt":"2009-08-07T10:12:11Z","lastAt":"2009-08-10T15:26:11Z","messageCount":2,"participants":["Tobia Conforto","Shawn O. Pearce"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"119898","messageId":"loom.20090807T090458-788@post.gmane.org","threadId":"20449","inReplyTo":null,"subject":"Droppable Git Gui in Mac OS X","fromName":"Tobia Conforto","fromEmail":"tobia.conforto@gmail.com","sentAt":"2009-08-07T10:12:11Z","receivedAt":"2009-08-07T10:12:11Z","isPatch":false,"sender":{"key":"tobia.conforto@gmail.com","avatar":null},"body":"Hello\n\nI'm using Git 1.6.3.3 on Mac OS X 10.5.7, installed using MacPorts 1.710\n\nI noticed that Git Gui cannot be launched on an existing repository by\nsimply dragging the repository folder onto Git Gui's icon in the dock,\nbut this is a standard UI feature in OS X.\n\nHere is a fix \"Git Gui.app\" (which MacPorts installs in\n/opt/local/share/git-gui/lib) to enable this feature.\n\nThe change to Info.plist enables dropping folders onto the application.\nThe modified AppMain.tcl, before launching the application, receives the\none pending OpenDocument event and cd's to the repository folder.\n\n-Tobia\n\n\n--- Git Gui.app/Contents/Info.plist\n+++ Git Gui.app/Contents/Info.plist\n@@ -24,5 +24,16 @@\n \t<string>GITg</string>\n \t<key>CFBundleVersion</key>\n \t<string>0.12.0</string>\n+\t<key>CFBundleDocumentTypes</key>\n+\t<array>\n+\t\t<dict>\n+\t\t\t<key>CFBundleTypeOSTypes</key>\n+\t\t\t<array>\n+\t\t\t\t<string>fold</string>\n+\t\t\t</array>\n+\t\t\t<key>CFBundleTypeRole</key>\n+\t\t\t<string>Viewer</string>\n+\t\t</dict>\n+\t</array>\n </dict>\n </plist>\n--- Git Gui.app/Contents/Resources/Scripts/AppMain.tcl\n+++ Git Gui.app/Contents/Resources/Scripts/AppMain.tcl\n@@ -19,4 +19,9 @@\n\n unset gitexecdir gitguilib\n set argv [lrange $argv 1 end]\n-source $AppMain_source\n+\n+proc ::tk::mac::OpenDocument {args} {\n+\tcd [lindex $args 0]\n+}\n+\n+after 1 { source $AppMain_source }\n"},{"id":"120170","messageId":"20090810152611.GR1033@spearce.org","threadId":"20449","inReplyTo":"loom.20090807T090458-788@post.gmane.org","subject":"Re: Droppable Git Gui in Mac OS X","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2009-08-10T15:26:11Z","receivedAt":"2009-08-10T15:26:11Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Tobia Conforto <tobia.conforto@gmail.com> wrote:\n> I noticed that Git Gui cannot be launched on an existing repository by\n> simply dragging the repository folder onto Git Gui's icon in the dock,\n> but this is a standard UI feature in OS X.\n> \n> Here is a fix \"Git Gui.app\" (which MacPorts installs in\n> /opt/local/share/git-gui/lib) to enable this feature.\n\nInteresting.\n\nTwo comments:\n\n1) Commit message?  What should we record in the project history\n   for this change?\n\n2) Signed-off-by line?  Please see git.git's SUBMITTING_PATCHES\n   file for details of what this means, and why it is necessary:\n\n   http://repo.or.cz/w/alt-git.git?a=blob;f=Documentation/SubmittingPatches;hb=HEAD\n\n \n> --- Git Gui.app/Contents/Info.plist\n> +++ Git Gui.app/Contents/Info.plist\n> @@ -24,5 +24,16 @@\n>  \t<string>GITg</string>\n>  \t<key>CFBundleVersion</key>\n>  \t<string>0.12.0</string>\n> +\t<key>CFBundleDocumentTypes</key>\n> +\t<array>\n> +\t\t<dict>\n> +\t\t\t<key>CFBundleTypeOSTypes</key>\n> +\t\t\t<array>\n> +\t\t\t\t<string>fold</string>\n> +\t\t\t</array>\n> +\t\t\t<key>CFBundleTypeRole</key>\n> +\t\t\t<string>Viewer</string>\n> +\t\t</dict>\n> +\t</array>\n>  </dict>\n>  </plist>\n> --- Git Gui.app/Contents/Resources/Scripts/AppMain.tcl\n> +++ Git Gui.app/Contents/Resources/Scripts/AppMain.tcl\n> @@ -19,4 +19,9 @@\n> \n>  unset gitexecdir gitguilib\n>  set argv [lrange $argv 1 end]\n> -source $AppMain_source\n> +\n> +proc ::tk::mac::OpenDocument {args} {\n> +\tcd [lindex $args 0]\n> +}\n> +\n> +after 1 { source $AppMain_source }\n> \n> \n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n\n-- \nShawn.\n"}]}