]> git.sesse.net Git - vlc/commitdiff
Qt4 - Open - Hide the OK/Cancel for everyone ( Windows too )
authorJean-Baptiste Kempf <jb@videolan.org>
Tue, 17 Apr 2007 17:21:13 +0000 (17:21 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 17 Apr 2007 17:21:13 +0000 (17:21 +0000)
modules/gui/qt4/components/open.cpp
modules/gui/qt4/components/open.hpp

index 2450a6370c40d89219f63ddebf3266235498847e..de5705baa8188c7c240603891934ec2b154e97ad 100644 (file)
@@ -69,9 +69,8 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
     ui.gridLayout->addWidget( dialogBox, 0, 0, 1, 3 );
 
     // But hide the two OK/Cancel buttons. Enable them for debug.
-#ifndef WIN32
-    findChild<QDialogButtonBox*>()->hide();
-#endif
+    fileDialogAcceptBox = findChildren<QDialogButtonBox*>()[0];
+    fileDialogAcceptBox->hide();
 
     /* Ugly hacks to get the good Widget */
     //This lineEdit is the normal line in the fileDialog.
index 257ae381abb5a9f4b11c1b559c29d78d7b247bde..9378be6fc069e69fd979b29921e4206c8c1b9f30 100644 (file)
@@ -33,6 +33,7 @@
 #include "ui/open_disk.h"
 #include "ui/open_net.h"
 #include "ui/open_capture.h"
+#include <QDialogButtonBox>
 
 class QLineEdit;
 
@@ -79,6 +80,7 @@ private:
     QStringList browse( QString );
     FileOpenBox *dialogBox;
     QLineEdit *lineFileEdit;
+    QDialogButtonBox *fileDialogAcceptBox;
 public slots:
     virtual void updateMRL();
 private slots: