]> git.sesse.net Git - vlc/commitdiff
Qt: correctly handle cancelling of sout/convert dialogs. Update copyrights.
authorJean-Baptiste Kempf <jb@videolan.org>
Sat, 14 Mar 2009 15:48:58 +0000 (16:48 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Sat, 14 Mar 2009 15:48:58 +0000 (16:48 +0100)
modules/gui/qt4/components/sout/sout_widgets.cpp
modules/gui/qt4/dialogs/convert.cpp
modules/gui/qt4/dialogs/sout.cpp
modules/gui/qt4/dialogs_provider.cpp

index 457228a8622cf4697d9a08b1e7c12cd98b3a9e5d..9dfb940a8190b5be60e5b440c918f7a03e452651 100644 (file)
@@ -1,10 +1,13 @@
 /*****************************************************************************
  * profile_selector.cpp : A small profile selector and editor
  ****************************************************************************
- * Copyright (C) 2009 the VideoLAN team
+ * Copyright (C) 2007-2009 the VideoLAN team
+ * Copyright (C) 2007 Société des arts technologiques
+ * Copyright (C) 2007 Savoir-faire Linux
  * $Id$
  *
  * Authors: Jean-Baptiste Kempf <jb@videolan.org>
+ *          Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 5b64b4895f810c66e33a68027985bad7976c8b23..5a989ffddb3490b11c1d1f7d2c03db5aa6bffbb5 100644 (file)
@@ -112,7 +112,7 @@ void ConvertDialog::fileBrowse()
 
 void ConvertDialog::cancel()
 {
-    hide();
+    reject();
 }
 
 void ConvertDialog::close()
@@ -131,4 +131,5 @@ void ConvertDialog::close()
             ",dst='" + fileLine->text() + "'}";
 
     msg_Dbg( p_intf, "Transcode MRL: %s", qtu( mrl ) );
+    accept();
 }
index 250dc3cf5e82e2c4d5d916aff9fa86ea65c83b27..f7ec1a3e9d95f148dd7396a39475c00af94bb486 100644 (file)
@@ -1,16 +1,12 @@
 /*****************************************************************************
  * sout.cpp : Stream output dialog ( old-style )
  ****************************************************************************
- * Copyright (C) 2007-2008 the VideoLAN team
- * Copyright (C) 2007 Société des arts technologiques
- * Copyright (C) 2007 Savoir-faire Linux
+ * Copyright (C) 2007-2009 the VideoLAN team
  *
  * $Id$
  *
  * Authors: Clément Stenac <zorglub@videolan.org>
  *          Jean-Baptiste Kempf <jb@videolan.org>
- *          Jean-François Massol <jf.massol -at- gmail.com>
- *          Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index d7aec129df2ee12d79aa2d2cf604fc6f98aac372..4e254be0533a28dccb36c56c3eb032f9ec9894fa 100644 (file)
@@ -574,14 +574,29 @@ void DialogsProvider::streamingDialog( QWidget *parent, QString mrl,
     {
         SoutDialog *s = SoutDialog::getInstance( parent, p_intf, mrl );
         if( s->exec() == QDialog::Accepted )
-            psz_option = qtu( s->getMrl() );
-    }else {
+        {
+            psz_option = strdup( qtu( s->getMrl() ) );
+            delete s;
+        }
+        else
+        {
+            delete s;
+            return;
+        }
+    } else {
         ConvertDialog *s = new ConvertDialog( parent, p_intf, mrl );
         if( s->exec() == QDialog::Accepted )
-            psz_option = qtu( s->getMrl() );
+        {
+            psz_option = strdup( qtu( s->getMrl() ) );
+            delete s;
+        }
+        else
+        {
+            delete s;
+            return;
+        }
     }
 
-
     if( !EMPTY_STR( psz_option ) )
     {