diff -u -U 5 -r -P -x *~ -x *.[oa] qt-x11-free-3.0.6/src/dialogs/qfiledialog.cpp qt-x11-free-3.0.6.doj/src/dialogs/qfiledialog.cpp
--- qt-x11-free-3.0.6/src/dialogs/qfiledialog.cpp	Thu Oct 17 17:08:55 2002
+++ qt-x11-free-3.0.6.doj/src/dialogs/qfiledialog.cpp	Thu Nov  7 13:22:35 2002
@@ -536,10 +536,239 @@
 	    fileIconProvider = new QWindowsIconProvider( qApp );
 #endif
     }
 }
 
+//dojstart
+/******************************************************************
+ *
+ * Quicklink class
+ *
+ ******************************************************************/
+
+class Quicklink : public QWidget 
+{
+  Q_OBJECT
+
+private:
+  static const char *left_xpm[];
+  static const char *right_xpm[];
+
+  QString filename;
+
+  QPixmap leftPix;
+  QPixmap rightPix;
+
+  QPushButton *toggle;
+  QPushButton *add;
+  QPushButton *rem;
+  QListBox *list;
+  
+  QFileDialog *filedialog;
+
+  bool visible;
+
+public:
+  Quicklink (QFileDialog *fd, QWidget *parent=0, const char *name=0, WFlags f=0);
+
+ public slots:
+ void toggleClicked();
+  void addClicked();
+  void remClicked();
+  void doubleClicked(QListBoxItem *item);
+
+private:
+  void savelist();
+  bool dirok(const QString& dir);
+
+  Quicklink(); // we don't want default construction
+};
+
+const char *Quicklink::left_xpm[] = {
+  "7 10 5 1",
+  " 	c None",
+  ".	c #FFAAAA",
+  "+	c #FF7777",
+  "@	c #FF0000",
+  "#	c #B70000",
+  "    .+ ",
+  "   .@# ",
+  "  .@@# ",
+  " .@@@# ",
+  ".@@@@# ",
+  "+@@@@# ",
+  " #@@@# ",
+  "  #@@# ",
+  "   #@# ",
+  "    ## "};
+
+const char *Quicklink::right_xpm[] = {
+  "7 10 5 1",
+  " 	c None",
+  ".	c #FFAAAA",
+  "+	c #FF0000",
+  "@	c #FF7777",
+  "#	c #B70000",
+  "..     ",
+  ".+@    ",
+  ".++@   ",
+  ".+++@  ",
+  ".++++@ ",
+  ".++++# ",
+  ".+++#  ",
+  ".++#   ",
+  ".+#    ",
+  "@#     "};
+
+Quicklink::Quicklink(QFileDialog *fd, QWidget *parent, const char *name, WFlags flags) :
+  QWidget(parent, name, flags),
+  filename(QDir::homeDirPath() + "/.quicklinkrc"),
+  leftPix(left_xpm),
+  rightPix(right_xpm),
+  toggle(NULL),
+  add(NULL),
+  rem(NULL),
+  list(NULL),
+  filedialog(fd),
+  visible(true) // fake value, will be toggled in constructor
+{
+  QHBoxLayout *mainbox=new QHBoxLayout(this, 0, -1, "mainbox layout");
+  Q_CHECK_PTR(mainbox);
+
+  toggle=new QPushButton(this, "toggle");
+  Q_CHECK_PTR(toggle);
+  mainbox->addWidget(toggle);
+  connect(toggle, SIGNAL(clicked()), this, SLOT(toggleClicked()));
+  toggle->setPixmap(leftPix);
+  // this seems to bug QT3.0.0
+  //toggle->setMinimumSize(10,10);
+  //toggle->setBaseSize(10, 200);
+  //toggle->setMaximumSize(10, 2000);
+  toggle->show();
+
+  QVBoxLayout *box=new QVBoxLayout(mainbox, -1, "box layout");
+  Q_CHECK_PTR(box);
+
+  QHBoxLayout *butbox=new QHBoxLayout(box, -1, "butbox layout");
+  Q_CHECK_PTR(butbox);
+
+  add=new QPushButton(tr("Add"), this, "Add");
+  Q_CHECK_PTR(add);
+  butbox->addWidget(add);
+  connect(add, SIGNAL(clicked()), this, SLOT(addClicked()));
+  QToolTip::add(add, tr("Add current Directory to QuickLink list") );
+
+  rem=new QPushButton(tr("Rem"), this, "Rem");
+  Q_CHECK_PTR(rem);
+  butbox->addWidget(rem);
+  connect(rem, SIGNAL(clicked()), this, SLOT(remClicked()));
+  QToolTip::add(rem, tr("Remove selected Directory from QuickLink list") );
+
+  list=new QListBox(this, "QuickLink List");
+  Q_CHECK_PTR(list);
+  box->addWidget(list);
+  connect(list, SIGNAL(doubleClicked(QListBoxItem *)), this, SLOT(doubleClicked(QListBoxItem *)));
+  //list->setAcceptDrops(TRUE);
+
+  // populate list
+  QFile f(filename);
+  if ( f.open(IO_ReadOnly) ) 
+    {   
+      QTextStream t( &f );      
+      while ( !t.eof() ) 
+	{
+	  QString s=t.readLine();
+	  if(dirok(s))
+	    list->insertItem(s);
+	}
+    }
+  list->sort();
+
+  toggleClicked();
+}
+
+void Quicklink::toggleClicked()
+{
+  if((visible=!visible))
+    {
+      toggle->setPixmap(rightPix);
+      add->show();
+      rem->show();
+      list->show();
+    }
+  else
+    {
+      toggle->setPixmap(leftPix);
+      add->hide();
+      rem->hide();
+      list->hide();
+    }  
+}
+
+void Quicklink::addClicked()
+{
+  if(!filedialog)
+    return;
+
+  const QString p=filedialog->dirPath();
+  if(!dirok(p))
+    return;
+
+  // check if the directory is not included yet
+  for(uint i=0; i<list->count(); i++)
+    if(list->text(i)==p)
+      return;
+
+  // add to the list
+  list->insertItem(p);
+  list->sort();
+
+  savelist();
+}
+
+void Quicklink::remClicked()
+{
+  // check if a directory is selected
+  if(list->currentItem() < 0)
+    return;
+
+  // remove from list
+  list->removeItem(list->currentItem());
+
+  savelist();
+}
+
+void Quicklink::doubleClicked(QListBoxItem *item)
+{
+  if(filedialog)
+    filedialog->setDir(item->text());
+}
+
+void Quicklink::savelist()
+{
+  QFile f(filename);
+  if(f.open(IO_WriteOnly))
+    {
+      QTextStream t(&f);
+      for(uint i=0; i<list->count(); i++)
+	t << list->text(i) << endl;
+      f.close();
+    }
+}
+
+bool Quicklink::dirok(const QString& p)
+{
+  QDir dir;
+  if(!dir.exists(p))
+    return false;
+  if(QDir::isRelativePath(p))
+    return false;
+
+  return true;
+}
+//dojend
+
 /******************************************************************
  *
  * Definitions of view classes
  *
  ******************************************************************/
@@ -1027,10 +1256,16 @@
     }
 
 #ifndef Q_NO_CURSOR
     bool cursorOverride; // Remember if the cursor was overridden or not.
 #endif
+
+  //dojstart
+public:
+  Quicklink *quicklink;
+  //dojend
+
 };
 
 QFileDialogPrivate::~QFileDialogPrivate()
 {
     delete modeButtons;
@@ -2671,10 +2906,16 @@
     d->preview->hide();
     nameEdit->setFocus();
 
     connect( nameEdit, SIGNAL( returnPressed() ),
 	     this, SLOT( fileNameEditReturnPressed() ) );
+
+    //dojstart
+    d->quicklink=new Quicklink(this, this, "Quicklink widget");
+    d->quicklink->show();
+    addLeftWidget(d->quicklink);
+    //dojend
 }
 
 /*!
   \internal
 */
