Qt4 - Codec Information direct access from menu.
authorJean-Baptiste Kempf <jb@videolan.org>
Sat, 24 Mar 2007 22:29:58 +0000 (22:29 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Sat, 24 Mar 2007 22:29:58 +0000 (22:29 +0000)
include/vlc_intf_strings.h
modules/gui/qt4/dialogs/mediainfo.cpp
modules/gui/qt4/dialogs/mediainfo.hpp
modules/gui/qt4/dialogs/open.cpp
modules/gui/qt4/dialogs_provider.cpp
modules/gui/qt4/dialogs_provider.hpp
modules/gui/qt4/menus.cpp

index 7236864..c113f72 100644 (file)
@@ -39,6 +39,7 @@
 /******************* Menus *****************/
 
 #define I_MENU_INFO  N_("Information...")
+#define I_MENU_CODECINFO  N_("Codec Information...")
 #define I_MENU_MSG   N_("Messages...")
 #define I_MENU_EXT   N_("Extended settings...")
 
index a5fcf0c..1492ed3 100644 (file)
@@ -69,6 +69,12 @@ MediaInfoDialog::~MediaInfoDialog()
     writeSettings( "mediainfo" );
 }
 
+void MediaInfoDialog::showTab(int i_tab=0)
+{
+    this->show();
+    IT->setCurrentIndex(i_tab);
+}
+
 static int ItemChanged( vlc_object_t *p_this, const char *psz_var,
                         vlc_value_t oldval, vlc_value_t newval, void *param )
 {
index b04fb04..0884ff4 100644 (file)
@@ -48,6 +48,8 @@ public:
         instance= NULL;
     }
     virtual ~MediaInfoDialog();
+
+    void showTab( int );
     bool need_update;
     void setInput( input_item_t * );
 private:
index 4d0e433..0d519a7 100644 (file)
@@ -94,7 +94,6 @@ OpenDialog::~OpenDialog()
 
 void OpenDialog::showTab(int i_tab=0)
 {
-    printf ( "%i" , i_tab);
     this->show();
     ui.Tab->setCurrentIndex(i_tab);
 }
index 84984e4..85b85b5 100644 (file)
@@ -149,6 +149,11 @@ void DialogsProvider::mediaInfoDialog()
     MediaInfoDialog::getInstance( p_intf )->toggleVisible();
 }
 
+void DialogsProvider::mediaCodecDialog()
+{
+    MediaInfoDialog::getInstance( p_intf )->showTab( 1 );
+}
+
 void DialogsProvider::bookmarksDialog()
 {
 }
@@ -179,7 +184,7 @@ void DialogsProvider::openCaptureDialog()
 }
 void DialogsProvider::openDialog( int i_tab )
 {
-    OpenDialog::getInstance( p_intf->p_sys->p_mi  , p_intf )->showTab( i_tab );
+    OpenDialog::getInstance( p_intf->p_sys->p_mi , p_intf )->showTab( i_tab );
 }
 
 void DialogsProvider::PLAppendDialog()
@@ -189,7 +194,6 @@ void DialogsProvider::MLAppendDialog()
 {
 }
 
-
 /**** Simple open ****/
 
 QStringList DialogsProvider::showSimpleOpen(QString help, bool all,
index 6afbeff..8f6d2b8 100644 (file)
@@ -104,6 +104,7 @@ public slots:
     void playlistDialog();
     void bookmarksDialog();
     void mediaInfoDialog();
+    void mediaCodecDialog();
     void prefsDialog();
     void extendedDialog();
     void messagesDialog();
index 132e74a..a2ca760 100644 (file)
@@ -181,6 +181,7 @@ QMenu *QVLCMenu::ToolsMenu( intf_thread_t *p_intf, MainInterface *mi,
     }
     DP_SADD( qtr(I_MENU_MSG), "", "", messagesDialog() );
     DP_SADD( qtr(I_MENU_INFO) , "", "", mediaInfoDialog() );
+    DP_SADD( qtr(I_MENU_CODECINFO) , "", "", mediaCodecDialog() );
     DP_SADD( qtr(I_MENU_EXT), "","",extendedDialog() );
     if( mi )
     {