Changeset 27eb534266dc5c7eb177f17c263dae59171d964d

Show
Ignore:
Timestamp:
25/08/08 05:57:14 (3 months ago)
Author:
Jean-Baptiste Kempf <jb@videolan.org>
git-committer:
Jean-Baptiste Kempf <jb@videolan.org> 1219636634 -0700
git-parent:

[83dbe964fba007a79265dde6aaaee673c49fac5a]

git-author:
Jean-Baptiste Kempf <jb@videolan.org> 1219634811 -0700
Message:

Correctly save the column size from the playlist.

Fix bug reported on IRC and on Forum.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/gui/qt4/components/playlist/playlist.cpp

    r4739246 r27eb534  
    141141 
    142142PlaylistWidget::~PlaylistWidget() 
    143 {} 
    144  
    145 void PlaylistWidget::savingSettings() 
    146143{ 
     144    getSettings()->beginGroup("playlistdialog"); 
    147145    getSettings()->setValue( "splitterSizes", saveState() ); 
     146    getSettings()->endGroup(); 
    148147} 
    149148 
  • modules/gui/qt4/components/playlist/playlist.hpp

    r4739246 r27eb534  
    4949    virtual ~PlaylistWidget(); 
    5050    QSize sizeHint() const; 
    51     void savingSettings(); 
    5251private: 
    5352    PLSelector *selector; 
  • modules/gui/qt4/components/playlist/standardpanel.cpp

    r6eecd1a r27eb534  
    7575    view->setAutoScroll( true ); 
    7676 
    77     /* Configure the size of the header */ 
    78     view->header()->resizeSection( 0, 200 ); 
    79     view->header()->resizeSection( 1, 80 ); 
    80     view->header()->setSortIndicatorShown( true ); 
    81     view->header()->setClickable( true ); 
    82     view->header()->setContextMenuPolicy( Qt::CustomContextMenu ); 
     77#if HAS_QT43 
     78    if( getSettings()->contains( "headerState" ) ) 
     79    { 
     80        view->header()->restoreState( getSettings()->value( "headerState" ).toByteArray() ); 
     81        msg_Dbg( p_intf, "exists" ); 
     82    } 
     83    else 
     84#endif 
     85    { 
     86        /* Configure the size of the header */ 
     87        view->header()->resizeSection( 0, 200 ); 
     88        view->header()->resizeSection( 1, 80 ); 
     89        view->header()->setSortIndicatorShown( true ); 
     90        view->header()->setClickable( true ); 
     91        view->header()->setContextMenuPolicy( Qt::CustomContextMenu ); 
     92    } 
    8393 
    8494    /* Connections for the TreeView */ 
     
    351361 
    352362StandardPLPanel::~StandardPLPanel() 
    353 {} 
     363
     364#if HAS_QT43 
     365    getSettings()->beginGroup("playlistdialog"); 
     366    getSettings()->setValue( "headerState", view->header()->saveState() ); 
     367    getSettings()->endGroup(); 
     368#endif 
     369
     370 
     371 
  • modules/gui/qt4/dialogs/playlist.cpp

    r4739246 r27eb534  
    6464{ 
    6565    getSettings()->beginGroup("playlistdialog"); 
    66  
    6766    writeSettings( getSettings() ); 
    68     playlistWidget->savingSettings(); 
    69  
    7067    getSettings()->endGroup(); 
    7168}