forked from java-decompiler/jd-gui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes java-decompiler#13, Adds "Dropping files onto the OSX Dock icon"
- Loading branch information
Showing
5 changed files
with
53 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package jd.gui | ||
|
||
import com.apple.eawt.AppEvent | ||
import com.apple.eawt.Application | ||
import com.apple.eawt.OpenFilesHandler | ||
import com.apple.eawt.QuitHandler | ||
import com.apple.eawt.QuitResponse | ||
|
||
class OsxApp extends App { | ||
|
||
static void main(String[] args) { | ||
// Create an instance of the mac OSX Application class | ||
def application = new Application() | ||
|
||
App.main(args) | ||
|
||
// Add an handle invoked when the application is asked to open a list of files | ||
application.setOpenFileHandler(new OpenFilesHandler() { | ||
void openFiles(AppEvent.OpenFilesEvent e) { | ||
controller.openFiles(e.files) | ||
} | ||
}) | ||
|
||
// Add an handle invoked when the application is asked to quit | ||
application.setQuitHandler(new QuitHandler() { | ||
void handleQuitRequestWith(AppEvent.QuitEvent e, QuitResponse response) { | ||
System.exit(0) | ||
} | ||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters