summaryrefslogtreecommitdiff
path: root/client/messagebox.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/messagebox.cc')
-rw-r--r--client/messagebox.cc14
1 files changed, 11 insertions, 3 deletions
diff --git a/client/messagebox.cc b/client/messagebox.cc
index 80f902d..b2dcb87 100644
--- a/client/messagebox.cc
+++ b/client/messagebox.cc
@@ -25,7 +25,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#include "messagebox.h"
-#include "miav_config.h"
+
+#include "configuration.h"
#define INCH_IN_CM 2
#define BUTTON_HEIGHT 1
@@ -43,9 +44,16 @@ MessageBox::MessageBox(QWidget* parent,
msg_icon icon)
: QDialog(parent)
{
- int resolution_w = MIaV::config->readInt("pixel_width");
+ int resolution_w;
+ if(MIaV::config->get("pixel_width", &resolution_w))
+ resolution_w = 1024; // fallback!
+
//int resolution_h = config->readInt("pixel_height");
- unit = ((float)resolution_w / MIaV::config->readFloat("screensize")) / INCH_IN_CM;
+ double screensize;
+ if(MIaV::config->get("screensize", &screensize))
+ screensize = 17.0; // fallback!
+
+ unit = ((float)resolution_w / screensize) / INCH_IN_CM;
setModal(true);
setWindowTitle(name);