menu: fix compilation errors on MacOS 44/29544/4
authorGiWoong Kim <giwoong.kim@samsung.com>
Wed, 29 Oct 2014 11:22:30 +0000 (20:22 +0900)
committerGiWoong Kim <giwoong.kim@samsung.com>
Thu, 30 Oct 2014 01:08:40 +0000 (10:08 +0900)
Change-Id: Iaf72f25c390c8f826e42e1da92ee8b213a4cce36
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
tizen/src/ui/menu/contextmenu.cpp

index b9fe39eff5aaab31f00799067361cedb40aff1ee..2ec3c081c934a797df21d1cdcb6ca7aeb1c5ca23 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifdef CONFIG_WIN32
 #include <windows.h>
-#else
+#elif defined (CONFIG_LINUX)
 #include <X11/Xlib.h>
 #include <X11/Xatom.h>
 #endif
@@ -75,9 +75,11 @@ void ContextMenu::createItems() {
     addSeparator();
 
     /* Always On Top menu */
+#ifndef CONFIG_DARWIN
     actionTopMost = addAction("&Always on Top");
     actionTopMost->setCheckable(true);
     connect(actionTopMost, SIGNAL(triggered(bool)), this, SLOT(slotTopMost(bool)));
+#endif
 
     /* = Rotate menu = */
     if (win->uiInfo->mainFormList.count() > 1) {
@@ -269,7 +271,7 @@ void ContextMenu::slotTopMost(bool on)
     HWND hWnd = (HWND)parent->winId();
     HWND hWndInsertAfter = ((on == true) ? HWND_TOPMOST : HWND_NOTOPMOST);
     SetWindowPos(hWnd, hWndInsertAfter, parent->pos().x(), parent->pos().y(), 0, 0, SWP_NOSIZE);
-#else
+#elif defined (CONFIG_LINUX)
     Display* display = XOpenDisplay(NULL);
     if (display == NULL) {
         qDebug("Error: XOpenDisplay() Failed. Always on top failed.");
@@ -293,6 +295,8 @@ void ContextMenu::slotTopMost(bool on)
     XFlush(display);
 
     XCloseDisplay(display);
+#elif defined (CONFIG_DARWIN)
+    // TODO:
 #endif
 
     actionTopMost->setChecked(on);