fprintf(stderr, "No accelerator found!\n");
}
#ifdef CONFIG_MARU
- maru_register_exit_msg(MARU_EXIT_UNKNOWN, "No accelerator found.");
+ maru_register_exit_msg(MARU_EXIT_UNKNOWN, NO_ACCELERATOR_FOUND);
#endif
exit(1);
}
if (ret < 0) {
#ifdef CONFIG_MARU
char *path = get_canonical_path(file);
- char *msg = g_strdup_printf("Failed to load disk file from the following path. Check if the file is corrupted or missing.\n\n%s", path);
+ char *msg = g_strdup_printf("%s%s%s", FAILED_TO_LOAD_DISK, CHECK_FILE_VALID, path);
start_simple_client(msg);
#include "layout/hardwarekey.h"
#include "xmllayoutparser.h"
#include "uiutil.h"
+#include "uistrings.h"
#include "displaybase.h"
extern "C" {
QString err;
QMessageBox::critical(0, "Emulator",
- QString("An internal error occurred.\n: ") +
+ QString(INTERNAL_ERROR_OCCURRED) +
err.sprintf("%s", (localMsg.trimmed()).constData()) +
- "\n\nEmulator will now exit.");
+ EMULATOR_WILL_EXIT);
abort();
}
}
void loadMainFormFromXML(QFile *file, UIInformation *uiInfo/* out */)
{
if (file->exists() == false) {
- qFatal("%s is not found", qPrintable(file->fileName()));
+ qFatal("%s %s", qPrintable(file->fileName()), IS_NOT_FOUND);
return;
}
if (!file->open(QIODevice::ReadOnly | QIODevice::Text)) {
- qFatal("Couldn't open %s file", qPrintable(file->fileName()));
+ qFatal("%s %s %s", COULD_NOT_OPEN_1, qPrintable(file->fileName()), COULD_NOT_OPEN_2);
return;
}
file->close();
if (hasError == true) {
- qFatal("Invalid xml format");
+ qFatal(INVALID_XML_FORMAT);
return;
}
}
}
if (!file->open(QIODevice::ReadOnly | QIODevice::Text)) {
- qFatal("Couldn't open %s file", qPrintable(file->fileName()));
+ qFatal("%s %s %s", COULD_NOT_OPEN_1, qPrintable(file->fileName()), COULD_NOT_OPEN_2);
return;
}
file->close();
if (hasError == true) {
- qFatal("Invalid xml format");
+ qFatal(INVALID_XML_FORMAT);
return;
}
}
char* addon = strtok(data, token);
memset(fail_msg, 0, sizeof(fail_msg));
- strcpy(fail_msg, "Extra package installation is failed.\n");
+ strcpy(fail_msg, FAILED_TO_INSTALL_EXTRAPACKAGE_1);
strcat(fail_msg, addon);
- strcat(fail_msg, " must be installed MANUALLY!");
+ strcat(fail_msg, FAILED_TO_INSTALL_EXTRAPACKAGE_2);
start_simple_client(fail_msg);
}
#ifndef MARUSKIN_CLIENT_H_
#define MARUSKIN_CLIENT_H_
+#include "tizen/src/util/maru_util_strings.h"
+
int start_skin_client(int argc, char* argv[]);
int start_simple_client(char* msg);
#include "emulator_common.h"
#include "mainwindow.h"
#include "uiutil.h"
+#include "uistrings.h"
#include "menu/advancedmenuitem.h"
#include "menu/scalemenuitem.h"
if (is_sdbd_initialized == 0) {
showMsgBox(QMessageBox::Warning,
- "SDB is not ready.\nPlease wait until the emulator is completely boot up.");
+ SDB_NOT_READY);
return;
}
QFileInfo sdbFileInfo(sdbPath);
if (sdbFileInfo.exists() == false) {
showMsgBox(QMessageBox::Warning,
- "SDB file does not exist in the following path.\n"
+ SDB_NOT_EXIST
+ sdbFileInfo.absoluteFilePath());
return;
}
QFileInfo ecpFileInfo(ecpPath);
if (!ecpFileInfo.exists()) {
showMsgBox(QMessageBox::Warning,
- "Control Panel file does not exist in the following path.\n"
+ CONTROLPANEL_NOT_EXIST
+ ecpFileInfo.absoluteFilePath());
return;
}
if (menu_get_java_path(&path)) {
command = QString::fromLocal8Bit(path);
} else {
- showMsgBox(QMessageBox::Warning, "Failed to get java path.");
+ showMsgBox(QMessageBox::Warning, FAILED_TO_GET_JAVA_PATH);
free(path);
return;
}
try {
QProcess::startDetached(command, arguments);
} catch (QString &error) {
- showMsgBox(QMessageBox::Warning, "Failed to open Control Panel : " + error);
+ showMsgBox(QMessageBox::Warning, FAILED_TO_OPEN_CONTROLPANEL + error);
return;
}
}
qDebug("force close");
QMessageBox *msgBox = showMsgBox(QMessageBox::Question,
- "If you force stop an emulator, it may cause some problems.\n"
- "Are you sure you want to continue?",
+ FORCE_CLOSE_POPUP,
QMessageBox::Cancel | QMessageBox::Ok, QMessageBox::Cancel);
connect(msgBox, SIGNAL(buttonClicked(QAbstractButton *)),
*/
#include "uiinformation.h"
+#include "uistrings.h"
UIInformation::UIInformation() :
resolution(0, 0), basePort(0)
{
MainForm *mainForm = getMainForm();
if (mainForm == NULL) {
- qFatal("main form is null");
+ qFatal(MAIN_FORM_IS_NULL);
}
return mainForm->skinImg[MainForm::normal].size() * uiState.getScaleFactor();
--- /dev/null
+/*
+ * The strings for the emulator ui messages
+ *
+ * Copyright (C) 2015 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Sooyoung Ha <yoosah.ha@samsung.com>
+ * GiWoong Kim <giwoong.kim@samsung.com>
+ * SeokYeon Hwang <syeon.hwang@samsung.com>
+ * Sangho Park <sangho.p@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+#ifndef UISTRINGS_H
+#define UISTRINGS_H
+
+#define SDB_NOT_READY "SDB is not ready.\nPlease wait until the emulator is completely boot up."
+#define SDB_NOT_EXIST "SDB file does not exist in the following path.\n"
+#define CONTROLPANEL_NOT_EXIST "Control Panel file does not exist in the following path.\n"
+#define FAILED_TO_GET_JAVA_PATH "Failed to get java path."
+#define FAILED_TO_OPEN_CONTROLPANEL "Failed to open Control Panel : "
+#define FORCE_CLOSE_POPUP "If you force stop an emulator, it may cause some problems.\n"\
+ "Are you sure you want to continue?"
+
+/* qFatal msgs*/
+#define INTERNAL_ERROR_OCCURRED "An internal error occurred.\n: "
+#define EMULATOR_WILL_EXIT "\n\nEmulator will now exit."
+#define MAIN_FORM_IS_NULL "main form is null"
+#define IS_NOT_FOUND "is not found"
+#define COULD_NOT_OPEN_1 "Couldn't open"
+#define COULD_NOT_OPEN_2 "file"
+#define INVALID_XML_FORMAT "Invalid xml format"
+
+#endif /* UISTRINGS_H */
/* This table must match the enum definition */
static char _maru_string_table[][JAVA_MAX_COMMAND_LENGTH] = {
/* 0 */ "",
- /* 1 */ "Failed to allocate memory in qemu.",
- /* 2 */ "Failed to load a kernel file the following path."
- " Check if the file is corrupted or missing.\n\n",
- /* 3 */ "Failed to load a bios file in bios path that mentioned on document."
- " Check if the file is corrupted or missing.\n\n",
- /* 4 */ "Skin process cannot be initialized. Skin server is not ready.",
- /* 5 */ "Emulator has stopped working.\n"
- "A problem caused the program to stop working correctly.",
+ /* 1 */ FAILED_TO_ALLOCATE_MEMORY,
+ /* 2 */ FAILED_TO_LOAD_KERNEL CHECK_FILE_VALID,
+ /* 3 */ FAILED_TO_LOAD_BIOS CHECK_FILE_VALID,
+ /* 4 */ FAILED_TO_INITIAL_SKIN,
+ /* 5 */ EMULATOR_HAS_STOPPED,
/* add here.. */
""
};
--- /dev/null
+/*
+ * The strings for the emulator messages
+ *
+ * Copyright (C) 2015 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Sooyoung Ha <yoosah.ha@samsung.com>
+ * GiWoong Kim <giwoong.kim@samsung.com>
+ * SeokYeon Hwang <syeon.hwang@samsung.com>
+ * Sangho Park <sangho.p@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+#ifndef __MARU_UTIL_STRINGS_H__
+#define __MARU_UTIL_STRINGS_H__
+
+#define FAILED_TO_ALLOCATE_MEMORY "Failed to allocate memory in qemu."
+#define FAILED_TO_LOAD_KERNEL "Failed to load a kernel file the following path."
+#define FAILED_TO_LOAD_BIOS "Failed to load a bios file in bios path that mentioned on document."
+#define FAILED_TO_LOAD_DISK "Failed to load disk file from the following path."
+#define CHECK_FILE_VALID " Check if the file is corrupted or missing.\n\n"
+#define FAILED_TO_INITIAL_SKIN "Skin process cannot be initialized. Skin server is not ready."
+#define FAILED_TO_INSTALL_EXTRAPACKAGE_1 "Extra package installation is failed.\n"
+#define FAILED_TO_INSTALL_EXTRAPACKAGE_2 " must be installed MANUALLY!"
+#define EMULATOR_HAS_STOPPED "Emulator has stopped working.\nA problem caused the program to stop working correctly."
+#define NO_ACCELERATOR_FOUND "No accelerator found."
+
+#endif /* __MARU_UTIL_STRINGS_H__ */