/* dialogBox->setFileMode( QFileDialog::ExistingFiles );*/
dialogBox->setAcceptMode( QFileDialog::AcceptOpen );
+ /* retrieve last known path used in file browsing */
+ char *psz_filepath = config_GetPsz( p_intf, "qt-filedialog-path" );
+ if( psz_filepath )
+ {
+ dialogBox->setDirectory( QString::fromUtf8(psz_filepath) );
+ delete psz_filepath;
+ }
+
/* We don't want to see a grip in the middle of the window, do we? */
dialogBox->setSizeGripEnabled( false );
dialogBox->setToolTip( qtr( "Select one or multiple files, or a folder" ));
int size = ui.sizeSubComboBox->itemData( ui.sizeSubComboBox->currentIndex() ).toInt();
mrl.append( " :freetype-rel-fontsize=" + QString().setNum( size ) );
}
+
+ const char *psz_filepath = config_GetPsz( p_intf, "qt-filedialog-path" );
+ if( (NULL == psz_filepath)
+ || strcmp(psz_filepath,dialogBox->directory().absolutePath().toUtf8()) )
+ {
+ /* set dialog box current directory as last known path */
+ config_PutPsz( p_intf, "qt-filedialog-path",
+ dialogBox->directory().absolutePath().toUtf8() );
+ }
+ delete psz_filepath;
+
emit mrlUpdated( mrl );
emit methodChanged( "file-caching" );
}
#define MINIMIZED_LONGTEXT N_("When you launch VLC with that option" \
"VLC will start just with an icon in" \
"your taskbar")
+
+#define FILEDIALOG_PATH_TEXT N_("path to use in file dialog")
+#define FILEDIALOG_PATH_LONGTEXT N_("path to use in file dialog")
+
vlc_module_begin();
set_shortname( (char *)"Qt" );
set_description( (char*)_("Qt interface") );
SYSTRAY_LONGTEXT, VLC_FALSE);
add_bool( "qt-start-mininimized", VLC_FALSE, NULL, MINIMIZED_TEXT,
MINIMIZED_LONGTEXT, VLC_TRUE);
+ add_string( "qt-filedialog-path", NULL, NULL, FILEDIALOG_PATH_TEXT,
+ FILEDIALOG_PATH_LONGTEXT, VLC_TRUE);
+ change_autosave();
+ change_internal();
set_callbacks( OpenDialogs, Close );
vlc_module_end();