]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/dialogs_provider.cpp
Qt4 - Copyright update and CRs
[vlc] / modules / gui / qt4 / dialogs_provider.cpp
index da304ad4ea6d03e4fc95e97cf8b70ba152f80d51..c8d1865af79745ff3486fe79688308aef085e319 100644 (file)
@@ -1,10 +1,11 @@
 /*****************************************************************************
  * main_inteface.cpp : Main interface
  *****************************************************************************
- * Copyright (C) 2006 the VideoLAN team
+ * Copyright (C) 2006-2007 the VideoLAN team
  * $Id$
  *
  * Authors: ClĂ©ment Stenac <zorglub@videolan.org>
+ *          Jean-Baptiste Kempf <jb@videolan.org>
  *
  * 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
@@ -103,11 +104,15 @@ void DialogsProvider::customEvent( QEvent *event )
                bookmarksDialog(); break;
             case INTF_DIALOG_EXTENDED:
                extendedDialog(); break;
+               /* We might want to make it better with custom functions */
             case INTF_DIALOG_POPUPMENU:
+               QVLCMenu::PopupMenu( p_intf, (de->i_arg != 0) ); break;
             case INTF_DIALOG_AUDIOPOPUPMENU:
+               QVLCMenu::AudioPopupMenu( p_intf ); break;
             case INTF_DIALOG_VIDEOPOPUPMENU:
+               QVLCMenu::VideoPopupMenu( p_intf ); break;
             case INTF_DIALOG_MISCPOPUPMENU:
-               popupMenu( de->i_dialog ); break;
+               QVLCMenu::MiscPopupMenu( p_intf ); break;
             case INTF_DIALOG_INTERACTION:
                doInteraction( de->p_arg ); break;
             case INTF_DIALOG_VLM:
@@ -177,23 +182,23 @@ void DialogsProvider::bookmarksDialog()
 
 void DialogsProvider::openDialog()
 {
-    openDialog( 0 );
+    openDialog( OPEN_FILE_TAB );
 }
 void DialogsProvider::openFileDialog()
 {
-    openDialog( 0 );
+    openDialog( OPEN_FILE_TAB );
 }
 void DialogsProvider::openDiscDialog()
 {
-    openDialog( 1 );
+    openDialog( OPEN_DISC_TAB );
 }
 void DialogsProvider::openNetDialog()
 {
-    openDialog( 2 );
+    openDialog( OPEN_NETWORK_TAB );
 }
 void DialogsProvider::openCaptureDialog()
 {
-    openDialog( 3 );
+    openDialog( OPEN_CAPTURE_TAB );
 }
 void DialogsProvider::openDialog( int i_tab )
 {
@@ -346,9 +351,10 @@ void DialogsProvider::MLAppendDir()
  * Sout emulation
  ****************************************************************************/
 
-void DialogsProvider::streamingDialog( QString mrl)
+void DialogsProvider::streamingDialog( QString mrl, bool b_transcode_only )
 {
-    SoutDialog *s = new SoutDialog( p_intf->p_sys->p_mi, p_intf );
+    SoutDialog *s = new SoutDialog( p_intf->p_sys->p_mi, p_intf,
+                                                    b_transcode_only );
     if( s->exec() == QDialog::Accepted )
     {
         msg_Err(p_intf, "mrl %s\n", qta(s->mrl));
@@ -366,7 +372,14 @@ void DialogsProvider::streamingDialog( QString mrl)
 
 void DialogsProvider::openThenStreamingDialogs()
 {
-    OpenDialog::getInstance( p_intf->p_sys->p_mi , p_intf, true )->showTab( 0 );
+    OpenDialog::getInstance( p_intf->p_sys->p_mi , p_intf, OPEN_AND_STREAM )
+                                ->showTab( 0 );
+}
+
+void DialogsProvider::openThenTranscodingDialogs()
+{
+    OpenDialog::getInstance( p_intf->p_sys->p_mi , p_intf, OPEN_AND_SAVE )
+                                ->showTab( 0 );
 }
 /*
 void DialogsProvider::streamingDialog()
@@ -457,7 +470,3 @@ void DialogsProvider::switchToSkins()
 {
     var_SetString( p_intf, "intf-switch", "skins2" );
 }
-
-void DialogsProvider::popupMenu( int i_dialog )
-{
-}