]> git.sesse.net Git - vlc/commitdiff
Qt4 : Various changes especially about StreamInfo => MediaInfo
authorJean-Baptiste Kempf <jb@videolan.org>
Thu, 23 Nov 2006 11:59:39 +0000 (11:59 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Thu, 23 Nov 2006 11:59:39 +0000 (11:59 +0000)
modules/gui/qt4/dialogs/streaminfo.cpp
modules/gui/qt4/dialogs/streaminfo.hpp
modules/gui/qt4/dialogs_provider.cpp
modules/gui/qt4/dialogs_provider.hpp
modules/gui/qt4/menus.cpp

index 4b2979fc65f9c417e7571bdcba15d4fa9d4ee8a3..8e5cdca3c34391b424cc0fd6ddb107aa4752297d 100644 (file)
@@ -5,6 +5,7 @@
  * $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
 
 static int ItemChanged( vlc_object_t *p_this, const char *psz_var,
                         vlc_value_t oldval, vlc_value_t newval, void *param );
-StreamInfoDialog *StreamInfoDialog::instance = NULL;
+MediaInfoDialog *MediaInfoDialog::instance = NULL;
 
-StreamInfoDialog::StreamInfoDialog( intf_thread_t *_p_intf ) :QVLCFrame( _p_intf )
+MediaInfoDialog::MediaInfoDialog( intf_thread_t *_p_intf ) :QVLCFrame( _p_intf )
 {
     i_runs = 0;
-    setWindowTitle( qtr( "Stream information" ) );
-    QGridLayout *layout = new QGridLayout(this);
+    p_input = NULL;
 
+    setWindowTitle( qtr( "Media information" ) );
+
+    QGridLayout *layout = new QGridLayout(this);
     IT = new InfoTab( this, p_intf, true ) ;
     QPushButton *closeButton = new QPushButton(qtr("&Close"));
+
     layout->addWidget(IT,0,0,1,3);
     layout->addWidget(closeButton,1,2);
 
     BUTTONACT( closeButton, close() );
     ON_TIMEOUT( update() );
-    p_input = NULL;
 
     var_AddCallback( THEPL, "item-change", ItemChanged, this );
-
     readSettings( "StreamInfo" , QSize( 500, 450 ) );
 }
 
-StreamInfoDialog::~StreamInfoDialog()
+MediaInfoDialog::~MediaInfoDialog()
 {
     var_DelCallback( THEPL, "item-change", ItemChanged, this );
     writeSettings( "StreamInfo" );
@@ -63,12 +65,12 @@ StreamInfoDialog::~StreamInfoDialog()
 static int ItemChanged( vlc_object_t *p_this, const char *psz_var,
                         vlc_value_t oldval, vlc_value_t newval, void *param )
 {
-    StreamInfoDialog *p_d = (StreamInfoDialog *)param;
+    MediaInfoDialog *p_d = (MediaInfoDialog *)param;
     p_d->need_update = VLC_TRUE;
     return VLC_SUCCESS;
 }
 
-void StreamInfoDialog::update()
+void MediaInfoDialog::update()
 {
     // Timer runs at 150 ms, dont' update more than 2 times per second
     i_runs++;
@@ -91,7 +93,7 @@ void StreamInfoDialog::update()
     vlc_object_release( p_input );
 }
 
-void StreamInfoDialog::close()
+void MediaInfoDialog::close()
 {
     this->toggleVisible();
 }
index 60872fa9a4bf8a35915f53abf9a43a50e4620fbb..e31dc7401aee3560b33b95b089e52210381c31c0 100644 (file)
@@ -5,6 +5,7 @@
  * $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
@@ -21,8 +22,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  ******************************************************************************/
 
-#ifndef _STREAMINFO_DIALOG_H_
-#define _STREAMINFO_DIALOG_H_
+#ifndef _MEDIAINFO_DIALOG_H_
+#define _MEDIAINFO_DIALOG_H_
 
 #include "util/qvlcframe.hpp"
 #include <QTabWidget>
 
 class InfoTab;
 
-class StreamInfoDialog : public QVLCFrame
+class MediaInfoDialog : public QVLCFrame
 {
     Q_OBJECT;
 public:
-    static StreamInfoDialog * getInstance( intf_thread_t *p_intf )
+    static MediaInfoDialog * getInstance( intf_thread_t *p_intf )
     {
         if( !instance)
-            instance = new StreamInfoDialog( p_intf);
+            instance = new MediaInfoDialog( p_intf);
         return instance;
     }
     static void killInstance()
@@ -45,13 +46,13 @@ public:
         if( instance ) delete instance;
         instance= NULL;
     }
-    virtual ~StreamInfoDialog();
+    virtual ~MediaInfoDialog();
     bool need_update;
 private:
-    StreamInfoDialog( intf_thread_t * );
+    MediaInfoDialog( intf_thread_t * );
     input_thread_t *p_input;
     InfoTab *IT;
-    static StreamInfoDialog *instance;
+    static MediaInfoDialog *instance;
     int i_runs;
 public slots:
     void update();
index 6cda3b870ccdaaeef1fa177619cbf6a14478797b..cc7dd6a60c824e6b6db2fa82c7353e82e6b64b7c 100644 (file)
@@ -61,7 +61,7 @@ DialogsProvider::DialogsProvider( intf_thread_t *_p_intf ) :
 DialogsProvider::~DialogsProvider()
 {
     PlaylistDialog::killInstance();
-    StreamInfoDialog::killInstance();
+    MediaInfoDialog::killInstance();
 }
 
 void DialogsProvider::customEvent( QEvent *event )
@@ -88,7 +88,7 @@ void DialogsProvider::customEvent( QEvent *event )
             case INTF_DIALOG_MISCPOPUPMENU:
                popupMenu( de->i_dialog ); break;
             case INTF_DIALOG_FILEINFO:
-               streaminfoDialog(); break;
+               MediaInfoDialog(); break;
             case INTF_DIALOG_INTERACTION:
                doInteraction( de->p_arg ); break;
             case INTF_DIALOG_VLM:
@@ -159,9 +159,9 @@ void DialogsProvider::quit()
     QApplication::quit();
 }
 
-void DialogsProvider::streaminfoDialog()
+void DialogsProvider::MediaInfoDialog()
 {
-    StreamInfoDialog::getInstance( p_intf )->toggleVisible();
+    MediaInfoDialog::getInstance( p_intf )->toggleVisible();
 }
 
 void DialogsProvider::streamingDialog()
index 4ef318bca5c4ded010b8d1ac1d95b4d6710dec32..912251ecb1b4021fff1491244429d78261cf5387 100644 (file)
@@ -74,7 +74,7 @@ private:
 public slots:
     void playlistDialog();
     void bookmarksDialog();
-    void streaminfoDialog();
+    void MediaInfoDialog();
     void prefsDialog();
     void extendedDialog();
     void messagesDialog();
index 4d8962d60961a58d7c07234691fed45957995204..50ce7c2bd6f1824d6cf39efe68f085b3afa604b5 100644 (file)
@@ -176,7 +176,7 @@ QMenu *QVLCMenu::ToolsMenu( intf_thread_t *p_intf, MainInterface *mi,
         menu->addSeparator();
     }
     DP_SADD( qtr("Messages" ), "", "", messagesDialog() );
-    DP_SADD( qtr("Information") , "", "", streaminfoDialog() );
+    DP_SADD( qtr("Information") , "", "", MediaInfoDialog() );
     DP_SADD( qtr("Bookmarks"), "", "", bookmarksDialog() );
     DP_SADD( qtr("Extended settings"), "","",extendedDialog() );
     if( mi )