@@ -29,10 +29,10 @@ class Window : BaseWindow
29
29
[ NonSerialized ] private double notificationClearTime = - 1 ;
30
30
31
31
[ SerializeField ] private SubTab activeTab = SubTab . History ;
32
- [ SerializeField ] private BranchesView branchesTab = new BranchesView ( ) ;
33
- [ SerializeField ] private ChangesView changesTab = new ChangesView ( ) ;
34
- [ SerializeField ] private HistoryView historyTab = new HistoryView ( ) ;
35
- [ SerializeField ] private SettingsView settingsTab = new SettingsView ( ) ;
32
+ [ SerializeField ] private BranchesView branchesView = new BranchesView ( ) ;
33
+ [ SerializeField ] private ChangesView changesView = new ChangesView ( ) ;
34
+ [ SerializeField ] private HistoryView historyView = new HistoryView ( ) ;
35
+ [ SerializeField ] private SettingsView settingsView = new SettingsView ( ) ;
36
36
37
37
[ SerializeField ] private string repoBranch ;
38
38
[ SerializeField ] private string repoUrl ;
@@ -74,10 +74,10 @@ public override void Initialize(IApplicationManager applicationManager)
74
74
{
75
75
base . Initialize ( applicationManager ) ;
76
76
77
- HistoryTab . InitializeView ( this ) ;
78
- ChangesTab . InitializeView ( this ) ;
79
- BranchesTab . InitializeView ( this ) ;
80
- SettingsTab . InitializeView ( this ) ;
77
+ HistoryView . InitializeView ( this ) ;
78
+ ChangesView . InitializeView ( this ) ;
79
+ BranchesView . InitializeView ( this ) ;
80
+ SettingsView . InitializeView ( this ) ;
81
81
}
82
82
83
83
public override void OnEnable ( )
@@ -91,15 +91,15 @@ public override void OnEnable()
91
91
// Set window title
92
92
titleContent = new GUIContent ( Title , Styles . SmallLogo ) ;
93
93
94
- if ( ActiveTab != null )
95
- ActiveTab . OnEnable ( ) ;
94
+ if ( ActiveView != null )
95
+ ActiveView . OnEnable ( ) ;
96
96
}
97
97
98
98
public override void OnDisable ( )
99
99
{
100
100
base . OnDisable ( ) ;
101
- if ( ActiveTab != null )
102
- ActiveTab . OnDisable ( ) ;
101
+ if ( ActiveView != null )
102
+ ActiveView . OnDisable ( ) ;
103
103
}
104
104
105
105
public override void OnDataUpdate ( )
@@ -120,8 +120,8 @@ public override void OnDataUpdate()
120
120
}
121
121
}
122
122
123
- if ( ActiveTab != null )
124
- ActiveTab . OnDataUpdate ( ) ;
123
+ if ( ActiveView != null )
124
+ ActiveView . OnDataUpdate ( ) ;
125
125
}
126
126
127
127
public override void OnRepositoryChanged ( IRepository oldRepository )
@@ -131,22 +131,22 @@ public override void OnRepositoryChanged(IRepository oldRepository)
131
131
DetachHandlers ( oldRepository ) ;
132
132
AttachHandlers ( Repository ) ;
133
133
134
- if ( ActiveTab != null )
135
- ActiveTab . OnRepositoryChanged ( oldRepository ) ;
134
+ if ( ActiveView != null )
135
+ ActiveView . OnRepositoryChanged ( oldRepository ) ;
136
136
}
137
137
138
138
public override void OnSelectionChange ( )
139
139
{
140
140
base . OnSelectionChange ( ) ;
141
- if ( ActiveTab != null )
142
- ActiveTab . OnSelectionChange ( ) ;
141
+ if ( ActiveView != null )
142
+ ActiveView . OnSelectionChange ( ) ;
143
143
}
144
144
145
145
public override void Refresh ( )
146
146
{
147
147
base . Refresh ( ) ;
148
- if ( ActiveTab != null )
149
- ActiveTab . Refresh ( ) ;
148
+ if ( ActiveView != null )
149
+ ActiveView . Refresh ( ) ;
150
150
Repaint ( ) ;
151
151
}
152
152
@@ -162,9 +162,9 @@ public override void OnUI()
162
162
DoToolbarGUI ( ) ;
163
163
164
164
// GUI for the active tab
165
- if ( ActiveTab != null )
165
+ if ( ActiveView != null )
166
166
{
167
- ActiveTab . OnGUI ( ) ;
167
+ ActiveView . OnGUI ( ) ;
168
168
}
169
169
}
170
170
@@ -294,9 +294,9 @@ private void DoToolbarGUI()
294
294
}
295
295
if ( EditorGUI . EndChangeCheck ( ) )
296
296
{
297
- var from = ActiveTab ;
297
+ var from = ActiveView ;
298
298
activeTab = tab ;
299
- SwitchView ( from , ActiveTab ) ;
299
+ SwitchView ( from , ActiveView ) ;
300
300
}
301
301
302
302
GUILayout . FlexibleSpace ( ) ;
@@ -384,27 +384,27 @@ private static SubTab TabButton(SubTab tab, string title, SubTab activeTab)
384
384
return GUILayout . Toggle ( activeTab == tab , title , EditorStyles . toolbarButton ) ? tab : activeTab ;
385
385
}
386
386
387
- public HistoryView HistoryTab
387
+ public HistoryView HistoryView
388
388
{
389
- get { return historyTab ; }
389
+ get { return historyView ; }
390
390
}
391
391
392
- public ChangesView ChangesTab
392
+ public ChangesView ChangesView
393
393
{
394
- get { return changesTab ; }
394
+ get { return changesView ; }
395
395
}
396
396
397
- public BranchesView BranchesTab
397
+ public BranchesView BranchesView
398
398
{
399
- get { return branchesTab ; }
399
+ get { return branchesView ; }
400
400
}
401
401
402
- public SettingsView SettingsTab
402
+ public SettingsView SettingsView
403
403
{
404
- get { return settingsTab ; }
404
+ get { return settingsView ; }
405
405
}
406
406
407
- private Subview ActiveTab
407
+ private Subview ActiveView
408
408
{
409
409
get
410
410
{
@@ -417,14 +417,14 @@ private Subview ToView(SubTab tab)
417
417
switch ( tab )
418
418
{
419
419
case SubTab . History :
420
- return historyTab ;
420
+ return historyView ;
421
421
case SubTab . Changes :
422
- return changesTab ;
422
+ return changesView ;
423
423
case SubTab . Branches :
424
- return branchesTab ;
424
+ return branchesView ;
425
425
case SubTab . Settings :
426
426
default :
427
- return settingsTab ;
427
+ return settingsView ;
428
428
}
429
429
}
430
430
0 commit comments