[138479] branches/gsoc15-pallet/Pallet
ksammons at macports.org
ksammons at macports.org
Thu Jul 9 11:53:06 PDT 2015
Revision: 138479
https://trac.macports.org/changeset/138479
Author: ksammons at macports.org
Date: 2015-07-09 11:53:06 -0700 (Thu, 09 Jul 2015)
Log Message:
-----------
Added proper notification types and settings for reclaim and diagnose
Modified Paths:
--------------
branches/gsoc15-pallet/Pallet/GrowlNotifications.h
branches/gsoc15-pallet/Pallet/MPActionLauncher.m
branches/gsoc15-pallet/Pallet/MPActionsController.m
branches/gsoc15-pallet/Pallet/Pallet.xcodeproj/project.xcworkspace/xcuserdata/mrappleseed.xcuserdatad/UserInterfaceState.xcuserstate
Modified: branches/gsoc15-pallet/Pallet/GrowlNotifications.h
===================================================================
--- branches/gsoc15-pallet/Pallet/GrowlNotifications.h 2015-07-09 18:48:16 UTC (rev 138478)
+++ branches/gsoc15-pallet/Pallet/GrowlNotifications.h 2015-07-09 18:53:06 UTC (rev 138479)
@@ -10,17 +10,22 @@
/* Defining growl types*/
/**/
-#define GROWL_TYPES 12
+#define GROWL_TYPES 16
#define GROWL_INSTALL 0
#define GROWL_UNINSTALL 1
#define GROWL_UPGRADE 2
#define GROWL_SYNC 3
#define GROWL_SELFUPDATE 4
-#define GROWL_INSTALLFAILED 5
-#define GROWL_UNINSTALLFAILED 6
-#define GROWL_UPGRADEFAILED 7
-#define GROWL_SYNCFAILED 8
-#define GROWL_SELFUPDATEFAILED 9
+#define GROWL_DIAGNOSE 5
+#define GROWL_RECLAIM 6
+#define GROWL_INSTALLFAILED 7
+#define GROWL_UNINSTALLFAILED 8
+#define GROWL_UPGRADEFAILED 9
+#define GROWL_SYNCFAILED 10
+#define GROWL_DIAGNOSEFAILED 11
+#define GROWL_RECLAIMFAILED 12
+#define GROWL_SELFUPDATEFAILED 13
-#define GROWL_ALLOPS 10
-#define GROWL_ALLOPSFAILED 11
+
+#define GROWL_ALLOPS 14
+#define GROWL_ALLOPSFAILED 15
Modified: branches/gsoc15-pallet/Pallet/MPActionLauncher.m
===================================================================
--- branches/gsoc15-pallet/Pallet/MPActionLauncher.m 2015-07-09 18:48:16 UTC (rev 138478)
+++ branches/gsoc15-pallet/Pallet/MPActionLauncher.m 2015-07-09 18:53:06 UTC (rev 138479)
@@ -118,6 +118,22 @@
}
}
+- (void)diagnose
+{
+ errorReceived = NO;
+ NSError * error;
+ [[MPMacPorts sharedInstance] diagnose:&error];
+ if(errorReceived)
+ {
+ [self sendNotification:GROWL_DIAGNOSEFAILED];
+ }
+ else
+ {
+ [self sendNotification:GROWL_DIAGNOSE];
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"advanceQ" object:nil userInfo:nil];
+ }
+}
+
- (void)sync {
errorReceived=NO;
NSError * error;
@@ -174,11 +190,15 @@
notificationTitles[GROWL_UNINSTALL] = @"Uninstall Completed";
notificationTitles[GROWL_UPGRADE] = @"Upgrade Completed";
notificationTitles[GROWL_SYNC] = @"Sync Completed";
+ notificationTitles[GROWL_DIAGNOSE] = @"Diagnose Completed";
+ notificationTitles[GROWL_RECLAIM] = @"Reclaim Completed";
notificationTitles[GROWL_SELFUPDATE] = @"Selfupdate Completed";
notificationTitles[GROWL_INSTALLFAILED] = @"Installation Failed";
notificationTitles[GROWL_UNINSTALLFAILED] = @"Uninstall Failed";
notificationTitles[GROWL_UPGRADEFAILED] = @"Upgrade Failed";
notificationTitles[GROWL_SYNCFAILED] = @"Sync Failed";
+ notificationTitles[GROWL_DIAGNOSEFAILED] = @"Diagnose Failed";
+ notificationTitles[GROWL_RECLAIMFAILED] = @"Reclaim Failed";
notificationTitles[GROWL_SELFUPDATEFAILED] = @"Selfupdate Failed";
notificationTitles[GROWL_ALLOPS] = @"Operations Completed";
@@ -190,11 +210,15 @@
notificationDescriptions[GROWL_UNINSTALL] = @"Operation completed successfully";
notificationDescriptions[GROWL_UPGRADE] = @"Operation completed successfully";
notificationDescriptions[GROWL_SYNC] = @"Operation completed successfully";
+ notificationDescriptions[GROWL_DIAGNOSE] = @"Operation completed successfully";
+ notificationDescriptions[GROWL_RECLAIM] = @"Operation completed successfully";
notificationDescriptions[GROWL_SELFUPDATE] = @"Operation completed successfully";
notificationDescriptions[GROWL_INSTALLFAILED] = @"Operation Failed";
notificationDescriptions[GROWL_UNINSTALLFAILED] = @"Operation Failed";
notificationDescriptions[GROWL_UPGRADEFAILED] = @"Operation Failed";
notificationDescriptions[GROWL_SYNCFAILED] = @"Operation Failed";
+ notificationDescriptions[GROWL_DIAGNOSEFAILED] = @"Operation Failed";
+ notificationDescriptions[GROWL_RECLAIMFAILED] = @"Operation Failed";
notificationDescriptions[GROWL_SELFUPDATEFAILED] = @"Operation Failed";
notificationDescriptions[GROWL_ALLOPS] = @"All Operations Completed Succesfully";
Modified: branches/gsoc15-pallet/Pallet/MPActionsController.m
===================================================================
--- branches/gsoc15-pallet/Pallet/MPActionsController.m 2015-07-09 18:48:16 UTC (rev 138478)
+++ branches/gsoc15-pallet/Pallet/MPActionsController.m 2015-07-09 18:53:06 UTC (rev 138479)
@@ -440,6 +440,11 @@
[[MPActionLauncher sharedInstance]
performSelectorInBackground:@selector(sync) withObject:nil];
}
+ else if([[dict objectForKey:@"operation"] isEqualToString:@"diagnose"])
+ {
+ NSLog(@"We have diagnose");
+ [[MPActionLauncher sharedInstance] performSelectorInBackground:@selector(diagnose) withObject:nil];
+ }
}
else
{
Modified: branches/gsoc15-pallet/Pallet/Pallet.xcodeproj/project.xcworkspace/xcuserdata/mrappleseed.xcuserdatad/UserInterfaceState.xcuserstate
===================================================================
(Binary files differ)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150709/17647b1a/attachment-0001.html>
More information about the macports-changes
mailing list