diff options
author | deva <deva> | 2006-08-16 23:47:08 +0000 |
---|---|---|
committer | deva <deva> | 2006-08-16 23:47:08 +0000 |
commit | e421c3f7e6ed8871bb11c6e7b17ce6ea23a77648 (patch) | |
tree | 41a274bcfeb6bf4fe6e893e9279b974fc950765b /client/messagebox.cc | |
parent | ad5ef06ff97aac051f6d4287ce30239eda3925bd (diff) |
Fjernede miav_config entry.
Replaced the old MiavConfig class with the new Configuration class in all the the appropriate places.
Diffstat (limited to 'client/messagebox.cc')
-rw-r--r-- | client/messagebox.cc | 14 |
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); |