r15421 by craig - #8367: Add Computer and Volumes to the sidebar of the custom file dialogs

scribus-commit scribus-commit at lists.scribus.net
Tue Aug 17 21:57:49 CEST 2010


Author: craig
Date: Tue Aug 17 19:57:48 2010
New Revision: 15421

URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=15421
Log:
#8367: Add Computer and Volumes to the sidebar of the custom file dialogs

Modified:
    branches/Version135/Scribus/scribus/scfilewidget.cpp

Modified: branches/Version135/Scribus/scribus/scfilewidget.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15421&path=/branches/Version135/Scribus/scribus/scfilewidget.cpp
==============================================================================
--- branches/Version135/Scribus/scribus/scfilewidget.cpp (original)
+++ branches/Version135/Scribus/scribus/scfilewidget.cpp Tue Aug 17 19:57:48 2010
@@ -16,6 +16,19 @@
 	setModal(false);
 	setViewMode(QFileDialog::List);
 	setWindowFlags(Qt::Widget);
+
+
+#ifdef Q_OS_MAC
+	QList<QUrl> urls;
+	QUrl computer(QUrl::fromLocalFile(QLatin1String("")));
+	if (!urls.contains(computer))
+		urls << computer;
+	QUrl volumes(QUrl::fromLocalFile("/Volumes"));
+	if (!urls.contains(volumes))
+		urls << volumes;
+	//desktop too?	QUrl computer(QUrl::fromLocalFile(QDesktopServices::storageLocation(QDesktopServices::DesktopLocation)));
+	setSidebarUrls(urls);
+#endif
 	QList<QPushButton *> b = findChildren<QPushButton *>();
 	QListIterator<QPushButton *> i(b);
 	while (i.hasNext())




More information about the scribus-commit mailing list