]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt2/QGraphicsDialog.C
Get rid of the static_casts.
[lyx.git] / src / frontends / qt2 / QGraphicsDialog.C
index 33c6e8b42edfec7445b6278025debc1b2f43246c..99fee73aad16b608f62b32cfac915fe745b65da9 100644 (file)
 
 #include <config.h>
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
 
 #include "ControlGraphics.h"
 #include "debug.h"
-#include "gettext.h"
+#include "qt_helpers.h"
 #include "LString.h"
 
 #include <qwidget.h>
@@ -66,7 +63,7 @@ void QGraphicsDialog::change_adaptor()
 void QGraphicsDialog::change_bb()
 {
        form_->controller().bbChanged = true;
-       lyxerr[Debug::GRAPHICS] 
+       lyxerr[Debug::GRAPHICS]
                << "[controller().bb_Changed set to true]\n";
        form_->changed();
 }
@@ -90,14 +87,10 @@ void QGraphicsDialog::closeEvent(QCloseEvent * e)
 
 void QGraphicsDialog::browse_clicked()
 {
-       QString file = QFileDialog::getOpenFileName(
-               QString::null, _("Files (*)"),
-               this, 0, _("Select a graphic file"));
-       if (!file.isNull()) {
-               string const name = file.latin1();
-               filename->setText(name.c_str());
-               form_->changed();
-       }
+       string const str = 
+               form_->controller().Browse(fromqstr(filename->text()));
+       filename->setText(toqstr(str));
+       form_->changed();
 }