Commit 6679d23c authored by Christoffer Ackelman's avatar Christoffer Ackelman

QT: xtt_ge should not be modal.

parent ec639c87
...@@ -245,11 +245,9 @@ XttGeQt::XttGeQt(QWidget* xg_parent_wid, void* xg_parent_ctx, ...@@ -245,11 +245,9 @@ XttGeQt::XttGeQt(QWidget* xg_parent_wid, void* xg_parent_ctx,
xg_get_current_objects_cb, xg_is_authorized_cb, xg_keyboard_cb), xg_get_current_objects_cb, xg_is_authorized_cb, xg_keyboard_cb),
value_dialog(0) value_dialog(0)
{ {
int window_width = 600; int window_width;
int window_height = 500; int window_height;
pwr_tStatus sts; pwr_tStatus sts;
char title[300];
if (xg_width != 0 && xg_height != 0) { if (xg_width != 0 && xg_height != 0) {
window_width = xg_width; window_width = xg_width;
window_height = xg_height; window_height = xg_height;
...@@ -261,11 +259,13 @@ XttGeQt::XttGeQt(QWidget* xg_parent_wid, void* xg_parent_ctx, ...@@ -261,11 +259,13 @@ XttGeQt::XttGeQt(QWidget* xg_parent_wid, void* xg_parent_ctx,
window_height = 500; window_height = 500;
} }
} }
char title[300];
str_StrncpyCutOff(title, name, sizeof(title), 1); str_StrncpyCutOff(title, name, sizeof(title), 1);
// Qt // Qt
if (!(options & ge_mOptions_Embedded)) { if (!(options & ge_mOptions_Embedded)) {
toplevel = new XttGeQtWidget(this, xg_parent_wid); toplevel = new XttGeQtWidget(this);
toplevel->setMinimumSize(window_width, window_height); toplevel->setMinimumSize(window_width, window_height);
toplevel->setWindowTitle(QString::fromLatin1(title)); toplevel->setWindowTitle(QString::fromLatin1(title));
toplevel->setAttribute(Qt::WA_DeleteOnClose); toplevel->setAttribute(Qt::WA_DeleteOnClose);
...@@ -274,15 +274,7 @@ XttGeQt::XttGeQt(QWidget* xg_parent_wid, void* xg_parent_ctx, ...@@ -274,15 +274,7 @@ XttGeQt::XttGeQt(QWidget* xg_parent_wid, void* xg_parent_ctx,
toplevel->setWindowFlags(Qt::CustomizeWindowHint); toplevel->setWindowFlags(Qt::CustomizeWindowHint);
} }
if (options & ge_mOptions_Dialog) {
toplevel->setWindowFlags(Qt::Dialog);
}
CoWowQt::SetWindowIcon(toplevel); CoWowQt::SetWindowIcon(toplevel);
if (basewidget) {
toplevel->setModal(true);
}
if (options & ge_mOptions_IsMain) { if (options & ge_mOptions_IsMain) {
CoWow::SetTransient(toplevel); CoWow::SetTransient(toplevel);
} }
......
...@@ -92,12 +92,12 @@ public: ...@@ -92,12 +92,12 @@ public:
static void message_dialog_cb(void* ge_ctx, const char* text); static void message_dialog_cb(void* ge_ctx, const char* text);
}; };
class XttGeQtWidget : public QDialog { class XttGeQtWidget : public QWidget {
Q_OBJECT Q_OBJECT
public: public:
XttGeQtWidget(XttGeQt* parent_ctx, QWidget* parent) XttGeQtWidget(XttGeQt* parent)
: QDialog(parent), ge(parent_ctx) : QWidget(), ge(parent)
{ {
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment