[vlc-commits] macosx: fix resizing issue when updating lua extension dialogs ( close #14457)
Felix Paul Kühne
git at videolan.org
Mon Sep 28 16:10:08 CEST 2015
vlc/vlc-2.2 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Mon Sep 28 16:09:57 2015 +0200| [360f42e65974a1e227bbaaadd83679b6ec70283e] | committer: Felix Paul Kühne
macosx: fix resizing issue when updating lua extension dialogs (close #14457)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=360f42e65974a1e227bbaaadd83679b6ec70283e
---
modules/gui/macosx/ExtensionsDialogProvider.m | 4 ++--
modules/gui/macosx/VLCUIWidgets.h | 7 ++++++-
modules/gui/macosx/VLCUIWidgets.m | 20 +++++++++++++++++++-
3 files changed, 27 insertions(+), 4 deletions(-)
diff --git a/modules/gui/macosx/ExtensionsDialogProvider.m b/modules/gui/macosx/ExtensionsDialogProvider.m
index c723ab9..7855d30 100644
--- a/modules/gui/macosx/ExtensionsDialogProvider.m
+++ b/modules/gui/macosx/ExtensionsDialogProvider.m
@@ -1,7 +1,7 @@
/*****************************************************************************
* ExtensionsDialogProvider.m: Mac OS X Extensions Dialogs
*****************************************************************************
- * Copyright (C) 2010-2013 VLC authors and VideoLAN
+ * Copyright (C) 2010-2015 VLC authors and VideoLAN
* $Id$
*
* Authors: Pierre d'Herbemont <pdherbemont # videolan org>
@@ -445,7 +445,7 @@ static ExtensionsDialogProvider *_o_sharedInstance = nil;
}
VLCDialogGridView *gridView = (VLCDialogGridView *)[dialogWindow contentView];
- [gridView addSubview:control atRow:row column:col rowSpan:vsp colSpan:hsp];
+ [gridView updateSubview:control atRow:row column:col rowSpan:vsp colSpan:hsp];
widget->b_update = false;
}
diff --git a/modules/gui/macosx/VLCUIWidgets.h b/modules/gui/macosx/VLCUIWidgets.h
index 548965d..a342295 100644
--- a/modules/gui/macosx/VLCUIWidgets.h
+++ b/modules/gui/macosx/VLCUIWidgets.h
@@ -1,7 +1,7 @@
/*****************************************************************************
* VLCUIWidgets.h: Widgets for VLC's extensions dialogs for Mac OS X
*****************************************************************************
- * Copyright (C) 2009-2014 the VideoLAN team and authors
+ * Copyright (C) 2009-2015 the VideoLAN team and authors
* $Id$
*
* Authors: Pierre d'Herbemont <pdherbemont # videolan dot>,
@@ -84,6 +84,11 @@
- (void)addSubview:(NSView *)view atRow:(NSUInteger)row column:(NSUInteger)column rowSpan:(NSUInteger)rowSpan colSpan:(NSUInteger)colSpan;
- (NSSize)flexSize:(NSSize)size;
+- (void)updateSubview:(NSView *)view
+ atRow:(NSUInteger)row
+ column:(NSUInteger)column
+ rowSpan:(NSUInteger)rowSpan
+ colSpan:(NSUInteger)colSpan;
- (void)removeSubview:(NSView *)view;
@property (readonly) NSUInteger numViews;
diff --git a/modules/gui/macosx/VLCUIWidgets.m b/modules/gui/macosx/VLCUIWidgets.m
index 7e08899..215352a 100644
--- a/modules/gui/macosx/VLCUIWidgets.m
+++ b/modules/gui/macosx/VLCUIWidgets.m
@@ -1,7 +1,7 @@
/*****************************************************************************
* VLCUIWidgets.m: Widgets for VLC's extensions dialogs for Mac OS X
*****************************************************************************
- * Copyright (C) 2009-2014 the VideoLAN team and authors
+ * Copyright (C) 2009-2015 the VideoLAN team and authors
* $Id$
*
* Authors: Pierre d'Herbemont <pdherbemont # videolan dot>,
@@ -331,6 +331,24 @@
[self performSelector:@selector(recomputeWindowSize) withObject:nil afterDelay:0.1];
}
+- (void)updateSubview:(NSView *)view
+ atRow:(NSUInteger)row
+ column:(NSUInteger)column
+ rowSpan:(NSUInteger)rowSpan
+ colSpan:(NSUInteger)colSpan
+{
+ NSDictionary *oldDict = [self objectForView:view];
+ if (!oldDict) {
+ [self addSubview:view
+ atRow:row
+ column:column
+ rowSpan:rowSpan
+ colSpan:colSpan];
+ return;
+ }
+ [self relayout];
+}
+
- (void)removeSubview:(NSView *)view
{
NSDictionary *dict = [self objectForView:view];
More information about the vlc-commits
mailing list