File tree Expand file tree Collapse file tree 1 file changed +21
-5
lines changed
Expand file tree Collapse file tree 1 file changed +21
-5
lines changed Original file line number Diff line number Diff line change @@ -47,15 +47,31 @@ static void loadSymbols()
4747
4848@implementation MMPreferenceController
4949
50+ - (void )windowDidLoad
51+ {
52+ #if DISABLE_SPARKLE
53+ // If Sparkle is disabled in config, we don't want to show the preference pane
54+ // which could be confusing as it won't do anything.
55+ // After hiding the Sparkle subview, shorten the height of the General pane
56+ // and move its other subviews down.
57+ [sparkleUpdaterPane setHidden: YES ];
58+ CGFloat sparkleHeight = NSHeight (sparkleUpdaterPane.frame );
59+ NSRect frame = generalPreferences.frame ;
60+ frame.size .height -= sparkleHeight;
61+ generalPreferences.frame = frame;
62+ for (NSView *subview in generalPreferences.subviews ) {
63+ frame = subview.frame ;
64+ frame.origin .y -= sparkleHeight;
65+ subview.frame = frame;
66+ }
67+ #endif
68+ [super windowDidLoad ];
69+ }
70+
5071- (IBAction )showWindow : (id )sender
5172{
5273 [super setCrossFade: NO ];
5374 [super showWindow: sender];
54- #if DISABLE_SPARKLE
55- // If Sparkle is disabled in config, we don't want to show the preference pane
56- // which could be confusing as it won't do anything.
57- [sparkleUpdaterPane setHidden: YES ];
58- #endif
5975}
6076
6177- (void )setupToolbar
You can’t perform that action at this time.
0 commit comments