Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
a41b5f9d
Commit
a41b5f9d
authored
Jan 29, 2010
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx_dialog_provider: Propagate window close.
parent
23c70ac8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
13 deletions
+41
-13
modules/gui/macosx_dialog_provider/dialogProvider.m
modules/gui/macosx_dialog_provider/dialogProvider.m
+41
-13
No files found.
modules/gui/macosx_dialog_provider/dialogProvider.m
View file @
a41b5f9d
...
...
@@ -115,6 +115,18 @@ static void destroyProgressPanel (void *);
@synthesize
widget
;
@end
@interface
VLCDialogWindow
:
NSWindow
{
extension_dialog_t
*
dialog
;
}
@property
(
readwrite
)
extension_dialog_t
*
dialog
;
@end
@implementation
VLCDialogWindow
@synthesize
dialog
;
@end
@interface
VLCDialogList
:
NSTableView
{
extension_widget_t
*
widget
;
...
...
@@ -466,16 +478,6 @@ static void destroyProgressPanel (void *);
return
size
;
}
-
(
NSSize
)
windowWillResize
:(
NSWindow
*
)
sender
toSize
:(
NSSize
)
frameSize
{
NSRect
rect
=
NSMakeRect
(
0
,
0
,
0
,
0
);
rect
.
size
=
frameSize
;
rect
=
[
sender
contentRectForFrameRect
:
rect
];
rect
.
size
=
[
self
flexSize
:
rect
.
size
];
rect
=
[
sender
frameRectForContentRect
:
rect
];
return
rect
.
size
;
}
@end
...
...
@@ -911,6 +913,30 @@ bool checkProgressPanel (void *priv)
}
-
(
NSSize
)
windowWillResize
:(
NSWindow
*
)
sender
toSize
:(
NSSize
)
frameSize
{
NSView
*
contentView
=
[
sender
contentView
];
assert
([
contentView
isKindOfClass
:[
VLCDialogGridView
class
]]);
VLCDialogGridView
*
gridView
=
contentView
;
NSRect
rect
=
NSMakeRect
(
0
,
0
,
0
,
0
);
rect
.
size
=
frameSize
;
rect
=
[
sender
contentRectForFrameRect
:
rect
];
rect
.
size
=
[
gridView
flexSize
:
rect
.
size
];
rect
=
[
sender
frameRectForContentRect
:
rect
];
return
rect
.
size
;
}
-
(
BOOL
)
windowShouldClose
:(
id
)
sender
{
assert
([
sender
isKindOfClass
:[
VLCDialogWindow
class
]]);
VLCDialogWindow
*
window
=
sender
;
extension_dialog_t
*
dialog
=
[
window
dialog
];
extension_DialogClosed
(
dialog
);
dialog
->
p_sys_intf
=
NULL
;
return
YES
;
}
static
NSView
*
createControlFromWidget
(
extension_widget_t
*
widget
,
id
self
)
{
assert
(
!
widget
->
p_sys_intf
);
...
...
@@ -1183,16 +1209,17 @@ static void updateControlFromWidget(NSView *control, extension_widget_t *widget)
if
(
!
dialog
->
i_width
||
!
dialog
->
i_height
)
size
=
NSMakeSize
(
640
,
480
);
NS
Window
*
window
=
dialog
->
p_sys_intf
;
VLCDialog
Window
*
window
=
dialog
->
p_sys_intf
;
if
(
!
window
&&
!
shouldDestroy
)
{
NSRect
content
=
NSMakeRect
(
0
,
0
,
1
,
1
);
window
=
[[
NSWindow
alloc
]
initWithContentRect
:
content
styleMask
:
NSTitledWindowMask
|
NSClosableWindowMask
|
NSResizableWindowMask
backing
:
NSBackingStoreBuffered
defer
:
NO
];
window
=
[[
VLCDialogWindow
alloc
]
initWithContentRect
:
content
styleMask
:
NSTitledWindowMask
|
NSClosableWindowMask
|
NSResizableWindowMask
backing
:
NSBackingStoreBuffered
defer
:
NO
];
[
window
setDelegate
:
self
];
[
window
setDialog
:
dialog
];
[
window
setTitle
:[
NSString
stringWithUTF8String
:
dialog
->
psz_title
]];
VLCDialogGridView
*
gridView
=
[[
VLCDialogGridView
alloc
]
init
];
[
gridView
setAutoresizingMask
:
NSViewHeightSizable
|
NSViewWidthSizable
];
[
window
setContentView
:
gridView
];
[
window
setDelegate
:
gridView
];
[
gridView
release
];
dialog
->
p_sys_intf
=
window
;
}
...
...
@@ -1204,6 +1231,7 @@ static void updateControlFromWidget(NSView *control, extension_widget_t *widget)
[
window
setDelegate
:
nil
];
[
window
close
];
dialog
->
p_sys_intf
=
NULL
;
window
=
nil
;
}
if
(
!
dialog
->
b_hide
&&
!
[
window
isVisible
])
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment