* Copyright (C) 2006-2007 the VideoLAN team
* Copyright (C) 2007 Société des arts technologiques
* Copyright (C) 2007 Savoir-faire Linux
+ *
* $Id$
*
* Authors: Clément Stenac <zorglub@videolan.org>
{
psz_filepath = p_intf->p_libvlc->psz_homedir;
}
+
// Make this QFileDialog a child of tempWidget from the ui.
dialogBox = new FileOpenBox( ui.tempWidget, NULL,
qfu( psz_filepath ), fileTypes );
mrl.append( " :freetype-rel-fontsize=" + QString().setNum( size ) );
}
+ emit mrlUpdated( mrl );
+ emit methodChanged( "file-caching" );
+}
+
+
+/* Function called by Open Dialog when clicke on Play/Enqueue */
+void FileOpenPanel::accept()
+{
+ //FIXME set the completer
const char *psz_filepath = config_GetPsz( p_intf, "qt-filedialog-path" );
if( ( NULL == psz_filepath )
|| strcmp( psz_filepath, qtu( dialogBox->directory().absolutePath() )) )
}
delete psz_filepath;
- emit mrlUpdated( mrl );
- emit methodChanged( "file-caching" );
-}
-
-
-/* Function called by Open Dialog when clicke on Play/Enqueue */
-void FileOpenPanel::accept()
-{
- //FIXME set the completer
}
void FileOpenBox::accept()
{
ui.setupUi( this );
+ char *psz_discpath = config_GetPsz( p_intf, "qt-discdialog-path" );
+
#if WIN32 /* Disc drives probing for Windows */
char szDrives[512];
szDrives[0] = '\0';
}
SetErrorMode(oldMode);
}
+
+ int index = ui.deviceCombo->findText( qfu( psz_discpath ) )
+ if( index != -1 ) ui.deviceCombo->setCurrentIndex( index );
+
#endif /* Disc Probing under Windows */
+ ui.deviceCombo->setEditText( qfu( psz_discpath ) );
+
+ delete psz_discpath;
+
/* CONNECTs */
BUTTONACT( ui.dvdRadioButton, updateButtons() );
BUTTONACT( ui.vcdRadioButton, updateButtons() );
updateMRL();
}
+void DiscOpenPanel::accept()
+{
+ /* set dialog box current directory as last known path */
+ config_PutPsz( p_intf, "qt-discdialog-path",
+ qtu( ui.deviceCombo->currentText() ) );
+}
+
/**************************************************************************
* Open Network streams and URL pages *
**************************************************************************/
* $Id$
*
* Authors: Clément Stenac <zorglub@videolan.org>
+ * Jean-Baptiste Kempf <jb@videolan.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
#define TITLE_LONGTEXT N_("Show the name of the song or video in the " \
"controler window title")
-#define FILEDIALOG_PATH_TEXT N_("Path to use in file dialog")
+#define FILEDIALOG_PATH_TEXT N_("Path to use in openfile dialog")
+
+#define DISCDIALOG_PATH_TEXT N_("Path to device to use in open disc dialog")
#define NOTIFICATION_TEXT N_("Show notification popup on track change")
#define NOTIFICATION_LONGTEXT N_( \
FILEDIALOG_PATH_TEXT, VLC_TRUE);
change_autosave();
change_internal();
+ add_string( "qt-discdialog-path", NULL, NULL, DISCDIALOG_PATH_TEXT,
+ DISCDIALOG_PATH_TEXT, VLC_TRUE);
+ change_autosave();
+ change_internal();
add_bool( "qt-notification", VLC_TRUE, NULL, NOTIFICATION_TEXT,
NOTIFICATION_LONGTEXT, VLC_FALSE );
set_callbacks( OpenDialogs, Close );
vlc_module_end();
-
/*****************************************************************************
* Module callbacks
*****************************************************************************/