From e421c3f7e6ed8871bb11c6e7b17ce6ea23a77648 Mon Sep 17 00:00:00 2001 From: deva Date: Wed, 16 Aug 2006 23:47:08 +0000 Subject: Fjernede miav_config entry. Replaced the old MiavConfig class with the new Configuration class in all the the appropriate places. --- client/messagebox.cc | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'client/messagebox.cc') 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); -- cgit v1.2.3