From 68a0bac969e0c4b16afddcc42ee5a43d7915320d Mon Sep 17 00:00:00 2001 From: GiWoong Kim Date: Tue, 29 Dec 2015 16:28:16 +0900 Subject: [PATCH] menu: add platform image version info to Detailed Info dialog Change-Id: I527b54aa134a5dacbf34c1f3030a2038336185d8 Signed-off-by: GiWoong Kim (cherry picked from commit 18c5e6c2adbea54e4628a2207c1a23777bb94bdf) --- tizen/src/emul_state.c | 5 ++++ tizen/src/emul_state.h | 1 + tizen/src/ui/menu/detailedinfodialog.cpp | 30 ++++++++++++++---------- tizen/src/ui/resource/ui_strings.h | 7 +++--- 4 files changed, 28 insertions(+), 15 deletions(-) diff --git a/tizen/src/emul_state.c b/tizen/src/emul_state.c index 8befca64c9..6772eeb876 100644 --- a/tizen/src/emul_state.c +++ b/tizen/src/emul_state.c @@ -485,6 +485,11 @@ const char *get_drive_image_file(void) return ""; } +const char *get_drive_image_ver(void) +{ + return get_variable("image_ver"); +} + // swap image file static const char *swap_image_file = NULL; diff --git a/tizen/src/emul_state.h b/tizen/src/emul_state.h index dec53ae32c..00223b9649 100644 --- a/tizen/src/emul_state.h +++ b/tizen/src/emul_state.h @@ -176,6 +176,7 @@ char const *get_bin_path(void); char const *get_log_redirect_file(void); char const *get_kernel_log_redirect_file(void); const char *get_drive_image_file(void); +const char *get_drive_image_ver(void); const char *get_swap_image_file(void); const char *get_kernel_file(void); const char *get_http_proxy_addr(void); diff --git a/tizen/src/ui/menu/detailedinfodialog.cpp b/tizen/src/ui/menu/detailedinfodialog.cpp index 19ec13de0f..c759b2793a 100644 --- a/tizen/src/ui/menu/detailedinfodialog.cpp +++ b/tizen/src/ui/menu/detailedinfodialog.cpp @@ -44,7 +44,7 @@ int get_display_pixel_density(void); #define DIALOG_VERTIC_SPACE 60 #define DIALOG_MIN_WIDTH 200 #define DIALOG_MIN_HEIGHT 200 -#define DIALOG_DEF_WIDTH 320 +#define DIALOG_DEF_WIDTH 360 #define DIALOG_DEF_HEIGHT 480 DetailedInfoDialog::DetailedInfoDialog(QWidget *parent) : @@ -139,11 +139,6 @@ QTableWidget *DetailedInfoDialog::createVmInfoTable() QString::number(win->getUiInfo()->getResolution().height()) + " (" + QString::number(get_display_pixel_density()) + " ppi)"); - QString sharingPath(QString::fromLocal8Bit( - get_host_directory_sharing_path())); - insertTableRow(vmInfo, QString(DETAILED_INFO_HDS_PATH), - (sharingPath.isEmpty()) ? QString(GENERIC_TEXT_NONE) : sharingPath); - insertTableRow(vmInfo, QString(DETAILED_INFO_CPU_VT), (get_emul_cpu_accel()) ? QString(GENERIC_TEXT_ENABLED) : QString(GENERIC_TEXT_DISABLED)); @@ -152,6 +147,17 @@ QTableWidget *DetailedInfoDialog::createVmInfoTable() (is_gpu_accel_enabled()) ? QString(GENERIC_TEXT_ENABLED) : QString(GENERIC_TEXT_DISABLED)); + QString sharingPath(QString::fromLocal8Bit( + get_host_directory_sharing_path())); + insertTableRow(vmInfo, QString(DETAILED_INFO_HDS_PATH), + (sharingPath.isEmpty()) ? QString(GENERIC_TEXT_NONE) : sharingPath); + + /* image version */ + QString imageVer = QString::fromLocal8Bit(get_drive_image_ver()); + if (imageVer.isEmpty() == false) { + insertTableRow(vmInfo, QString(DETAILED_INFO_DRIVE_IMAGE_VER), imageVer); + } + QString drive_image_file( QString::fromLocal8Bit(get_drive_image_file())); if (drive_image_file.isEmpty() == false) { @@ -171,12 +177,6 @@ QTableWidget *DetailedInfoDialog::createVmInfoTable() kernel_file, kernel_file); } - QString log_redirect_file(QString::fromLocal8Bit(get_log_redirect_file())); - if (log_redirect_file.isEmpty() == false) { - insertTableRow(vmInfo, QString(DETAILED_INFO_EMUL_LOG_FILE), - log_redirect_file, log_redirect_file); - } - QString kernel_log_redirect_file( QString::fromLocal8Bit(get_kernel_log_redirect_file())); if (kernel_log_redirect_file.isEmpty() == false) { @@ -189,6 +189,12 @@ QTableWidget *DetailedInfoDialog::createVmInfoTable() QString::number(get_emul_serial_port())); #endif + QString log_redirect_file(QString::fromLocal8Bit(get_log_redirect_file())); + if (log_redirect_file.isEmpty() == false) { + insertTableRow(vmInfo, QString(DETAILED_INFO_EMUL_LOG_FILE), + log_redirect_file, log_redirect_file); + } + /* add double click event listener */ connect(vmInfo, SIGNAL(cellDoubleClicked(int, int)), this, SLOT(slotCellOpen(int, int))); diff --git a/tizen/src/ui/resource/ui_strings.h b/tizen/src/ui/resource/ui_strings.h index 691bd13e6c..dd3b1236a5 100644 --- a/tizen/src/ui/resource/ui_strings.h +++ b/tizen/src/ui/resource/ui_strings.h @@ -101,15 +101,16 @@ #define DETAILED_INFO_CPU "CPU Arch" #define DETAILED_INFO_RAM_SIZE "Ram Size" #define DETAILED_INFO_DISPLAY "Display" -#define DETAILED_INFO_HDS_PATH "Directory Sharing" #define DETAILED_INFO_CPU_VT "CPU Virtualization" #define DETAILED_INFO_GPU_VT "GPU Virtualization" -#define DETAILED_INFO_DRIVE_IMAGE_FILE "Target Image File" +#define DETAILED_INFO_HDS_PATH "Directory Sharing" +#define DETAILED_INFO_DRIVE_IMAGE_FILE "Image File" +#define DETAILED_INFO_DRIVE_IMAGE_VER "Image Version" #define DETAILED_INFO_SWAP_IMAGE_FILE "Swap Image File" #define DETAILED_INFO_KERNEL_FILE "Kernel File" -#define DETAILED_INFO_EMUL_LOG_FILE "Emulator Log File" #define DETAILED_INFO_KERNEL_LOG_FILE "Kernel Log File" #define DETAILED_INFO_TELNET_PORT "Logging Telnet Port" +#define DETAILED_INFO_EMUL_LOG_FILE "Emulator Log File" /* screen shot dialog */ #define SCREENSHOT_TITLE "Screen Shot" -- 2.34.1