Revision: 29
http://xmeeting.svn.sourceforge.net/xmeeting/?rev=29&view=rev
Author: hfriederich
Date: 2009-01-21 21:55:37 +0000 (Wed, 21 Jan 2009)
Log Message:
-----------
Allow to display alert directly from GUI
Modified Paths:
--------------
XMeeting/trunk/Source/Application/XMApplicationController.h
XMeeting/trunk/Source/Application/XMApplicationController.m
Modified: XMeeting/trunk/Source/Application/XMApplicationController.h
===================================================================
--- XMeeting/trunk/Source/Application/XMApplicationController.h 2009-01-21 21:54:00 UTC (rev 28)
+++ XMeeting/trunk/Source/Application/XMApplicationController.h 2009-01-21 21:55:37 UTC (rev 29)
@@ -82,6 +82,8 @@
- (void)showStatisticsInspector;
- (void)showCallHistoryInspector;
+- (void)noteCannotCallAddress:(NSString *)address reason:(XMCallStartFailReason)reason;
+
@end
#endif // __XM_APPLICATION_CONTROLLER_H__
\ No newline at end of file
Modified: XMeeting/trunk/Source/Application/XMApplicationController.m
===================================================================
--- XMeeting/trunk/Source/Application/XMApplicationController.m 2009-01-21 21:54:00 UTC (rev 28)
+++ XMeeting/trunk/Source/Application/XMApplicationController.m 2009-01-21 21:55:37 UTC (rev 29)
@@ -84,6 +84,7 @@
// displaying dialogs
- (void)_displayIncomingCallAlert;
- (void)_displayCallStartFailedAlert:(NSString *)address;
+- (void)_displayCallStartFailedAlert:(NSString *)address failReason:(XMCallStartFailReason)failReason;
- (void)_displayEnablingH323FailedAlert;
- (void)_displayGatekeeperRegistrationFailedAlert;
- (void)_displayEnablingSIPFailedAlert;
@@ -265,6 +266,11 @@
[[XMInspectorController inspectorWithTag:XMInspectorControllerTag_Inspector] showModule:callHistoryModule];
}
+- (void)noteCannotCallAddress:(NSString *)address reason:(XMCallStartFailReason)reason
+{
+ [self _displayCallStartFailedAlert:address failReason:reason];
+}
+
#pragma mark -
#pragma mark NSApplication delegate methods
@@ -490,6 +496,12 @@
- (void)_displayCallStartFailedAlert:(NSString *)address
{
+ XMCallStartFailReason failReason = [[XMCallManager sharedInstance] callStartFailReason];
+ [self _displayCallStartFailedAlert:address failReason:failReason];
+}
+
+- (void)_displayCallStartFailedAlert:(NSString *)address failReason:(XMCallStartFailReason)failReason
+{
NSAlert *alert = [[NSAlert alloc] init];
[alert setMessageText:NSLocalizedString(@"XM_CALL_FAILED_MESSAGE", @"")];
@@ -497,8 +509,6 @@
NSString *informativeTextFormat = NSLocalizedString(@"XM_CALL_FAILED_INFO_TEXT", @"");
NSString *failReasonText;
- XMCallStartFailReason failReason = [[XMCallManager sharedInstance] callStartFailReason];
-
switch (failReason) {
case XMCallStartFailReason_H323NotEnabled:
failReasonText = NSLocalizedString(@"XM_CALL_FAILED_H323_NOT_ENABLED", @"");
@@ -524,7 +534,7 @@
default:
failReasonText = [NSString stringWithFormat:NSLocalizedString(@"XM_UNKNOWN_REASON", @""), failReason];
break;
- }
+ }
NSString *informativeText = [[NSString alloc] initWithFormat:informativeTextFormat, address, failReasonText];
[alert setInformativeText:informativeText];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|