diff options
Diffstat (limited to 'tizen')
33 files changed, 84 insertions, 57 deletions
diff --git a/tizen/src/emul_state.c b/tizen/src/emul_state.c index 5ecf70dca7..eff41e8ee5 100644 --- a/tizen/src/emul_state.c +++ b/tizen/src/emul_state.c @@ -377,13 +377,14 @@ const char *get_vm_name(void) // when drive_file_vm_name != var_vm_name // we should warn to users LOG_WARNING("vm_name and image_file_name is not matched\n"); + } + // we choose drive_file_vm_name when var_vm_name is not provided + if (!var_vm_name || strlen(var_vm_name) == 0) { + vm_name = g_strdup(drive_file_vm_name + start_index); } else { - // we choose drive_file_vm_name when var_vm_name is not provided - // or they contain same name + vm_name = g_strdup(var_vm_name); } - vm_name = g_strdup(drive_file_vm_name + start_index); - g_free(drive_file_vm_name); LOG_INFO("VM name: %s\n", vm_name); diff --git a/tizen/src/ui/displaybase.cpp b/tizen/src/ui/displaybase.cpp index 1daff0677c..2d63aeb1ff 100644 --- a/tizen/src/ui/displaybase.cpp +++ b/tizen/src/ui/displaybase.cpp @@ -59,7 +59,6 @@ DisplayBase::DisplayBase(DisplayType *displayForm, QSize resolution, qreal scale this->mouseHelper = NULL; this->offGuide = NULL; - this->offGuideShown = false; this->movingMode = false; this->grabPos = SKINVIEW_NULLITY_POSITION; @@ -108,24 +107,21 @@ bool DisplayBase::isOffGuideReady() void DisplayBase::showOffGuideImg() { - offGuideShown = true; - if (!offGuide) { offGuide = new QLabel(win); offGuide->setStyleSheet( "background-color: black; border-style: none;"); offGuide->setAlignment(Qt::AlignCenter); + } + offGuide->setGeometry(getGeometry()); + offGuide->setPixmap(offGuideImg.scaled( + getGeometry().width(), getGeometry().height(), + Qt::KeepAspectRatio, Qt::SmoothTransformation)); - offGuide->setGeometry(getGeometry()); - offGuide->setPixmap(offGuideImg.scaled( - getGeometry().width(), getGeometry().height(), - Qt::KeepAspectRatio, Qt::SmoothTransformation)); - - if (maskImage.size() != QSize(0, 0)) { - offGuide->setMask(maskImage.scaled( - maskImage.width() * scaleFactor, - maskImage.height() * scaleFactor).mask()); - } + if (maskImage.size() != QSize(0, 0)) { + offGuide->setMask(maskImage.scaled( + maskImage.width() * scaleFactor, + maskImage.height() * scaleFactor).mask()); } offGuide->show(); @@ -133,16 +129,14 @@ void DisplayBase::showOffGuideImg() void DisplayBase::hideOffGuideImg() { - if (offGuide != NULL) { - offGuide->close(); + if (isOffGuideShown()) { + offGuide->hide(); } - - offGuideShown = false; } bool DisplayBase::isOffGuideShown() { - return offGuideShown; + return (offGuide && offGuide->isVisible()); } void DisplayBase::switchForm(DisplayType *displayForm) @@ -180,9 +174,7 @@ void DisplayBase::update() void DisplayBase::updateGeometry() { - if (isOffGuideShown() == true) { - hideOffGuideImg(); - } + hideOffGuideImg(); qreal sx = rect.x() * scaleFactor; qreal sy = rect.y() * scaleFactor; @@ -590,7 +582,9 @@ DisplayBase::~DisplayBase() { qDebug("destroy display"); - hideOffGuideImg(); + if (offGuide != NULL) { + delete offGuide; + } if (tsHelper != NULL) { delete tsHelper; diff --git a/tizen/src/ui/displaybase.h b/tizen/src/ui/displaybase.h index 73d96c6274..7455890ace 100644 --- a/tizen/src/ui/displaybase.h +++ b/tizen/src/ui/displaybase.h @@ -113,7 +113,6 @@ private: bool dropping; QLabel *offGuide; QPixmap offGuideImg; - bool offGuideShown; QPoint grabPos; QPoint grabWinPos; diff --git a/tizen/src/ui/input/keyboardshortcut.cpp b/tizen/src/ui/input/keyboardshortcut.cpp index a5f598c8a3..101d1ff199 100644 --- a/tizen/src/ui/input/keyboardshortcut.cpp +++ b/tizen/src/ui/input/keyboardshortcut.cpp @@ -96,7 +96,12 @@ void KeyboardShortcut::cancelHwKeyShortcuts(QList<HardwareKey *> &list) void KeyboardShortcut::slotHwKeyShortcut(int keycode) { qDebug() << "shortcut: \"HW key\"" << keycode; - + MainView *mainView = win->getMainView(); + if (mainView) { + mainView->getKbdHelper()->autoKeyRelease(); + } else { + qWarning() << "mainView is not ready."; + } do_hw_key_event(KEY_PRESSED, keycode); do_hw_key_event(KEY_RELEASED, keycode); } diff --git a/tizen/src/ui/menu/contextmenu.cpp b/tizen/src/ui/menu/contextmenu.cpp index 0c0c348f9d..e171e80ed8 100644 --- a/tizen/src/ui/menu/contextmenu.cpp +++ b/tizen/src/ui/menu/contextmenu.cpp @@ -213,7 +213,7 @@ void ContextMenu::createInfoItem(QMenu *menu, MenuItem *item) menu, QIcon(QPixmap(":/icons/detailed_info.png")), menuName.isEmpty() ? vmName : menuName, item->getShortcuts().isEmpty()? NULL : - new QShortcut(item->getShortcuts().begin().value(), parent), + new QShortcut(item->getShortcuts().begin().value(), parent), SLOT(slotDetailedInfo())); actionDetailedInfo->setIconText(menuName.isEmpty() ? QString(DETAILED_INFO_TITLE) : menuName); @@ -231,8 +231,12 @@ void ContextMenu::createOnTopItem(QMenu *menu, MenuItem *item) actionOnTop = menu->addAction( menuName.isEmpty() ? MENU_ONTOP_ITEM_TEXT : menuName); #ifdef CONFIG_DARWIN - actionOnTop->setIcon(QIcon(QPixmap(":/icons/alwaysontop.png"))); + // add dummy icon + QPixmap pix = QPixmap(QSize(16, 16)); + pix.fill(Qt::transparent); + actionOnTop->setIcon(QIcon(pix)); #endif + actionOnTop->setCheckable(true); QObject::connect(actionOnTop, SIGNAL(triggered(bool)), this, SLOT(slotOnTop(bool))); @@ -253,17 +257,11 @@ void ContextMenu::createMoveItem(QMenu *menu, MenuItem *item) } QString menuName = item->getName(); - actionMove = menu->addAction( - menuName.isEmpty() ? MENU_MOVE_ITEM_TEXT : menuName); - actionMove->setIcon(QIcon(QPixmap(":/icons/move.png"))); - QObject::connect(actionMove, SIGNAL(triggered()), this, SLOT(slotMove())); - - /* shortcut */ - if (item->getShortcuts().isEmpty() == false) { - QShortcut *shortcut = new QShortcut( - item->getShortcuts().begin().value(), parent); - attachShortcut(actionMove, shortcut, SLOT(slotMove())); - } + actionMove = addGeneralAction(menu, QIcon(QPixmap(":/icons/move.png")), + menuName.isEmpty() ? MENU_MOVE_ITEM_TEXT : menuName, + item->getShortcuts().isEmpty() ? NULL + : new QShortcut(item->getShortcuts().begin().value(), parent), + SLOT(slotMove())); item->setAction(actionMove); } @@ -403,9 +401,17 @@ void ContextMenu::createControllerItem(QMenu *menu, MenuItem *item) if (conFormList.isEmpty() == false) { QString menuName = item->getName(); - controllerMenu = menu->addMenu( - menuName.isEmpty() ? MENU_CONTROLLER_ITEM_TEXT : menuName); +#ifdef CONFIG_DARWIN + // add dummy icon + QPixmap pix = QPixmap(QSize(16, 16)); + pix.fill(Qt::transparent); + controllerMenu = menu->addMenu(QIcon(pix), + menuName.isEmpty() ? MENU_CONTROLLER_ITEM_TEXT : menuName); +#else + controllerMenu = menu->addMenu( + menuName.isEmpty() ? MENU_CONTROLLER_ITEM_TEXT : menuName); +#endif controllerGroup = new QActionGroup(this); controllerMapper = new QSignalMapper(this); QObject::connect(controllerMapper, SIGNAL(mapped(int)), this, SLOT(slotController(int))); @@ -460,7 +466,7 @@ void ContextMenu::createHostKeyboardItem(QMenu *menu, MenuItem *item) } QString menuName = item->getName(); - QMenu *keyboardMenu = menu->addMenu(QIcon(QPixmap(":/icons/host_keyboard.png")), + QMenu *keyboardMenu = menu->addMenu(QIcon(), menuName.isEmpty() ? MENU_HOSTKBD_ITEM_TEXT : menuName); keyboardGroup = new QActionGroup(this); @@ -556,7 +562,7 @@ void ContextMenu::createSystemResetItem(QMenu *menu, MenuItem *item) QString menuName = item->getName(); actionSystemReset = addGeneralAction( - menu, QIcon(QPixmap(":/icons/system_reset.png")), + menu, QIcon(), menuName.isEmpty() ? MENU_FORCECLOSE_ITEM_TEXT : menuName, item->getShortcuts().isEmpty()? NULL : new QShortcut(item->getShortcuts().begin().value(), parent), @@ -573,7 +579,7 @@ void ContextMenu::createForceCloseItem(QMenu *menu, MenuItem *item) QString menuName = item->getName(); actionForceClose = addGeneralAction( - menu, QIcon(QPixmap(":/icons/force_close.png")), + menu, QIcon(), menuName.isEmpty() ? MENU_FORCECLOSE_ITEM_TEXT : menuName, item->getShortcuts().isEmpty()? NULL : new QShortcut(item->getShortcuts().begin().value(), parent), @@ -603,7 +609,19 @@ QAction *ContextMenu::addGeneralAction(QMenu *menu, const QIcon &icon, const QString &text, QShortcut *shortcut, const char *slot) { QAction *action = menu->addAction(text); + +#ifdef CONFIG_DARWIN + // set dummy icon + if (icon.isNull()) { + QPixmap pix = QPixmap(QSize(16, 16)); + pix.fill(Qt::transparent); + action->setIcon(QIcon(pix)); + } else { + action->setIcon(icon); + } +#else action->setIcon(icon); +#endif QObject::connect(action, SIGNAL(triggered()), this, slot); attachShortcut(action, shortcut, slot); diff --git a/tizen/src/ui/menu/screenshotdialog.cpp b/tizen/src/ui/menu/screenshotdialog.cpp index 42505d07ae..c57a7bb077 100644 --- a/tizen/src/ui/menu/screenshotdialog.cpp +++ b/tizen/src/ui/menu/screenshotdialog.cpp @@ -78,7 +78,10 @@ void ScreenShotDialog::createItems(QGridLayout *layout) /* Save */ actionSave = new QAction(SCREENSHOT_SAVE_TEXT, this); actionSave->setShortcuts(QKeySequence::Save); - actionSave->setIcon(QIcon(":/icons/save_screenshot_dialog.png")); + QIcon saveIcon = QIcon(":/icons/ss_save_nor.png"); + saveIcon.addPixmap(QPixmap(":/icons/ss_save_mv.png"), QIcon::Active); + saveIcon.addPixmap(QPixmap(":/icons/ss_save_sel.png"), QIcon::Selected); + actionSave->setIcon(saveIcon); actionSave->setToolTip(SCREENSHOT_SAVE_TOOLTIP); connect(actionSave, SIGNAL(triggered()), this, SLOT(slotSave())); toolBar->addAction(actionSave); @@ -86,7 +89,10 @@ void ScreenShotDialog::createItems(QGridLayout *layout) /* Copy */ actionCopy = new QAction(SCREENSHOT_COPY_TEXT, this); actionCopy->setShortcuts(QKeySequence::Copy); - actionCopy->setIcon(QIcon(":/icons/copy_screenshot_dialog.png")); + QIcon copyIcon = QIcon(":/icons/ss_copy_nor.png"); + copyIcon.addPixmap(QPixmap(":/icons/ss_copy_mv.png"), QIcon::Active); + copyIcon.addPixmap(QPixmap(":/icons/ss_copy_sel.png"), QIcon::Selected); + actionCopy->setIcon(copyIcon); actionCopy->setToolTip(SCREENSHOT_COPY_TOOLTIP); connect(actionCopy, SIGNAL(triggered()), this, SLOT(slotCopy())); toolBar->addAction(actionCopy); @@ -94,7 +100,10 @@ void ScreenShotDialog::createItems(QGridLayout *layout) /* Refresh */ actionRefresh = new QAction(SCREENSHOT_REFRESH_TEXT, this); actionRefresh->setShortcuts(QKeySequence::Refresh); - actionRefresh->setIcon(QIcon(":/icons/refresh_screenshot_dialog.png")); + QIcon refreshIcon = QIcon(":/icons/ss_refresh_nor.png"); + refreshIcon.addPixmap(QPixmap(":/icons/ss_refresh_mv.png"), QIcon::Active); + refreshIcon.addPixmap(QPixmap(":/icons/ss_refresh_sel.png"), QIcon::Selected); + actionRefresh->setIcon(refreshIcon); actionRefresh->setToolTip(SCREENSHOT_REFRESH_TOOLTIP); connect(actionRefresh, SIGNAL(triggered()), win->getPopupMenu(), SLOT(slotRequestScreenshot())); diff --git a/tizen/src/ui/resource/icons/about.png b/tizen/src/ui/resource/icons/about.png Binary files differindex 4f76588f80..40ce0c8cdd 100644 --- a/tizen/src/ui/resource/icons/about.png +++ b/tizen/src/ui/resource/icons/about.png diff --git a/tizen/src/ui/resource/icons/advanced.png b/tizen/src/ui/resource/icons/advanced.png Binary files differindex 14cf9fae59..7f974c4f5f 100644 --- a/tizen/src/ui/resource/icons/advanced.png +++ b/tizen/src/ui/resource/icons/advanced.png diff --git a/tizen/src/ui/resource/icons/alwaysontop.png b/tizen/src/ui/resource/icons/alwaysontop.png Binary files differdeleted file mode 100644 index abbb29df2a..0000000000 --- a/tizen/src/ui/resource/icons/alwaysontop.png +++ /dev/null diff --git a/tizen/src/ui/resource/icons/close.png b/tizen/src/ui/resource/icons/close.png Binary files differindex a1395ce2c4..546ccecd51 100644 --- a/tizen/src/ui/resource/icons/close.png +++ b/tizen/src/ui/resource/icons/close.png diff --git a/tizen/src/ui/resource/icons/control_panel.png b/tizen/src/ui/resource/icons/control_panel.png Binary files differindex 3da7e80dfd..0e1cffb77e 100644 --- a/tizen/src/ui/resource/icons/control_panel.png +++ b/tizen/src/ui/resource/icons/control_panel.png diff --git a/tizen/src/ui/resource/icons/copy_screenshot_dialog.png b/tizen/src/ui/resource/icons/copy_screenshot_dialog.png Binary files differdeleted file mode 100644 index a07a5f720b..0000000000 --- a/tizen/src/ui/resource/icons/copy_screenshot_dialog.png +++ /dev/null diff --git a/tizen/src/ui/resource/icons/detailed_info.png b/tizen/src/ui/resource/icons/detailed_info.png Binary files differdeleted file mode 100644 index 149ffa263e..0000000000 --- a/tizen/src/ui/resource/icons/detailed_info.png +++ /dev/null diff --git a/tizen/src/ui/resource/icons/force_close.png b/tizen/src/ui/resource/icons/force_close.png Binary files differdeleted file mode 100644 index a506b4d96d..0000000000 --- a/tizen/src/ui/resource/icons/force_close.png +++ /dev/null diff --git a/tizen/src/ui/resource/icons/host_keyboard.png b/tizen/src/ui/resource/icons/host_keyboard.png Binary files differdeleted file mode 100644 index 69a87f3207..0000000000 --- a/tizen/src/ui/resource/icons/host_keyboard.png +++ /dev/null diff --git a/tizen/src/ui/resource/icons/move.png b/tizen/src/ui/resource/icons/move.png Binary files differindex 1697b28233..fe4a1a5971 100644 --- a/tizen/src/ui/resource/icons/move.png +++ b/tizen/src/ui/resource/icons/move.png diff --git a/tizen/src/ui/resource/icons/refresh_screenshot_dialog.png b/tizen/src/ui/resource/icons/refresh_screenshot_dialog.png Binary files differdeleted file mode 100644 index e1616d9bc2..0000000000 --- a/tizen/src/ui/resource/icons/refresh_screenshot_dialog.png +++ /dev/null diff --git a/tizen/src/ui/resource/icons/rotate.png b/tizen/src/ui/resource/icons/rotate.png Binary files differindex b2fc00f1f5..2da316d2a2 100644 --- a/tizen/src/ui/resource/icons/rotate.png +++ b/tizen/src/ui/resource/icons/rotate.png diff --git a/tizen/src/ui/resource/icons/save_screenshot_dialog.png b/tizen/src/ui/resource/icons/save_screenshot_dialog.png Binary files differdeleted file mode 100644 index 523fe9efd3..0000000000 --- a/tizen/src/ui/resource/icons/save_screenshot_dialog.png +++ /dev/null diff --git a/tizen/src/ui/resource/icons/scale.png b/tizen/src/ui/resource/icons/scale.png Binary files differindex 1f3f872b52..7a369cff7b 100644 --- a/tizen/src/ui/resource/icons/scale.png +++ b/tizen/src/ui/resource/icons/scale.png diff --git a/tizen/src/ui/resource/icons/screen_shot.png b/tizen/src/ui/resource/icons/screen_shot.png Binary files differindex 74c85152f2..282b665f4e 100644 --- a/tizen/src/ui/resource/icons/screen_shot.png +++ b/tizen/src/ui/resource/icons/screen_shot.png diff --git a/tizen/src/ui/resource/icons/shell.png b/tizen/src/ui/resource/icons/shell.png Binary files differindex e89f1b1690..2e25e4fc4a 100644 --- a/tizen/src/ui/resource/icons/shell.png +++ b/tizen/src/ui/resource/icons/shell.png diff --git a/tizen/src/ui/resource/icons/ss_copy_mv.png b/tizen/src/ui/resource/icons/ss_copy_mv.png Binary files differnew file mode 100644 index 0000000000..cc69c96af2 --- /dev/null +++ b/tizen/src/ui/resource/icons/ss_copy_mv.png diff --git a/tizen/src/ui/resource/icons/ss_copy_nor.png b/tizen/src/ui/resource/icons/ss_copy_nor.png Binary files differnew file mode 100644 index 0000000000..571fca7d02 --- /dev/null +++ b/tizen/src/ui/resource/icons/ss_copy_nor.png diff --git a/tizen/src/ui/resource/icons/ss_copy_sel.png b/tizen/src/ui/resource/icons/ss_copy_sel.png Binary files differnew file mode 100644 index 0000000000..a31e6656d1 --- /dev/null +++ b/tizen/src/ui/resource/icons/ss_copy_sel.png diff --git a/tizen/src/ui/resource/icons/ss_refresh_mv.png b/tizen/src/ui/resource/icons/ss_refresh_mv.png Binary files differnew file mode 100644 index 0000000000..17ac41830f --- /dev/null +++ b/tizen/src/ui/resource/icons/ss_refresh_mv.png diff --git a/tizen/src/ui/resource/icons/ss_refresh_nor.png b/tizen/src/ui/resource/icons/ss_refresh_nor.png Binary files differnew file mode 100644 index 0000000000..6f68b3d1da --- /dev/null +++ b/tizen/src/ui/resource/icons/ss_refresh_nor.png diff --git a/tizen/src/ui/resource/icons/ss_refresh_sel.png b/tizen/src/ui/resource/icons/ss_refresh_sel.png Binary files differnew file mode 100644 index 0000000000..1121290a65 --- /dev/null +++ b/tizen/src/ui/resource/icons/ss_refresh_sel.png diff --git a/tizen/src/ui/resource/icons/ss_save_mv.png b/tizen/src/ui/resource/icons/ss_save_mv.png Binary files differnew file mode 100644 index 0000000000..3170db246b --- /dev/null +++ b/tizen/src/ui/resource/icons/ss_save_mv.png diff --git a/tizen/src/ui/resource/icons/ss_save_nor.png b/tizen/src/ui/resource/icons/ss_save_nor.png Binary files differnew file mode 100644 index 0000000000..df5774ccba --- /dev/null +++ b/tizen/src/ui/resource/icons/ss_save_nor.png diff --git a/tizen/src/ui/resource/icons/ss_save_sel.png b/tizen/src/ui/resource/icons/ss_save_sel.png Binary files differnew file mode 100644 index 0000000000..94536db8ea --- /dev/null +++ b/tizen/src/ui/resource/icons/ss_save_sel.png diff --git a/tizen/src/ui/resource/icons/system_reset.png b/tizen/src/ui/resource/icons/system_reset.png Binary files differdeleted file mode 100644 index bb4e7c203d..0000000000 --- a/tizen/src/ui/resource/icons/system_reset.png +++ /dev/null diff --git a/tizen/src/ui/resource/resource.qrc b/tizen/src/ui/resource/resource.qrc index 7dce589438..c5d26ec982 100644 --- a/tizen/src/ui/resource/resource.qrc +++ b/tizen/src/ui/resource/resource.qrc @@ -38,18 +38,19 @@ <file>icons/about.png</file> <file>icons/advanced.png</file> <file>icons/close.png</file> - <file>icons/system_reset.png</file> - <file>icons/force_close.png</file> <file>icons/rotate.png</file> <file>icons/scale.png</file> <file>icons/control_panel.png</file> - <file>icons/detailed_info.png</file> <file>icons/screen_shot.png</file> - <file>icons/host_keyboard.png</file> - <file>icons/save_screenshot_dialog.png</file> - <file>icons/copy_screenshot_dialog.png</file> - <file>icons/refresh_screenshot_dialog.png</file> - <file>icons/alwaysontop.png</file> + <file>icons/ss_save_nor.png</file> + <file>icons/ss_copy_nor.png</file> + <file>icons/ss_refresh_nor.png</file> + <file>icons/ss_save_mv.png</file> + <file>icons/ss_copy_mv.png</file> + <file>icons/ss_refresh_mv.png</file> + <file>icons/ss_save_sel.png</file> + <file>icons/ss_copy_sel.png</file> + <file>icons/ss_refresh_sel.png</file> <file>icons/move.png</file> </qresource> </RCC> |