javauis/eswt_qt/org.eclipse.swt/Eclipse SWT/qt/org/eclipse/ercp/swt/mobile/TimedMessageBox.java
changeset 80 d6dafc5d983f
parent 21 2a9601315dfc
equal deleted inserted replaced
78:71ad690e91f5 80:d6dafc5d983f
   198         if ((style & SWT.APPLICATION_MODAL) != 0) {
   198         if ((style & SWT.APPLICATION_MODAL) != 0) {
   199             modality = OS.QT_WINDOWMODALITY_APPLICATIONMODAL;
   199             modality = OS.QT_WINDOWMODALITY_APPLICATIONMODAL;
   200         }
   200         }
   201         int layoutDirection = (style & SWT.RIGHT_TO_LEFT) != 0 ? OS.QT_RIGHTTOLEFT
   201         int layoutDirection = (style & SWT.RIGHT_TO_LEFT) != 0 ? OS.QT_RIGHTTOLEFT
   202                 : OS.QT_LEFTTORIGHT;
   202                 : OS.QT_LEFTTORIGHT;
   203         int pixmapHandle = (image == null) ? 0 : Internal_GfxPackageSupport.getPixmapHandle(image);
   203 
       
   204         int cgImageHandle = (image == null) ? 0 : Internal_GfxPackageSupport.getImageHandle(image);
   204 
   205 
   205         int icon = OS.QMESSAGEBOX_NOICON;
   206         int icon = OS.QMESSAGEBOX_NOICON;
   206         if (image == null) {
   207         if (image == null) {
   207             if ((style & (SWT.ICON_INFORMATION)) != 0)  icon = OS.QMESSAGEBOX_INFORMATION;
   208             if ((style & (SWT.ICON_INFORMATION)) != 0)  icon = OS.QMESSAGEBOX_INFORMATION;
   208             if ((style & (SWT.ICON_WARNING)) != 0)  icon = OS.QMESSAGEBOX_WARNING;
   209             if ((style & (SWT.ICON_WARNING)) != 0)  icon = OS.QMESSAGEBOX_WARNING;
   209             if ((style & (SWT.ICON_ERROR)) != 0)    icon = OS.QMESSAGEBOX_CRITICAL;
   210             if ((style & (SWT.ICON_ERROR)) != 0)    icon = OS.QMESSAGEBOX_CRITICAL;
   210         }
   211         }
   211 
   212 
   212         int parentHandle = Internal_PackageSupport.handle(getParent());
   213         int parentHandle = Internal_PackageSupport.handle(getParent());
   213         OS.QMessageBox_swt_execTimer(icon, getText(), message, parentHandle,
   214         OS.QMessageBox_swt_execTimer(icon, getText(), message, parentHandle,
   214                 dialogID, layoutDirection, modality, pixmapHandle);
   215                 dialogID, layoutDirection, modality, cgImageHandle);
   215 
   216 
   216         if (getParent() != null && !getParent().isDisposed()) {
   217         if (getParent() != null && !getParent().isDisposed()) {
   217             getParent().removeDisposeListener(listener);
   218             getParent().removeDisposeListener(listener);
   218         }
   219         }
   219     }
   220     }