浏览代码

clear code

Marino Faggiana 8 年之前
父节点
当前提交
08b40ebb88

+ 1 - 1
Picker/DocumentPickerViewController.swift

@@ -763,7 +763,7 @@ extension DocumentPickerViewController: UITableViewDataSource {
         }
         
         if metadata.directory && CCCoreData.isDirectoryLock(lockServerUrl, activeAccount: activeAccount) && (passcode?.characters.count)! > 0 {
-            cell.StatusImageView.image = UIImage(named: image_passcode)
+            cell.StatusImageView.image = UIImage(named: "passcode")
         } else {
             cell.StatusImageView.image = nil
         }

+ 8 - 8
iOSClient/AppDelegate.m

@@ -819,14 +819,14 @@
     // File
     item = [tabBarController.tabBar.items objectAtIndex: k_tabBarApplicationIndexFile];
     [item setTitle:NSLocalizedString(@"_home_", nil)];
-    item.image = [UIImage imageNamed:image_tabBarFiles];
-    item.selectedImage = [UIImage imageNamed:image_tabBarFiles];
+    item.image = [UIImage imageNamed:@"tabBarFiles"];
+    item.selectedImage = [UIImage imageNamed:@"tabBarFiles"];
     
     // Favorites
     item = [tabBarController.tabBar.items objectAtIndex: k_tabBarApplicationIndexOffline];
     [item setTitle:NSLocalizedString(@"_favorites_", nil)];
-    item.image = [UIImage imageNamed:image_tabBarFavorite];
-    item.selectedImage = [UIImage imageNamed:image_tabBarFavorite];
+    item.image = [UIImage imageNamed:@"tabBarFavorite"];
+    item.selectedImage = [UIImage imageNamed:@"tabBarFavorite"];
     
     // Hide (PLUS)
     item = [tabBarController.tabBar.items objectAtIndex: k_tabBarApplicationIndexHide];
@@ -837,14 +837,14 @@
     // Photos
     item = [tabBarController.tabBar.items objectAtIndex: k_tabBarApplicationIndexPhotos];
     [item setTitle:NSLocalizedString(@"_photo_camera_", nil)];
-    item.image = [UIImage imageNamed:image_tabBarPhotos];
-    item.selectedImage = [UIImage imageNamed:image_tabBarPhotos];
+    item.image = [UIImage imageNamed:@"tabBarPhotos"];
+    item.selectedImage = [UIImage imageNamed:@"tabBarPhotos"];
     
     // More
     item = [tabBarController.tabBar.items objectAtIndex: k_tabBarApplicationIndexMore];
     [item setTitle:NSLocalizedString(@"_more_", nil)];
-    item.image = [UIImage imageNamed:image_tabBarMore];
-    item.selectedImage = [UIImage imageNamed:image_tabBarMore];
+    item.image = [UIImage imageNamed:@"tabBarMore"];
+    item.selectedImage = [UIImage imageNamed:@"tabBarMore"];
     
     // Plus Button
     UIImage *buttonImage = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"tabBarPlus"] color:[NCBrandColor sharedInstance].brand];

+ 0 - 24
iOSClient/CCStandardImages.h

@@ -22,20 +22,6 @@
 //
 
 
-#define image_MenuUploadPlainMode               @"menuUploadPlainMode"
-
-#define image_navBarOffline                     @"navBarOffline"
-#define image_navBarLocal                       @"navBarLocal"
-#define image_notification                      @"notification"
-
-#define image_offline                           @"offline"
-#define image_offlineTitle                      @"offlineTitle"
-#define image_openSelectedFiles                 @"openSelectedFiles"
-
-#define image_passcode                          @"passcode"
-#define image_plist                             @"plist"
-#define image_photosNoRecord                    @"photosNoRecord"
-
 #define image_quickActionPhotos                 @"quickActionPhotos"
 #define image_quickActionUpload                 @"quickActionUpload"
 #define image_quickActionUploadEncrypted        @"quickActionUploadEncrypted"
@@ -85,15 +71,5 @@
 #define image_stoptask                          @"stoptask"
 #define image_stoptaskcrypto                    @"stoptaskcrypto"
 
-#define image_tabBarFiles                       @"tabBarFiles"
-#define image_tabBarActivity                    @"activity"
-#define image_tabBarTransfer                    @"transfer"
-#define image_tabBarFavorite                    @"tabBarFavorite"
-#define image_tabBarOffline                     @"tabBarOffline"
-#define image_tabBarLocal                       @"tabBarLocal"
-#define image_tabBarPhotos                      @"tabBarPhotos"
-#define image_tabBarSettings                    @"tabBarSettings"
-#define image_tabBarMore                        @"tabBarMore"
-
 
 

+ 1 - 1
iOSClient/Create/CCCreateCloud.swift

@@ -129,7 +129,7 @@ class CreateMenuAdd: NSObject {
             self.createMenuTemplate(view: view)
         })
 
-        actionSheet.addButton(withTitle: NSLocalizedString("_upload_plain_mode", comment: ""), image: UIImage(named: image_MenuUploadPlainMode), backgroundColor: colorLightGray, height: 50.0, type: AHKActionSheetButtonType.default, handler: {(AHKActionSheet) -> Void in
+        actionSheet.addButton(withTitle: NSLocalizedString("_upload_plain_mode", comment: ""), image: UIImage(named: "menuUploadPlainMode"), backgroundColor: colorLightGray, height: 50.0, type: AHKActionSheetButtonType.default, handler: {(AHKActionSheet) -> Void in
             self.createMenuPlain(view: view)
         })
         

+ 3 - 3
iOSClient/Main/CCMain.m

@@ -601,7 +601,7 @@
     // Notification
     if ([app.listOfNotifications count] > 0) {
         
-        buttonNotification = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:image_notification] style:UIBarButtonItemStylePlain target:self action:@selector(viewNotification)];
+        buttonNotification = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"notification"] style:UIBarButtonItemStylePlain target:self action:@selector(viewNotification)];
         buttonNotification.tintColor = [NCBrandColor sharedInstance].navigationBarText;
         buttonNotification.enabled = true;
     }
@@ -5077,7 +5077,7 @@
     // Directory con passcode lock attivato
     NSString *lockServerUrl = [CCUtility stringAppendServerUrl:serverUrl addFileName:metadata.fileNameData];
     if (metadata.directory && ([CCCoreData isDirectoryLock:lockServerUrl activeAccount:app.activeAccount] && [[CCUtility getBlockCode] length]))
-        cell.statusImageView.image = [UIImage imageNamed:image_passcode];
+        cell.statusImageView.image = [UIImage imageNamed:@"passcode"];
     
     // ----------------------------------------------------------------------------------------------------------
     // Offline
@@ -5087,7 +5087,7 @@
     
     if (isOfflineFile) {
         
-        cell.offlineImageView.image = [UIImage imageNamed:image_offline];
+        cell.offlineImageView.image = [UIImage imageNamed:@"offline"];
     }
     
     // ----------------------------------------------------------------------------------------------------------

+ 2 - 2
iOSClient/PhotosCameraUpload/CCPhotosCameraUpload.m

@@ -143,7 +143,7 @@
     icon = [UIImage imageNamed:@"deleteSelectedFiles"];
     UIBarButtonItem *buttonDelete = [[UIBarButtonItem alloc] initWithImage:icon style:UIBarButtonItemStylePlain target:self action:@selector(deleteSelectedFiles)];
     
-    icon = [UIImage imageNamed:image_openSelectedFiles];
+    icon = [UIImage imageNamed:@"openSelectedFiles"];
     UIBarButtonItem *buttonOpenWith = [[UIBarButtonItem alloc] initWithImage:icon style:UIBarButtonItemStylePlain target:self action:@selector(openSelectedFiles)];
     
     UIBarButtonItem *leftButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"_cancel_", nil) style:UIBarButtonItemStylePlain target:self action:@selector(reloadCollection)];
@@ -250,7 +250,7 @@
 
 - (UIImage *)imageForEmptyDataSet:(UIScrollView *)scrollView
 {
-    return [CCGraphics changeThemingColorImage:[UIImage imageNamed:image_photosNoRecord] color:[NCBrandColor sharedInstance].brand];
+    return [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"photosNoRecord"] color:[NCBrandColor sharedInstance].brand];
 }
 
 - (NSAttributedString *)titleForEmptyDataSet:(UIScrollView *)scrollView

+ 2 - 2
iOSClient/Utility/CCUtility.m

@@ -853,7 +853,7 @@
         // if wrong code, icon protect
         if (metadata.errorPasscode) {
             metadata.typeFile = k_metadataTypeFile_unknown;
-            metadata.iconName = image_plist;
+            metadata.iconName = @"plist";
             return;
         }
         // Type compress
@@ -916,7 +916,7 @@
                 
             } else {
             
-                if (metadata.cryptated) metadata.iconName = image_plist;
+                if (metadata.cryptated) metadata.iconName = @"plist";
                 else metadata.iconName = @"file";
             }
         }