diff options
author | Eion Robb <eion@robbmob.com> | 2008-04-22 04:15:14 +0400 |
---|---|---|
committer | Eion Robb <eion@robbmob.com> | 2008-04-22 04:15:14 +0400 |
commit | 4ef8ddc803f2f887a69022169b8d967a9ca1a3ab (patch) | |
tree | 16b1eb93b48ce68fbb90ae80631c15be7c8400fc /skype_messaging_carbon.c | |
parent | 172502d2ce5c69c7c1753c6739c9b2496e3a51cb (diff) |
Fix for startup freezing when starting Skype on slow computers
Diffstat (limited to 'skype_messaging_carbon.c')
-rw-r--r-- | skype_messaging_carbon.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/skype_messaging_carbon.c b/skype_messaging_carbon.c index f1eab1c..009f1a6 100644 --- a/skype_messaging_carbon.c +++ b/skype_messaging_carbon.c @@ -126,11 +126,11 @@ skype_connect() skype_disconnect(); SetSkypeDelegate(&skypeDelegate); - ConnectToSkype(); //g_thread_create((GThreadFunc)skype_connect_thread, NULL, FALSE, NULL); while(connected_to_skype == FALSE) { + ConnectToSkype(); RunCurrentEventLoop(1); } printf("Connected to skype\n"); @@ -235,13 +235,19 @@ allow_app_in_skype_api() AEDesc script_data; OSAID script_id; OSAError err; + + printf("Enabling universal access\n"); + fclose(fopen("/private/var/db/.AccessibilityAPIEnabled", "w")); + ComponentInstance script = OpenDefaultComponent(kOSAComponentType, typeAppleScript); AECreateDesc(typeChar, script_string, strlen(script_string), &script_data); OSACompile(script, &script_data, kOSAModeNull, &script_id); + printf("Trying to run AppleScript code\n"); err = OSAExecute(script, script_id, kOSANullScript, kOSAModeNull, &script_id); if (err == -1753) { - //theres an error that the access assistive devices isn't enabled - //see http://images.apple.com/applescript/uiscripting/gfx/gui.03.jpg for details + printf("Error: 'Access assistive devices' isn't enabled\n" + "see http://images.apple.com/applescript/uiscripting/gfx/gui.03.jpg for details.\n"); } -}
\ No newline at end of file +} + |