jenkins-bot has submitted this change and it was merged.

Change subject: Prework for Save Button
......................................................................


Prework for Save Button

Bug 103888
Add ability for button type to be applied to button created in IB
Rename enum (Boyscout while implementing)

Change-Id: Ief53e35d67eb591d6627d671f1c71bd9c1234562
---
M Wikipedia/UI-V5/UIButton+WMFButton.h
M Wikipedia/UI-V5/UIButton+WMFButton.m
M Wikipedia/View Controllers/About/AboutViewController.m
M Wikipedia/View Controllers/AccountCreation/AccountCreationViewController.m
M Wikipedia/View Controllers/EditSummary/EditSummaryViewController.m
M Wikipedia/View Controllers/History/HistoryViewController.m
M Wikipedia/View Controllers/Languages/LanguagesViewController.m
M Wikipedia/View Controllers/Login/LoginViewController.m
M Wikipedia/View Controllers/Navigation/Primary/PrimaryMenuViewController.m
M Wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m
M Wikipedia/View Controllers/Nearby/NearbyViewController.m
M Wikipedia/View Controllers/PageHistory/PageHistoryViewController.m
M Wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m
M Wikipedia/View Controllers/SavedPages/SavedPagesViewController.m
M Wikipedia/View Controllers/SectionEditor/SectionEditorViewController.m
M Wikipedia/View Controllers/WebView/WebViewController.m
16 files changed, 114 insertions(+), 109 deletions(-)

Approvals:
  Mhurd: Looks good to me, approved
  Bgerstle: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/Wikipedia/UI-V5/UIButton+WMFButton.h 
b/Wikipedia/UI-V5/UIButton+WMFButton.h
index 5a0d29e..634f9e7 100644
--- a/Wikipedia/UI-V5/UIButton+WMFButton.h
+++ b/Wikipedia/UI-V5/UIButton+WMFButton.h
@@ -4,19 +4,19 @@
 #import <UIKit/UIKit.h>
 
 typedef NS_ENUM (NSInteger, WMFButtonType) {
-    WMF_BUTTON_W,
-    WMF_BUTTON_SHARE,
-    WMF_BUTTON_FORWARD,
-    WMF_BUTTON_BACKWARD,
-    WMF_BUTTON_HEART,
-    WMF_BUTTON_TOC,
-    WMF_BUTTON_X,
-    WMF_BUTTON_X_WHITE,
-    WMF_BUTTON_TRASH,
-    WMF_BUTTON_TRANSLATE,
-    WMF_BUTTON_MAGNIFY,
-    WMF_BUTTON_RELOAD,
-    WMF_BUTTON_CARET_LEFT
+    WMFButtonTypeW,
+    WMFButtonTypeShare,
+    WMFButtonTypeForward,
+    WMFButtonTypeBackward,
+    WMFButtonTypeHeart,
+    WMFButtonTypeTableOfContents,
+    WMFButtonTypeX,
+    WMFButtonTypeXWhite,
+    WMFButtonTypeTrash,
+    WMFButtonTypeTranslate,
+    WMFButtonTypeMagnify,
+    WMFButtonTypeReload,
+    WMFButtonTypeCaretLeft
 };
 
 @interface UIButton (WMFGlyph)
@@ -24,4 +24,6 @@
 + (UIButton*)wmf_buttonType:(WMFButtonType)type
                     handler:(void (^)(id sender))action;
 
+- (void)wmf_setButtonType:(WMFButtonType)type;
+
 @end
\ No newline at end of file
diff --git a/Wikipedia/UI-V5/UIButton+WMFButton.m 
b/Wikipedia/UI-V5/UIButton+WMFButton.m
index a510cc6..1bdc3f4 100644
--- a/Wikipedia/UI-V5/UIButton+WMFButton.m
+++ b/Wikipedia/UI-V5/UIButton+WMFButton.m
@@ -12,67 +12,9 @@
 
 + (UIButton*)wmf_buttonType:(WMFButtonType)type handler:(void (^)(id 
sender))action {
     UIButton* button = [UIButton buttonWithType:UIButtonTypeCustom];
-
     button.frame = (CGRect){{0, 0}, {40, 40}};
 
-    void (^ configForState)(UIControlState, WMFGlyphs, NSNumber*, UIColor*) = 
^void (UIControlState state, WMFGlyphs glyph, NSNumber* offset, UIColor* color) 
{
-        [button setAttributedTitle:[self attributedStringForGlyph:glyph 
baselineOffset:offset color:color]
-                          forState:state];
-    };
-
-    switch (type) {
-        case WMF_BUTTON_W:
-            configForState(UIControlStateNormal, WMF_GLYPH_W, @(2.0), nil);
-            break;
-        case WMF_BUTTON_SHARE:
-            configForState(UIControlStateNormal, WMF_GLYPH_SHARE, @(0.2), nil);
-            break;
-        case WMF_BUTTON_FORWARD:
-            configForState(UIControlStateNormal, WMF_GLYPH_FORWARD, nil, nil);
-            configForState(UIControlStateDisabled, WMF_GLYPH_FORWARD, nil, 
[UIColor lightGrayColor]);
-            break;
-        case WMF_BUTTON_BACKWARD:
-            configForState(UIControlStateNormal, WMF_GLYPH_BACKWARD, nil, nil);
-            configForState(UIControlStateDisabled, WMF_GLYPH_BACKWARD, nil, 
[UIColor lightGrayColor]);
-            break;
-        case WMF_BUTTON_HEART:
-            configForState(UIControlStateNormal, WMF_GLYPH_HEART_OUTLINE, nil, 
nil);
-            configForState(UIControlStateSelected, WMF_GLYPH_HEART, nil, 
[UIColor redColor]);
-            break;
-        case WMF_BUTTON_TOC:
-            configForState(UIControlStateNormal, WMF_GLYPH_TOC_COLLAPSED, 
@(2.0), nil);
-            configForState(UIControlStateDisabled, WMF_GLYPH_TOC_COLLAPSED, 
@(2.0), [UIColor lightGrayColor]);
-            configForState(UIControlStateSelected, WMF_GLYPH_TOC_EXPANDED, 
@(2.0), nil);
-            break;
-        case WMF_BUTTON_X:
-            configForState(UIControlStateNormal, WMF_GLYPH_X, @(2.8), nil);
-            break;
-        case WMF_BUTTON_X_WHITE:
-            configForState(UIControlStateNormal, WMF_GLYPH_X, @(2.8), [UIColor 
whiteColor]);
-            break;
-        case WMF_BUTTON_TRASH:
-            configForState(UIControlStateNormal, WMF_GLYPH_TRASH, nil, nil);
-            configForState(UIControlStateDisabled, WMF_GLYPH_TRASH, nil, 
[UIColor lightGrayColor]);
-            break;
-        case WMF_BUTTON_TRANSLATE:
-            configForState(UIControlStateNormal, WMF_GLYPH_TRANSLATE, @(1.4), 
nil);
-            configForState(UIControlStateDisabled, WMF_GLYPH_TRANSLATE, 
@(1.4), [UIColor lightGrayColor]);
-            break;
-        case WMF_BUTTON_MAGNIFY:
-            configForState(UIControlStateNormal, WMF_GLYPH_MAGNIFY, @(1.0), 
nil);
-            break;
-        case WMF_BUTTON_RELOAD:
-            configForState(UIControlStateNormal, WMF_GLYPH_RELOAD, nil, nil);
-            configForState(UIControlStateDisabled, WMF_GLYPH_RELOAD, nil, 
[UIColor lightGrayColor]);
-            break;
-        case WMF_BUTTON_CARET_LEFT:
-            configForState(UIControlStateNormal, WMF_GLYPH_CARET_LEFT, nil, 
nil);
-            break;
-        default:
-            break;
-    }
-
-    [self mirrorButton:button ifNecessaryForType:type];
+    [button wmf_setButtonType:type];
 
     [button bk_addEventHandler:^(UIButton* sender){
         sender.highlighted = !sender.selected; // Prevent annoying flicker.
@@ -80,7 +22,7 @@
 
     [button bk_addEventHandler:^(UIButton* sender){
         sender.highlighted = !sender.selected; // Prevent annoying flicker.
-        [sender animateAndRewindXF:CATransform3DMakeScale([self 
xMirroringMultiplierForButtonType:type] * 1.25, 1.25, 1.0f)
+        [sender animateAndRewindXF:CATransform3DMakeScale([sender 
xMirroringMultiplierForButtonType:type] * 1.25, 1.25, 1.0f)
                         afterDelay:0.0
                           duration:0.04f
                               then:^{
@@ -93,25 +35,86 @@
     return button;
 }
 
-+ (void)mirrorButton:(UIButton*)button ifNecessaryForType:(WMFButtonType)type {
-    button.transform = CGAffineTransformMakeScale(1.0* [self 
xMirroringMultiplierForButtonType:type], 1.0);
+- (void)wmf_setButtonType:(WMFButtonType)type {
+    [self mirrorIfNecessaryForType:type];
+
+    void (^ configForState)(UIControlState, WMFGlyphs, NSNumber*, UIColor*) = 
^void (UIControlState state, WMFGlyphs glyph, NSNumber* offset, UIColor* color) 
{
+        [self setAttributedTitle:[[self class] attributedStringForGlyph:glyph 
baselineOffset:offset color:color]
+                        forState:state];
+    };
+
+    switch (type) {
+        case WMFButtonTypeW:
+            configForState(UIControlStateNormal, WMF_GLYPH_W, @(2.0), nil);
+            break;
+        case WMFButtonTypeShare:
+            configForState(UIControlStateNormal, WMF_GLYPH_SHARE, @(0.2), nil);
+            break;
+        case WMFButtonTypeForward:
+            configForState(UIControlStateNormal, WMF_GLYPH_FORWARD, nil, nil);
+            configForState(UIControlStateDisabled, WMF_GLYPH_FORWARD, nil, 
[UIColor lightGrayColor]);
+            break;
+        case WMFButtonTypeBackward:
+            configForState(UIControlStateNormal, WMF_GLYPH_BACKWARD, nil, nil);
+            configForState(UIControlStateDisabled, WMF_GLYPH_BACKWARD, nil, 
[UIColor lightGrayColor]);
+            break;
+        case WMFButtonTypeHeart:
+            configForState(UIControlStateNormal, WMF_GLYPH_HEART_OUTLINE, nil, 
nil);
+            configForState(UIControlStateSelected, WMF_GLYPH_HEART, nil, 
[UIColor redColor]);
+            break;
+        case WMFButtonTypeTableOfContents:
+            configForState(UIControlStateNormal, WMF_GLYPH_TOC_COLLAPSED, 
@(2.0), nil);
+            configForState(UIControlStateDisabled, WMF_GLYPH_TOC_COLLAPSED, 
@(2.0), [UIColor lightGrayColor]);
+            configForState(UIControlStateSelected, WMF_GLYPH_TOC_EXPANDED, 
@(2.0), nil);
+            break;
+        case WMFButtonTypeX:
+            configForState(UIControlStateNormal, WMF_GLYPH_X, @(2.8), nil);
+            break;
+        case WMFButtonTypeXWhite:
+            configForState(UIControlStateNormal, WMF_GLYPH_X, @(2.8), [UIColor 
whiteColor]);
+            break;
+        case WMFButtonTypeTrash:
+            configForState(UIControlStateNormal, WMF_GLYPH_TRASH, nil, nil);
+            configForState(UIControlStateDisabled, WMF_GLYPH_TRASH, nil, 
[UIColor lightGrayColor]);
+            break;
+        case WMFButtonTypeTranslate:
+            configForState(UIControlStateNormal, WMF_GLYPH_TRANSLATE, @(1.4), 
nil);
+            configForState(UIControlStateDisabled, WMF_GLYPH_TRANSLATE, 
@(1.4), [UIColor lightGrayColor]);
+            break;
+        case WMFButtonTypeMagnify:
+            configForState(UIControlStateNormal, WMF_GLYPH_MAGNIFY, @(1.0), 
nil);
+            break;
+        case WMFButtonTypeReload:
+            configForState(UIControlStateNormal, WMF_GLYPH_RELOAD, nil, nil);
+            configForState(UIControlStateDisabled, WMF_GLYPH_RELOAD, nil, 
[UIColor lightGrayColor]);
+            break;
+        case WMFButtonTypeCaretLeft:
+            configForState(UIControlStateNormal, WMF_GLYPH_CARET_LEFT, nil, 
nil);
+            break;
+        default:
+            break;
+    }
 }
 
-+ (CGFloat)xMirroringMultiplierForButtonType:(WMFButtonType)type {
+- (void)mirrorIfNecessaryForType:(WMFButtonType)type {
+    self.transform = CGAffineTransformMakeScale(1.0* [self 
xMirroringMultiplierForButtonType:type], 1.0);
+}
+
+- (CGFloat)xMirroringMultiplierForButtonType:(WMFButtonType)type {
     if (![WikipediaAppUtils isDeviceLanguageRTL] || ![UIView 
wmf_shouldMirrorIfDeviceLanguageRTL]) {
         return 1.0;
     }
     return [self shouldMirrorButtonType:type] ? 1.0 : -1.0;
 }
 
-+ (BOOL)shouldMirrorButtonType:(WMFButtonType)type {
+- (BOOL)shouldMirrorButtonType:(WMFButtonType)type {
     switch (type) {
-        case WMF_BUTTON_W:
-        case WMF_BUTTON_X:
-        case WMF_BUTTON_X_WHITE:
-        case WMF_BUTTON_TRANSLATE:
-        case WMF_BUTTON_MAGNIFY:
-        case WMF_BUTTON_RELOAD:
+        case WMFButtonTypeW:
+        case WMFButtonTypeX:
+        case WMFButtonTypeXWhite:
+        case WMFButtonTypeTranslate:
+        case WMFButtonTypeMagnify:
+        case WMFButtonTypeReload:
             return NO;
             break;
         default:
diff --git a/Wikipedia/View Controllers/About/AboutViewController.m 
b/Wikipedia/View Controllers/About/AboutViewController.m
index 1016b8b..832d723 100644
--- a/Wikipedia/View Controllers/About/AboutViewController.m
+++ b/Wikipedia/View Controllers/About/AboutViewController.m
@@ -58,12 +58,12 @@
     [self.webView loadHTMLFromAssetsFile:kWMFAboutHTMLFile];
 
     @weakify(self)
-    self.buttonX = [UIBarButtonItem wmf_buttonType:WMF_BUTTON_X handler:^(id 
sender){
+    self.buttonX = [UIBarButtonItem wmf_buttonType:WMFButtonTypeX handler:^(id 
sender){
         @strongify(self)
         [self dismissViewControllerAnimated : YES completion : nil];
     }];
 
-    self.buttonCaretLeft = [UIBarButtonItem 
wmf_buttonType:WMF_BUTTON_CARET_LEFT handler:^(id sender){
+    self.buttonCaretLeft = [UIBarButtonItem 
wmf_buttonType:WMFButtonTypeCaretLeft handler:^(id sender){
         @strongify(self)
         [self.webView loadHTMLFromAssetsFile : kWMFAboutHTMLFile];
     }];
diff --git a/Wikipedia/View 
Controllers/AccountCreation/AccountCreationViewController.m b/Wikipedia/View 
Controllers/AccountCreation/AccountCreationViewController.m
index 5e9803e..29ec5d3 100644
--- a/Wikipedia/View Controllers/AccountCreation/AccountCreationViewController.m
+++ b/Wikipedia/View Controllers/AccountCreation/AccountCreationViewController.m
@@ -98,7 +98,7 @@
     [self.navigationController.navigationBar wmf_mirrorIfDeviceRTL];
 
     @weakify(self)
-    UIBarButtonItem * xButton = [UIBarButtonItem wmf_buttonType:WMF_BUTTON_X 
handler:^(id sender){
+    UIBarButtonItem * xButton = [UIBarButtonItem wmf_buttonType:WMFButtonTypeX 
handler:^(id sender){
         @strongify(self)
         if (self.showCaptchaContainer) {
             self.showCaptchaContainer = NO;
diff --git a/Wikipedia/View Controllers/EditSummary/EditSummaryViewController.m 
b/Wikipedia/View Controllers/EditSummary/EditSummaryViewController.m
index 4ddc4e4..7398112 100644
--- a/Wikipedia/View Controllers/EditSummary/EditSummaryViewController.m
+++ b/Wikipedia/View Controllers/EditSummary/EditSummaryViewController.m
@@ -41,7 +41,7 @@
     [self.navigationController.navigationBar wmf_mirrorIfDeviceRTL];
 
     @weakify(self)
-    UIBarButtonItem * buttonX = [UIBarButtonItem wmf_buttonType:WMF_BUTTON_X 
handler:^(id sender){
+    UIBarButtonItem * buttonX = [UIBarButtonItem wmf_buttonType:WMFButtonTypeX 
handler:^(id sender){
         @strongify(self)
         [self dismissViewControllerAnimated : YES completion : nil];
     }];
diff --git a/Wikipedia/View Controllers/History/HistoryViewController.m 
b/Wikipedia/View Controllers/History/HistoryViewController.m
index 16dc9e0..bfa2b49 100644
--- a/Wikipedia/View Controllers/History/HistoryViewController.m
+++ b/Wikipedia/View Controllers/History/HistoryViewController.m
@@ -86,7 +86,7 @@
     [self.navigationController.navigationBar wmf_mirrorIfDeviceRTL];
 
     @weakify(self)
-    UIBarButtonItem * xButton = [UIBarButtonItem wmf_buttonType:WMF_BUTTON_X 
handler:^(id sender){
+    UIBarButtonItem * xButton = [UIBarButtonItem wmf_buttonType:WMFButtonTypeX 
handler:^(id sender){
         @strongify(self)
         [self dismissViewControllerAnimated : YES completion : nil];
     }];
@@ -94,7 +94,7 @@
 
 
 
-    self.deleteButtonItem = [UIBarButtonItem wmf_buttonType:WMF_BUTTON_TRASH
+    self.deleteButtonItem = [UIBarButtonItem wmf_buttonType:WMFButtonTypeTrash
                                                     handler:^(id sender){
         @strongify(self)
         [self showDeleteAllDialog];
diff --git a/Wikipedia/View Controllers/Languages/LanguagesViewController.m 
b/Wikipedia/View Controllers/Languages/LanguagesViewController.m
index ac432e1..cdb5904 100644
--- a/Wikipedia/View Controllers/Languages/LanguagesViewController.m
+++ b/Wikipedia/View Controllers/Languages/LanguagesViewController.m
@@ -59,7 +59,7 @@
     [self.navigationController.navigationBar wmf_mirrorIfDeviceRTL];
 
     @weakify(self)
-    UIBarButtonItem * xButton = [UIBarButtonItem wmf_buttonType:WMF_BUTTON_X 
handler:^(id sender){
+    UIBarButtonItem * xButton = [UIBarButtonItem wmf_buttonType:WMFButtonTypeX 
handler:^(id sender){
         @strongify(self)
         [self dismissViewControllerAnimated : YES completion : nil];
     }];
diff --git a/Wikipedia/View Controllers/Login/LoginViewController.m 
b/Wikipedia/View Controllers/Login/LoginViewController.m
index 15a9468..27b64fc 100644
--- a/Wikipedia/View Controllers/Login/LoginViewController.m
+++ b/Wikipedia/View Controllers/Login/LoginViewController.m
@@ -62,7 +62,7 @@
     [self.navigationController.navigationBar wmf_mirrorIfDeviceRTL];
 
     @weakify(self)
-    UIBarButtonItem * xButton = [UIBarButtonItem wmf_buttonType:WMF_BUTTON_X 
handler:^(id sender){
+    UIBarButtonItem * xButton = [UIBarButtonItem wmf_buttonType:WMFButtonTypeX 
handler:^(id sender){
         @strongify(self)
         [self dismissViewControllerAnimated : YES completion : nil];
     }];
diff --git a/Wikipedia/View 
Controllers/Navigation/Primary/PrimaryMenuViewController.m b/Wikipedia/View 
Controllers/Navigation/Primary/PrimaryMenuViewController.m
index cba8280..749b609 100644
--- a/Wikipedia/View Controllers/Navigation/Primary/PrimaryMenuViewController.m
+++ b/Wikipedia/View Controllers/Navigation/Primary/PrimaryMenuViewController.m
@@ -60,7 +60,7 @@
     [self.navigationController.navigationBar wmf_mirrorIfDeviceRTL];
 
     @weakify(self)
-    UIBarButtonItem * xButton = [UIBarButtonItem 
wmf_buttonType:WMF_BUTTON_X_WHITE handler:^(id sender){
+    UIBarButtonItem * xButton = [UIBarButtonItem 
wmf_buttonType:WMFButtonTypeXWhite handler:^(id sender){
         @strongify(self)
         [self dismissViewControllerAnimated : YES completion : nil];
     }];
diff --git a/Wikipedia/View 
Controllers/Navigation/Secondary/SecondaryMenuViewController.m b/Wikipedia/View 
Controllers/Navigation/Secondary/SecondaryMenuViewController.m
index d792118..d1da7ac 100644
--- a/Wikipedia/View 
Controllers/Navigation/Secondary/SecondaryMenuViewController.m
+++ b/Wikipedia/View 
Controllers/Navigation/Secondary/SecondaryMenuViewController.m
@@ -96,7 +96,7 @@
     [self.navigationController.navigationBar wmf_mirrorIfDeviceRTL];
 
     @weakify(self)
-    UIBarButtonItem * xButton = [UIBarButtonItem wmf_buttonType:WMF_BUTTON_X 
handler:^(id sender){
+    UIBarButtonItem * xButton = [UIBarButtonItem wmf_buttonType:WMFButtonTypeX 
handler:^(id sender){
         @strongify(self)
         [self dismissViewControllerAnimated : YES completion : nil];
     }];
diff --git a/Wikipedia/View Controllers/Nearby/NearbyViewController.m 
b/Wikipedia/View Controllers/Nearby/NearbyViewController.m
index 9b4aba3..c50bd2c 100644
--- a/Wikipedia/View Controllers/Nearby/NearbyViewController.m
+++ b/Wikipedia/View Controllers/Nearby/NearbyViewController.m
@@ -332,7 +332,7 @@
     [self.navigationController.navigationBar wmf_mirrorIfDeviceRTL];
 
     @weakify(self)
-    UIBarButtonItem * xButton = [UIBarButtonItem wmf_buttonType:WMF_BUTTON_X 
handler:^(id sender){
+    UIBarButtonItem * xButton = [UIBarButtonItem wmf_buttonType:WMFButtonTypeX 
handler:^(id sender){
         @strongify(self)
         [self dismissViewControllerAnimated : YES completion : nil];
     }];
diff --git a/Wikipedia/View Controllers/PageHistory/PageHistoryViewController.m 
b/Wikipedia/View Controllers/PageHistory/PageHistoryViewController.m
index 5c4341b..42c3939 100644
--- a/Wikipedia/View Controllers/PageHistory/PageHistoryViewController.m
+++ b/Wikipedia/View Controllers/PageHistory/PageHistoryViewController.m
@@ -55,7 +55,7 @@
     [self.navigationController.navigationBar wmf_mirrorIfDeviceRTL];
 
     @weakify(self)
-    UIBarButtonItem * xButton = [UIBarButtonItem wmf_buttonType:WMF_BUTTON_X 
handler:^(id sender){
+    UIBarButtonItem * xButton = [UIBarButtonItem wmf_buttonType:WMFButtonTypeX 
handler:^(id sender){
         @strongify(self)
         [self dismissViewControllerAnimated : YES completion : nil];
     }];
diff --git a/Wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m 
b/Wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m
index 4e4c019..f15c435 100644
--- a/Wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m
+++ b/Wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m
@@ -195,12 +195,12 @@
     [super viewDidLoad];
 
     @weakify(self)
-    self.buttonX = [UIBarButtonItem wmf_buttonType:WMF_BUTTON_X handler:^(id 
sender){
+    self.buttonX = [UIBarButtonItem wmf_buttonType:WMFButtonTypeX handler:^(id 
sender){
         @strongify(self)
         [self goBack];
     }];
 
-    self.buttonLeftCaret = [UIBarButtonItem 
wmf_buttonType:WMF_BUTTON_CARET_LEFT handler:^(id sender){
+    self.buttonLeftCaret = [UIBarButtonItem 
wmf_buttonType:WMFButtonTypeCaretLeft handler:^(id sender){
         @strongify(self)
         [self goBack];
     }];
diff --git a/Wikipedia/View Controllers/SavedPages/SavedPagesViewController.m 
b/Wikipedia/View Controllers/SavedPages/SavedPagesViewController.m
index 3d29fbd..6849308 100644
--- a/Wikipedia/View Controllers/SavedPages/SavedPagesViewController.m
+++ b/Wikipedia/View Controllers/SavedPages/SavedPagesViewController.m
@@ -114,18 +114,18 @@
     [self.navigationController.navigationBar wmf_mirrorIfDeviceRTL];
 
     @weakify(self)
-    UIBarButtonItem * xButton = [UIBarButtonItem wmf_buttonType:WMF_BUTTON_X 
handler:^(id sender){
+    UIBarButtonItem * xButton = [UIBarButtonItem wmf_buttonType:WMFButtonTypeX 
handler:^(id sender){
         @strongify(self)
         [self dismissViewControllerAnimated : YES completion : nil];
     }];
     self.navigationItem.leftBarButtonItems = @[xButton];
 
-    self.reloadButtonItem = [UIBarButtonItem wmf_buttonType:WMF_BUTTON_RELOAD
+    self.reloadButtonItem = [UIBarButtonItem wmf_buttonType:WMFButtonTypeReload
                                                     handler:^(id sender){
         @strongify(self)
         [self startRefresh];
     }];
-    self.trashButtonItem = [UIBarButtonItem wmf_buttonType:WMF_BUTTON_TRASH
+    self.trashButtonItem = [UIBarButtonItem wmf_buttonType:WMFButtonTypeTrash
                                                    handler:^(id sender){
         @strongify(self)
         [self showDeleteAllDialog];
diff --git a/Wikipedia/View 
Controllers/SectionEditor/SectionEditorViewController.m b/Wikipedia/View 
Controllers/SectionEditor/SectionEditorViewController.m
index 288a800..5c30447 100644
--- a/Wikipedia/View Controllers/SectionEditor/SectionEditorViewController.m
+++ b/Wikipedia/View Controllers/SectionEditor/SectionEditorViewController.m
@@ -43,7 +43,7 @@
     [self.navigationController setNavigationBarHidden:NO animated:NO];
 
     @weakify(self)
-    UIBarButtonItem * buttonX = [UIBarButtonItem 
wmf_buttonType:WMF_BUTTON_CARET_LEFT handler:^(id sender){
+    UIBarButtonItem * buttonX = [UIBarButtonItem 
wmf_buttonType:WMFButtonTypeCaretLeft handler:^(id sender){
         @strongify(self)
         [self.navigationController popViewControllerAnimated : YES];
     }];
diff --git a/Wikipedia/View Controllers/WebView/WebViewController.m 
b/Wikipedia/View Controllers/WebView/WebViewController.m
index 6815e87..3db1e61 100644
--- a/Wikipedia/View Controllers/WebView/WebViewController.m
+++ b/Wikipedia/View Controllers/WebView/WebViewController.m
@@ -94,7 +94,7 @@
 
 - (void)setupTopMenuButtons {
     @weakify(self)
-    UIBarButtonItem * buttonW = [UIBarButtonItem wmf_buttonType:WMF_BUTTON_W 
handler:^(id sender){
+    UIBarButtonItem * buttonW = [UIBarButtonItem wmf_buttonType:WMFButtonTypeW 
handler:^(id sender){
         @strongify(self)
         UINavigationController * nc = [[UINavigationController alloc] 
initWithRootViewController:[PrimaryMenuViewController 
wmf_initialViewControllerFromClassStoryboard]];
         [nc.navigationBar setBarTintColor:[UIColor blackColor]];
@@ -102,14 +102,14 @@
         [self presentViewController:nc animated:YES completion:nil];
     }];
 
-    UIBarButtonItem* buttonMagnify = [UIBarButtonItem 
wmf_buttonType:WMF_BUTTON_MAGNIFY handler:^(id sender){
+    UIBarButtonItem* buttonMagnify = [UIBarButtonItem 
wmf_buttonType:WMFButtonTypeMagnify handler:^(id sender){
         @strongify(self)
         [self dismissViewControllerAnimated : YES completion : nil];
     }];
 
     self.navigationItem.leftBarButtonItems = @[buttonW, buttonMagnify];
 
-    self.buttonTOC = [UIBarButtonItem wmf_buttonType:WMF_BUTTON_TOC
+    self.buttonTOC = [UIBarButtonItem 
wmf_buttonType:WMFButtonTypeTableOfContents
                                              handler:^(id sender){
         @strongify(self)
         [self tocToggle];
@@ -131,24 +131,24 @@
         }
     };
 
-    self.buttonBack = [UIBarButtonItem wmf_buttonType:WMF_BUTTON_BACKWARD 
handler:^(id sender){
+    self.buttonBack = [UIBarButtonItem wmf_buttonType:WMFButtonTypeBackward 
handler:^(id sender){
         goBeforeOrAfter(@"before");
     }];
-    self.buttonForward = [UIBarButtonItem wmf_buttonType:WMF_BUTTON_FORWARD 
handler:^(id sender){
+    self.buttonForward = [UIBarButtonItem wmf_buttonType:WMFButtonTypeForward 
handler:^(id sender){
         goBeforeOrAfter(@"after");
     }];
-    self.buttonLanguages = [UIBarButtonItem 
wmf_buttonType:WMF_BUTTON_TRANSLATE handler:^(id sender){
+    self.buttonLanguages = [UIBarButtonItem 
wmf_buttonType:WMFButtonTypeTranslate handler:^(id sender){
         @strongify(self)
         [self showLanguages];
     }];
 
-    self.buttonSave = [UIBarButtonItem wmf_buttonType:WMF_BUTTON_HEART 
handler:^(id sender){
+    self.buttonSave = [UIBarButtonItem wmf_buttonType:WMFButtonTypeHeart 
handler:^(id sender){
         @strongify(self)
         [self toggleSavedPage];
         [self updateBottomBarButtonsEnabledState];
     }];
 
-    self.buttonShare = [UIBarButtonItem wmf_buttonType:WMF_BUTTON_SHARE 
handler:^(id sender){
+    self.buttonShare = [UIBarButtonItem wmf_buttonType:WMFButtonTypeShare 
handler:^(id sender){
         @strongify(self)
         [self shareUpArrowButtonPushed];
     }];

-- 
To view, visit https://gerrit.wikimedia.org/r/220961
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ief53e35d67eb591d6627d671f1c71bd9c1234562
Gerrit-PatchSet: 3
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: 5.0
Gerrit-Owner: Fjalapeno <cfl...@wikimedia.org>
Gerrit-Reviewer: Bgerstle <bgers...@wikimedia.org>
Gerrit-Reviewer: Fjalapeno <cfl...@wikimedia.org>
Gerrit-Reviewer: Mhurd <mh...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to