Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit f492413

Browse files
author
Monte Goulding
committed
[[ DocumentFilename ]] Fix to support old platform api
1 parent fd3e9d9 commit f492413

7 files changed

Lines changed: 31 additions & 2 deletions

File tree

engine/src/desktop-stack.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,13 @@ void MCStack::view_platform_updatewindowwithcallback(MCRegionRef p_region, MCSta
337337
s_update_context = nil;
338338
}
339339

340+
// MERG-2015-10-12: [[ DocumentFilename ]] Stub for documentFilename.
341+
void MCStack::updatedocumentfilename(void)
342+
{
343+
if (window != nil)
344+
MCPlatformSetWindowProperty(window, kMCPlatformWindowPropertyDocumentFilename, kMCPlatformPropertyTypeMCString, &m_document_filename);
345+
}
346+
340347
////////////////////////////////////////////////////////////////////////////////
341348

342349
// MW-2014-06-11: [[ Bug 12495 ]] Update windowshape by setting window property.

engine/src/exec-interface-stack.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2205,8 +2205,7 @@ void MCStack::SetDocumentFilename(MCExecContext &ctxt, MCStringRef p_document_fi
22052205

22062206
MCValueAssign(m_document_filename, t_resolved_filename);
22072207

2208-
if (window != nil)
2209-
MCPlatformSetWindowProperty(window, kMCPlatformWindowPropertyDocumentFilename, kMCPlatformPropertyTypeMCString, &m_document_filename);
2208+
updatedocumentfilename();
22102209

22112210
}
22122211

engine/src/lnxstack.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,11 @@ void MCStack::clearscroll(void)
670670
{
671671
}
672672

673+
// MERG-2015-10-12: [[ DocumentFilename ]] Stub for documentFilename.
674+
void MCStack::updatedocumentfilename(void)
675+
{
676+
}
677+
673678
////////////////////////////////////////////////////////////////////////////////
674679

675680
void MCBitmapClearRegion(MCBitmap *p_image, int32_t p_x, int32_t p_y, uint32_t p_width, uint32_t p_height)

engine/src/mblstack.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,11 @@ void MCStack::clearscroll(void)
158158
{
159159
}
160160

161+
// MERG-2015-10-12: [[ DocumentFilename ]] Stub for documentFilename.
162+
void MCStack::updatedocumentfilename(void)
163+
{
164+
}
165+
161166
////////////////////////////////////////////////////////////////////////////////
162167

163168
MCRectangle MCStack::view_platform_getwindowrect() const

engine/src/srvstack.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,11 @@ void MCStack::enablewindow(bool enable)
200200
{
201201
}
202202

203+
// MERG-2015-10-12: [[ DocumentFilename ]] Stub for documentFilename.
204+
void MCStack::updatedocumentfilename(void)
205+
{
206+
}
207+
203208
////////////////////////////////////////////////////////////////////////////////
204209

205210
bool MCStack::configure_window_buffer()

engine/src/stack.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1261,6 +1261,9 @@ class MCStack : public MCObject
12611261
private:
12621262
void loadexternals(void);
12631263
void unloadexternals(void);
1264+
1265+
// MERG-2015-10-12: [[ DocumentFilename ]] documentFilename property
1266+
void updatedocumentfilename(void);
12641267

12651268
void mode_load(void);
12661269

engine/src/w32stack.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -676,6 +676,11 @@ void MCStack::redrawicon(void)
676676
{
677677
}
678678

679+
// MERG-2015-10-12: [[ DocumentFilename ]] Stub for documentFilename.
680+
void MCStack::updatedocumentfilename(void)
681+
{
682+
}
683+
679684
////////////////////////////////////////////////////////////////////////////////
680685

681686
bool __MCApplyMaskCallback(void *p_context, const MCGIntegerRectangle &p_rect)

0 commit comments

Comments
 (0)