summaryrefslogtreecommitdiff
path: root/client/widgets/window.cc
diff options
context:
space:
mode:
authorsenator <senator>2007-07-26 13:10:25 +0000
committersenator <senator>2007-07-26 13:10:25 +0000
commite1bbdd89f09966a240e8a7b8007dc44895e0febd (patch)
tree0e990d7a9df1d7c2fc53aaee0bc52990a6607b60 /client/widgets/window.cc
parentce667bf4b2f3de7aab677ac7e7f23bc72d3db80f (diff)
added error check for unnamed widgets
Diffstat (limited to 'client/widgets/window.cc')
-rw-r--r--client/widgets/window.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/client/widgets/window.cc b/client/widgets/window.cc
index 95f01a6..217bf21 100644
--- a/client/widgets/window.cc
+++ b/client/widgets/window.cc
@@ -33,7 +33,8 @@ Window::Window(QDomNode node) : QWidget(NULL)
if(elem.hasAttribute("name")) {
widget_name = elem.attribute("name");
} else {
- printf("ERROR!! Widget has no name...\n");
+ printf("XML ERROR!! Unnamed widget of type: %s\n",
+ elem.tagName().toStdString().c_str());
}
if(elem.hasAttribute("width")) {
@@ -44,8 +45,16 @@ Window::Window(QDomNode node) : QWidget(NULL)
setMinimumHeight(elem.attribute("height").toInt());
}
+ if(elem.hasAttribute("fixed")) {
+ if(elem.attribute("fixed") == "true") {
+ setFixedSize(width(), height());
+ }
+ }
+
if(elem.hasAttribute("caption")) {
setWindowTitle(elem.attribute("caption"));
+ } else {
+ setWindowTitle(elem.attribute(""));
}
}