[vlc-devel] commit: osx dialog provider: make sure we can actually quit VLC ( Felix Paul Kühne )

git version control git at videolan.org
Sat Dec 26 17:43:45 CET 2009


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sat Dec 26 17:43:35 2009 +0100| [77271be3e3ef44bcf777639d61fef615bbfc55bc] | committer: Felix Paul Kühne 

osx dialog provider: make sure we can actually quit VLC

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=77271be3e3ef44bcf777639d61fef615bbfc55bc
---

 .../package/macosx/vlc.xcodeproj/project.pbxproj   |    4 ++++
 .../gui/macosx_dialog_provider/dialogProvider.m    |    7 +++----
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/extras/package/macosx/vlc.xcodeproj/project.pbxproj b/extras/package/macosx/vlc.xcodeproj/project.pbxproj
index af22acf..62527c1 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 = "<group>"; };
 		CC962E2C0CC7992800A56695 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = "<absolute>"; };
 		CC965D5D0DA5880F0088F222 /* display_middle.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = display_middle.png; path = Resources/display_middle.png; sourceTree = "<group>"; };
@@ -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 95d058b..fccec6e 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);




More information about the vlc-devel mailing list