summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qcocoawindowdelegate_mac.mm
diff options
context:
space:
mode:
authorPrasanth Ullattil <prasanth.ullattil@nokia.com>2009-11-02 14:34:15 (GMT)
committerPrasanth Ullattil <prasanth.ullattil@nokia.com>2009-11-02 14:50:09 (GMT)
commitf1132e60e0759d8be043a2c4312915b3103004ff (patch)
treecd29f8e683018aa3eafb0dd6618a4b1f1370b74f /src/gui/kernel/qcocoawindowdelegate_mac.mm
parentd55483a656285d30095ab002ec8380340842c89c (diff)
downloadQt-f1132e60e0759d8be043a2c4312915b3103004ff.zip
Qt-f1132e60e0759d8be043a2c4312915b3103004ff.tar.gz
Qt-f1132e60e0759d8be043a2c4312915b3103004ff.tar.bz2
Titlebar icon (for e.g. Assistant) not visible in Cocoa.
standardWindowButton:NSWindowDocumentIconButton will not return a valid NSButton unless you call setRepresentedURL or setRepresentedFilename for the NSWindow. This patch makes sure that setWindowIcon_sys() sets the icon using a valid NSButton. Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
Diffstat (limited to 'src/gui/kernel/qcocoawindowdelegate_mac.mm')
-rw-r--r--src/gui/kernel/qcocoawindowdelegate_mac.mm23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/gui/kernel/qcocoawindowdelegate_mac.mm b/src/gui/kernel/qcocoawindowdelegate_mac.mm
index 95c89e5..803a1b1 100644
--- a/src/gui/kernel/qcocoawindowdelegate_mac.mm
+++ b/src/gui/kernel/qcocoawindowdelegate_mac.mm
@@ -346,5 +346,28 @@ static void cleanupCocoaWindowDelegate()
m_drawerHash->remove(drawer);
}
+- (BOOL)window:(NSWindow *)window shouldPopUpDocumentPathMenu:(NSMenu *)menu
+{
+ Q_UNUSED(menu);
+ QWidget *qwidget = m_windowHash->value(window);
+ if (qwidget && !qwidget->windowFilePath().isEmpty()) {
+ return YES;
+ }
+ return NO;
+}
+
+- (BOOL)window:(NSWindow *)window shouldDragDocumentWithEvent:(NSEvent *)event
+ from:(NSPoint)dragImageLocation
+ withPasteboard:(NSPasteboard *)pasteboard
+{
+ Q_UNUSED(event);
+ Q_UNUSED(dragImageLocation);
+ Q_UNUSED(pasteboard);
+ QWidget *qwidget = m_windowHash->value(window);
+ if (qwidget && !qwidget->windowFilePath().isEmpty()) {
+ return YES;
+ }
+ return NO;
+}
@end
#endif// QT_MAC_USE_COCOA