[vlc-devel] commit: Qt: playlist menu strings and icons (Jakob Leben )

git version control git at videolan.org
Sun Feb 14 06:43:06 CET 2010


vlc | branch: master | Jakob Leben <jleben at videolan.org> | Sun Feb 14 06:42:21 2010 +0100| [367c7701ec182923401425a43f8c0457bfb93922] | committer: Jakob Leben 

Qt: playlist menu strings and icons

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=367c7701ec182923401425a43f8c0457bfb93922
---

 include/vlc_intf_strings.h                         |   22 +++++++-------
 .../gui/qt4/components/playlist/playlist_model.cpp |   30 +++++++++++--------
 2 files changed, 28 insertions(+), 24 deletions(-)

diff --git a/include/vlc_intf_strings.h b/include/vlc_intf_strings.h
index e4cae97..7609f95 100644
--- a/include/vlc_intf_strings.h
+++ b/include/vlc_intf_strings.h
@@ -54,26 +54,26 @@
 #define I_POP_DEL N_("Delete")
 #define I_POP_INFO N_("Information...")
 #define I_POP_SORT N_("Sort")
-#define I_POP_ADD N_("Add Node")
+#define I_POP_NEWFOLDER N_("Create Folder...")
 #define I_POP_STREAM N_("Stream...")
 #define I_POP_SAVE N_("Save...")
-#define I_POP_EXPLORE N_("Open Folder...")
+#define I_POP_EXPLORE N_("Show Containing Folder...")
 
 /*************** Playlist *************/
 
-#define I_PL_LOOP       N_("Repeat all")
-#define I_PL_REPEAT     N_("Repeat one")
-#define I_PL_NOREPEAT   N_("No repeat")
+#define I_PL_LOOP       N_("Repeat All")
+#define I_PL_REPEAT     N_("Repeat One")
+#define I_PL_NOREPEAT   N_("No Repeat")
 
 #define I_PL_RANDOM     N_("Random")
-#define I_PL_NORANDOM   N_("Random off")
+#define I_PL_NORANDOM   N_("Random Off")
 
-#define I_PL_ADDPL      N_("Add to playlist")
-#define I_PL_ADDML      N_("Add to media library")
+#define I_PL_ADDPL      N_("Add to Playlist")
+#define I_PL_ADDML      N_("Add to Media Library")
 
-#define I_PL_ADDF       N_("Add file...")
-#define I_PL_ADVADD     N_("Advanced open...")
-#define I_PL_ADDDIR     N_("Add directory...")
+#define I_PL_ADDF       N_("Add File...")
+#define I_PL_ADVADD     N_("Advanced Open...")
+#define I_PL_ADDDIR     N_("Add Folder...")
 
 #define I_PL_SAVE       N_("Save Playlist to &File...")
 #define I_PL_LOAD       N_("Open Play&list...")
diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp
index 7952b66..2959562 100644
--- a/modules/gui/qt4/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt4/components/playlist/playlist_model.cpp
@@ -896,31 +896,35 @@ bool PLModel::popup( const QModelIndex & index, const QPoint &point, const QMode
     QMenu menu;
     if( i_popup_item > -1 )
     {
-        menu.addAction( qtr(I_POP_PLAY), this, SLOT( popupPlay() ) );
-        menu.addAction( qtr(I_POP_DEL), this, SLOT( popupDel() ) );
+        menu.addAction( QIcon( ":/menu/play" ), qtr(I_POP_PLAY), this, SLOT( popupPlay() ) );
+        menu.addAction( QIcon( ":/buttons/playlist/playlist_remove" ),
+                        qtr(I_POP_DEL), this, SLOT( popupDel() ) );
         menu.addSeparator();
-        menu.addAction( qtr(I_POP_STREAM), this, SLOT( popupStream() ) );
+        menu.addAction( QIcon( ":/menu/stream" ),
+                        qtr(I_POP_STREAM), this, SLOT( popupStream() ) );
         menu.addAction( qtr(I_POP_SAVE), this, SLOT( popupSave() ) );
         menu.addSeparator();
-        menu.addAction( qtr(I_POP_INFO), this, SLOT( popupInfo() ) );
-        menu.addAction( qtr( I_POP_EXPLORE ), this, SLOT( popupExplore() ) );
+        menu.addAction( QIcon( ":/menu/info" ), qtr(I_POP_INFO), this, SLOT( popupInfo() ) );
+        menu.addAction( QIcon( ":/type/folder-grey" ),
+                        qtr( I_POP_EXPLORE ), this, SLOT( popupExplore() ) );
     }
     if( canEdit() )
     {
+        QIcon addIcon( ":/buttons/playlist/playlist_add" );
         menu.addSeparator();
-        if( tree ) menu.addAction( qtr(I_POP_ADD) + QString("..."), this, SLOT( popupAddNode() ) );
+        if( tree ) menu.addAction( addIcon, qtr(I_POP_NEWFOLDER), this, SLOT( popupAddNode() ) );
         if( rootItem->i_id == THEPL->p_playing->i_id )
         {
-            menu.addAction( qtr(I_PL_ADDF), THEDP, SLOT( simplePLAppendDialog()) );
-            menu.addAction( qtr(I_PL_ADDDIR), THEDP, SLOT( PLAppendDir()) );
-            menu.addAction( qtr(I_OP_ADVOP), THEDP, SLOT( PLAppendDialog()) );
+            menu.addAction( addIcon, qtr(I_PL_ADDF), THEDP, SLOT( simplePLAppendDialog()) );
+            menu.addAction( addIcon, qtr(I_PL_ADDDIR), THEDP, SLOT( PLAppendDir()) );
+            menu.addAction( addIcon, qtr(I_OP_ADVOP), THEDP, SLOT( PLAppendDialog()) );
         }
         else if( THEPL->p_media_library &&
                     rootItem->i_id == THEPL->p_media_library->i_id )
         {
-            menu.addAction( qtr(I_PL_ADDF), THEDP, SLOT( simpleMLAppendDialog()) );
-            menu.addAction( qtr(I_PL_ADDDIR), THEDP, SLOT( MLAppendDir() ) );
-            menu.addAction( qtr(I_OP_ADVOP), THEDP, SLOT( MLAppendDialog() ) );
+            menu.addAction( addIcon, qtr(I_PL_ADDF), THEDP, SLOT( simpleMLAppendDialog()) );
+            menu.addAction( addIcon, qtr(I_PL_ADDDIR), THEDP, SLOT( MLAppendDir() ) );
+            menu.addAction( addIcon, qtr(I_OP_ADVOP), THEDP, SLOT( MLAppendDialog() ) );
         }
     }
     if( i_popup_item > -1 )
@@ -1030,7 +1034,7 @@ void PLModel::popupAddNode()
 {
     bool ok;
     QString name = QInputDialog::getText( PlaylistDialog::getInstance( p_intf ),
-        qtr( I_POP_ADD ), qtr( "Enter name for new folder:" ),
+        qtr( "Create Folder" ), qtr( "Enter name for new folder:" ),
         QLineEdit::Normal, QString(), &ok);
     if( !ok || name.isEmpty() ) return;
     PL_LOCK;




More information about the vlc-devel mailing list