I would make it:
proc webcambuttonAction { w } {
if {[::config::getKey webcamDevice] != ""} {
::amsn::ShowChatList \"[trans sendwebcaminvite]\" $w
::MSNCAM::SendInviteQueue
} elseif {[OnMac] } {
# On mac webcamDevice always returns 0. So we need to check
manually if the grabber is open. If the grabber isn't open then we create it.
# The behaviour of the grabber window opening without the user
configuring the cam first is default for most OS X applications, and a lot of
users have requested this.
if {[winfo exists .grabber]} {
::amsn::ShowChatList \"[trans sendwebcaminvite]\" $w
::MSNCAM::SendInviteQueue
} else {
::CAMGUI::CreateGrabberWindowMac
::amsn::ShowChatList \"[trans sendwebcaminvite]\" $w
::MSNCAM::SendInviteQueue
}
} else {
::CAMGUI::WebcamWizard
}
}
But it only differs in coding style
On Sat, 2006-08-05 at 15:31 +0100, Tom Hennigan wrote:
> Heya,
>
>
> I found a solution for the webcam button problem
> (CF. http://forums.cocoaforge.com/viewtopic.php?t=8623). The solution
> I propose changes the behavior of the button on Mac to act as almost
> every other Mac application acts. That is that the grabber window will
> open without the user having to configure anything. The user can
> always click the Configure Webcam option in the grabber window to suit
> their needs if they feel that the settings are wrong.
>
>
> The diff also adds a title to the grabber window, because atm one
> isn't set.
>
>
>
>
>
>
> - Tom
>
>
> Index: chatwindow.tcl
> ===================================================================
> --- chatwindow.tcl (revision 7056)
> +++ chatwindow.tcl (working copy)
> @@ -2201,13 +2201,23 @@
> proc webcambuttonAction { w } {
> if {[::config::getKey webcamDevice] != ""} {
> ::amsn::ShowChatList \"[trans sendwebcaminvite]\"
> $w ::MSNCAM::SendInviteQueue
> -
> } else {
> - ::CAMGUI::WebcamWizard
> + if {[OnMac]} {
> + # On mac webcamDevice always returns 0. So we need to
> check manually if the grabber is open. If the grabber isn't open then
> we create it.
> + # The behaviour of the grabber window opening without
> the user configuring the cam first is default for most OS X
> applications, and a lot of users have requested this.
> + if {[winfo exists .grabber]} {
> + ::amsn::ShowChatList \"[trans sendwebcaminvite]\"
> $w ::MSNCAM::SendInviteQueue
> + } else {
> + ::CAMGUI::CreateGrabberWindowMac
> + ::amsn::ShowChatList \"[trans sendwebcaminvite]\"
> $w ::MSNCAM::SendInviteQueue
> + }
> + } else {
> + ::CAMGUI::WebcamWizard
> + }
> }
> }
> proc SetWebcamText {} {
> - if {[::config::getKey webcamDevice] != ""} {
> + if {[::config::getKey webcamDevice] != "" || [OnMac]} {
> return "[trans sendwebcaminvite]"
>
>
>
> } else {
> Index: msncam.tcl
> ===================================================================
> --- msncam.tcl (revision 7056)
> +++ msncam.tcl (working copy)
> @@ -1975,6 +1975,8 @@
> spinbox $w.zoom -from 1 -to 5 -increment 0.5 -width 2
> -command "catch {$w.seq configure -zoom %s}"
> pack $w.zoomtext
> pack $w.zoom
> +
> + wm title $w "[trans webcam] - [::config::getKey login]"
> } else {
> destroy $w
> #If it's not possible to create the video frame, show the
> error
>
> ------------------------------------
> Tom Hennigan
> [EMAIL PROTECTED]
> http://www.justclimbit.co.uk/
>
>
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________ Amsn-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/amsn-devel
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Amsn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amsn-devel