From: Felix Paul Kühne Date: Sat, 26 Dec 2009 16:43:35 +0000 (+0100) Subject: osx dialog provider: make sure we can actually quit VLC X-Git-Tag: 1.1.0-ff~1733 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=77271be3e3ef44bcf777639d61fef615bbfc55bc;p=vlc osx dialog provider: make sure we can actually quit VLC --- diff --git a/extras/package/macosx/vlc.xcodeproj/project.pbxproj b/extras/package/macosx/vlc.xcodeproj/project.pbxproj index af22acfd22..62527c1334 100644 --- a/extras/package/macosx/vlc.xcodeproj/project.pbxproj +++ b/extras/package/macosx/vlc.xcodeproj/project.pbxproj @@ -369,6 +369,8 @@ CC6D8D9D0A878DED006F2BBE /* AppleRemote.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppleRemote.m; path = ../../../modules/gui/macosx/AppleRemote.m; sourceTree = SOURCE_ROOT; }; CC6EDD4F0B9CA2140096068A /* eyetv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = eyetv.h; path = ../../../modules/gui/macosx/eyetv.h; sourceTree = SOURCE_ROOT; }; CC6EDD500B9CA2140096068A /* eyetv.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = eyetv.m; path = ../../../modules/gui/macosx/eyetv.m; sourceTree = SOURCE_ROOT; }; + CC772DAC10E621C100675C9B /* VLCProgressPanel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCProgressPanel.h; path = ../../../modules/gui/macosx_dialog_provider/VLCProgressPanel.h; sourceTree = SOURCE_ROOT; }; + CC772DAD10E621C100675C9B /* VLCProgressPanel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCProgressPanel.m; path = ../../../modules/gui/macosx_dialog_provider/VLCProgressPanel.m; sourceTree = SOURCE_ROOT; }; CC8062631021F8790021EB9A /* dsa_pub.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = dsa_pub.pem; path = Resources/dsa_pub.pem; sourceTree = ""; }; CC962E2C0CC7992800A56695 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = ""; }; CC965D5D0DA5880F0088F222 /* display_middle.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = display_middle.png; path = Resources/display_middle.png; sourceTree = ""; }; @@ -828,6 +830,8 @@ CCD590EF10E5B71300D39094 /* Minimal Dialog Provider */ = { isa = PBXGroup; children = ( + CC772DAC10E621C100675C9B /* VLCProgressPanel.h */, + CC772DAD10E621C100675C9B /* VLCProgressPanel.m */, CCD590F010E5B73200D39094 /* dialogProvider.h */, CCD590F110E5B73200D39094 /* dialogProvider.m */, CCD590F210E5B76300D39094 /* VLCLoginPanel.h */, diff --git a/modules/gui/macosx_dialog_provider/dialogProvider.m b/modules/gui/macosx_dialog_provider/dialogProvider.m index 95d058bd96..fccec6e629 100644 --- a/modules/gui/macosx_dialog_provider/dialogProvider.m +++ b/modules/gui/macosx_dialog_provider/dialogProvider.m @@ -94,6 +94,7 @@ int OpenIntf(vlc_object_t *p_this) memset(p_intf->p_sys,0,sizeof(*p_intf->p_sys)); + p_intf->b_should_run_on_first_thread = true; p_intf->pf_run = Run; msg_Dbg(p_intf,"Opening Mac OS X dialog provider"); @@ -122,12 +123,10 @@ static void Run( intf_thread_t *p_intf ) /* idle */ while(vlc_object_alive(p_intf)) - { - sleep( 100000 ); - } + msleep(INTF_IDLE_SLEEP); /* unsubscribe from the interactive dialogues */ - dialog_Unregister(p_intf ); + dialog_Unregister(p_intf); var_DelCallback(p_intf,"dialog-error",DisplayError,p_intf); var_DelCallback(p_intf,"dialog-critical",DisplayCritical,p_intf); var_DelCallback(p_intf,"dialog-login",DisplayLogin,p_intf);