]> git.sesse.net Git - vlc/commitdiff
Merge branch 'master' of git@git.videolan.org:vlc
authorJean-Baptiste Kempf <jb@videolan.org>
Tue, 24 Feb 2009 10:15:50 +0000 (11:15 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 24 Feb 2009 10:15:50 +0000 (11:15 +0100)
modules/gui/qt4/Modules.am
modules/gui/qt4/components/open_panels.cpp
modules/gui/qt4/components/preferences_widgets.cpp
modules/gui/qt4/pixmaps/lock.png [new file with mode: 0644]
modules/gui/qt4/vlc.qrc

index 783563058b5c5af1174bb7e9b70451230d4b5af7..ba008fe0edd1bbe1ea1efaa8f05acccc96571f1b 100644 (file)
@@ -166,7 +166,8 @@ DEPS_res = \
        pixmaps/types/type_node.png \
        pixmaps/types/type_playlist.png \
        pixmaps/types/type_unknown.xpm \
-       pixmaps/update.png
+       pixmaps/update.png \
+       pixmaps/lock.png
 
 BUILT_SOURCES += $(nodist_SOURCES_qt4)
 
index 2b6f73ed5174da48b8cd3a903b87496953aa83c2..f73ac4c19904356062b047d2232aa121e872af5f 100644 (file)
@@ -210,6 +210,7 @@ void FileOpenPanel::accept()
 {
     //FIXME
  //   p_intf->p_sys->psz_filepath = qtu( dialogBox->directory().absolutePath() );
+    ui.fileListWidg->clear();
 }
 
 /* Function called by Open Dialog when clicked on cancel */
index 036ecc9ddbb4fb1219a41a93beb5a6c8e7c1297b..6c497629e9186a4a562ea9d0ed26850acc3e52c3 100644 (file)
@@ -1143,9 +1143,11 @@ KeySelectorControl::KeySelectorControl( vlc_object_t *_p_this,
     QLineEdit *actionSearch = new QLineEdit;*/
 
     table = new QTreeWidget;
-    table->setColumnCount(2);
+    table->setColumnCount(3);
     table->headerItem()->setText( 0, qtr( "Action" ) );
     table->headerItem()->setText( 1, qtr( "Shortcut" ) );
+    table->headerItem()->setText( 2, qtr( "Global" ) );
+    table->setAlternatingRowColors( true );
 
     shortcutValue = new KeyShortcutEdit;
     shortcutValue->setReadOnly(true);
@@ -1177,8 +1179,6 @@ void KeySelectorControl::finish()
         label->setToolTip( formatTooltip( qtr( p_item->psz_longtext ) ) );
 
     /* Fill the table */
-    table->setColumnCount( 2 );
-    table->setAlternatingRowColors( true );
 
     /* Get the main Module */
     module_t *p_main = module_get_main();
@@ -1197,6 +1197,7 @@ void KeySelectorControl::finish()
         /* If we are a key option not empty */
         if( p_item->i_type & CONFIG_ITEM && p_item->psz_name
             && strstr( p_item->psz_name , "key-" )
+            && !strstr( p_item->psz_name , "global-key" )
             && !EMPTY_STR( p_item->psz_text ) )
         {
             /*
@@ -1213,6 +1214,21 @@ void KeySelectorControl::finish()
             treeItem->setText( 1, VLCKeyToString( p_item->value.i ) );
             treeItem->setData( 1, Qt::UserRole, QVariant( p_item->value.i ) );
             table->addTopLevelItem( treeItem );
+            continue;
+        }
+
+        if( p_item->i_type & CONFIG_ITEM && p_item->psz_name
+                && strstr( p_item->psz_name , "global-key" )
+                && !EMPTY_STR( p_item->psz_text ) )
+        {
+            QList<QTreeWidgetItem *> list =
+                table->findItems( qtr( p_item->psz_text ), Qt::MatchExactly );
+            if( list.count() > 1 )
+            {
+                list[0]->setText( 2, VLCKeyToString( p_item->value.i ) );
+                list[0]->setData( 2, Qt::UserRole,
+                                  QVariant( p_item->value.i ) );
+            }
         }
     }
     module_config_free (p_config);
diff --git a/modules/gui/qt4/pixmaps/lock.png b/modules/gui/qt4/pixmaps/lock.png
new file mode 100644 (file)
index 0000000..9b9bbc8
Binary files /dev/null and b/modules/gui/qt4/pixmaps/lock.png differ
index 9a3c2e3cb23f817f3f5decef117c983b6ea11d6a..0e5aef322a05d3d8ce4055b192ff6fef1744639c 100644 (file)
@@ -90,5 +90,6 @@
   <file alias="space">pixmaps/space.png</file>
   <file>pixmaps/go-next.png</file>
   <file alias="new.png">pixmaps/profile_new.png</file>
+  <file alias="lock">pixmaps/lock.png</file>
  </qresource>
 </RCC>