"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "macosx/ocsng_app-xcode/main.m" between
Ocsinventory-Unix-Agent-2.8.0.tar.gz and Ocsinventory-Unix-Agent-2.8.1.tar.gz

About: Ocsinventory-Agent is a Linux agent for OCS Inventory NG.

main.m  (Ocsinventory-Unix-Agent-2.8.0):main.m  (Ocsinventory-Unix-Agent-2.8.1)
skipping to change at line 16 skipping to change at line 16
// //
// This code is open source and may be copied and modified as long as the source // This code is open source and may be copied and modified as long as the source
// code is always made freely available. // code is always made freely available.
// Please refer to the General Public Licence http://www.gnu.org/ // Please refer to the General Public Licence http://www.gnu.org/
// //
// //
#import <Cocoa/Cocoa.h> #import <Cocoa/Cocoa.h>
#include <Security/Authorization.h> #include <Security/Authorization.h>
#include <Security/AuthorizationTags.h> #include <Security/AuthorizationTags.h>
#include "GetPID.h"
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init]; NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
[NSApplication sharedApplication]; [NSApplication sharedApplication];
int launchOcsAgent = 1; int launchOcsAgent = 1;
//Getting current user //Getting current user
NSString *user = NSUserName() ; NSString *user = NSUserName() ;
skipping to change at line 40 skipping to change at line 41
ProcessSerialNumber psn = { 0, kCurrentProcess }; ProcessSerialNumber psn = { 0, kCurrentProcess };
TransformProcessType(&psn, kProcessTransformToForegroundA pplication); TransformProcessType(&psn, kProcessTransformToForegroundA pplication);
} }
NSAlert *askOcsAgentLaunch = [[NSAlert alloc] init]; NSAlert *askOcsAgentLaunch = [[NSAlert alloc] init];
[askOcsAgentLaunch setMessageText:NSLocalizedString(@"Ask_agent_r un", @"First Window question")]; [askOcsAgentLaunch setMessageText:NSLocalizedString(@"Ask_agent_r un", @"First Window question")];
[askOcsAgentLaunch setInformativeText:NSLocalizedString(@"Ask_age nt_run_comment", @"First window comment")]; [askOcsAgentLaunch setInformativeText:NSLocalizedString(@"Ask_age nt_run_comment", @"First window comment")];
[askOcsAgentLaunch addButtonWithTitle:NSLocalizedString(@"Yes", @ "Yes Button")]; [askOcsAgentLaunch addButtonWithTitle:NSLocalizedString(@"Yes", @ "Yes Button")];
[askOcsAgentLaunch addButtonWithTitle:NSLocalizedString(@"No", @" No Button")]; [askOcsAgentLaunch addButtonWithTitle:NSLocalizedString(@"No", @" No Button")];
[askOcsAgentLaunch setAlertStyle:NSInformationalAlertStyle]; [askOcsAgentLaunch setAlertStyle:NSAlertStyleInformational];
//Our application become the topmost window //Our application become the topmost window
[NSApp activateIgnoringOtherApps:YES]; [NSApp activateIgnoringOtherApps:YES];
if ([askOcsAgentLaunch runModal] != NSAlertFirstButtonReturn) { if ([askOcsAgentLaunch runModal] != NSAlertFirstButtonReturn) {
// Button 'No' was clicked, we don't launch OCS agent // Button 'No' was clicked, we don't launch OCS agent
launchOcsAgent = 0; launchOcsAgent = 0;
} }
[askOcsAgentLaunch release]; [askOcsAgentLaunch release];
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)