summaryrefslogtreecommitdiffstats
path: root/konq-plugins/kuick
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit84da08d7b7fcda12c85caeb5a10b4903770a6f69 (patch)
tree2a6aea76f2dfffb4cc04bb907c4725af94f70e72 /konq-plugins/kuick
downloadtdeaddons-84da08d7b7fcda12c85caeb5a10b4903770a6f69.tar.gz
tdeaddons-84da08d7b7fcda12c85caeb5a10b4903770a6f69.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'konq-plugins/kuick')
-rw-r--r--konq-plugins/kuick/Makefile.am26
-rw-r--r--konq-plugins/kuick/kcmkuick/Makefile.am17
-rw-r--r--konq-plugins/kuick/kcmkuick/kcmkuick.cpp155
-rw-r--r--konq-plugins/kuick/kcmkuick/kcmkuick.desktop202
-rw-r--r--konq-plugins/kuick/kcmkuick/kcmkuick.h46
-rw-r--r--konq-plugins/kuick/kcmkuick/kcmkuickdialog.ui197
-rw-r--r--konq-plugins/kuick/kdirmenu.cpp169
-rw-r--r--konq-plugins/kuick/kdirmenu.h61
-rw-r--r--konq-plugins/kuick/kimcontactmenu.cpp82
-rw-r--r--konq-plugins/kuick/kimcontactmenu.h54
-rw-r--r--konq-plugins/kuick/kmetamenu.cpp180
-rw-r--r--konq-plugins/kuick/kmetamenu.h67
-rw-r--r--konq-plugins/kuick/kuick_plugin.cpp114
-rw-r--r--konq-plugins/kuick/kuick_plugin.desktop67
-rw-r--r--konq-plugins/kuick/kuick_plugin.h54
-rw-r--r--konq-plugins/kuick/kuickplugin.desktop66
16 files changed, 1557 insertions, 0 deletions
diff --git a/konq-plugins/kuick/Makefile.am b/konq-plugins/kuick/Makefile.am
new file mode 100644
index 0000000..f0cfa4c
--- /dev/null
+++ b/konq-plugins/kuick/Makefile.am
@@ -0,0 +1,26 @@
+SUBDIRS= kcmkuick
+
+INCLUDES = $(all_includes)
+METASOURCES = AUTO
+
+# Install this plugin in the KDE modules directory
+kde_module_LTLIBRARIES = libkuickplugin.la
+
+# This is all standard. Remove the LIB_KHTML reference if you are not
+# using the KHTML Part
+libkuickplugin_la_SOURCES = kuick_plugin.cpp kdirmenu.cpp kmetamenu.cpp kimcontactmenu.cpp
+libkuickplugin_la_LIBADD = $(LIB_KABC) -lkimproxy -lkonq
+libkuickplugin_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries)
+
+pluginsdir = $(kde_servicesdir)
+plugins_DATA = kuick_plugin.desktop
+
+appsdir = $(kde_appsdir)/.hidden
+apps_DATA = kuickplugin.desktop
+
+# Install the .rc file in the Part's directory (in this case, the part
+# is KHTMLPart)
+
+messages: rc.cpp
+ $(XGETTEXT) *.cpp *.h -o $(podir)/kuick_plugin.pot
+noinst_HEADERS = kimcontactmenu.h
diff --git a/konq-plugins/kuick/kcmkuick/Makefile.am b/konq-plugins/kuick/kcmkuick/Makefile.am
new file mode 100644
index 0000000..6c81498
--- /dev/null
+++ b/konq-plugins/kuick/kcmkuick/Makefile.am
@@ -0,0 +1,17 @@
+INCLUDES= $(all_includes)
+
+kde_module_LTLIBRARIES = kcm_kuick.la
+
+kcm_kuick_la_SOURCES = kcmkuick.cpp kcmkuickdialog.ui
+
+kcm_kuick_la_LDFLAGS = $(all_libraries) -module -avoid-version -no-undefined
+kcm_kuick_la_LIBADD = $(LIB_KDEUI) $(LIB_KIO)
+kcm_kuick_la_METASOURCES = AUTO
+
+noinst_HEADERS = kcmkuick.h kcmkuickdialog.h
+
+apps_DATA = kcmkuick.desktop
+appsdir = $(kde_appsdir)/.hidden
+
+messages: rc.cpp
+ $(XGETTEXT) *.cpp -o $(podir)/kcmkuick.pot
diff --git a/konq-plugins/kuick/kcmkuick/kcmkuick.cpp b/konq-plugins/kuick/kcmkuick/kcmkuick.cpp
new file mode 100644
index 0000000..fdbf5c0
--- /dev/null
+++ b/konq-plugins/kuick/kcmkuick/kcmkuick.cpp
@@ -0,0 +1,155 @@
+/***************************************************************************
+ kcmkuick.cpp - control module for kuick
+ -------------------
+ copyright : (C) 2001 by Holger Freyther <freyther@kde.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 *
+ * the Free Software Foundation; version 2 of the License. *
+ * *
+ ***************************************************************************/
+
+#include "kcmkuick.h"
+
+#include <qlayout.h>
+#include <qfile.h>
+#include <kglobal.h>
+#include <klocale.h>
+#include <kconfig.h>
+#include <kdebug.h>
+#include <kgenericfactory.h>
+#include <kstandarddirs.h>
+#include <kservice.h>
+
+#include <qcheckbox.h>
+#include <qgroupbox.h>
+#include <qpushbutton.h>
+#include <qspinbox.h>
+#include <qstring.h>
+
+typedef KGenericFactory<KCMKuick, QWidget> KuickFactory;
+K_EXPORT_COMPONENT_FACTORY ( kcm_kuick, KuickFactory( "kcmkuick" ) )
+
+KCMKuick::KCMKuick(QWidget *parent, const char *name, const QStringList &)
+:KCModule(parent, name)
+{
+ KAboutData *ab=new KAboutData( "kcmkuick", I18N_NOOP("KCM Kuick"),
+ "0.2",I18N_NOOP("KControl module for Kuick's configuration"), KAboutData::License_GPL,
+ "(c) 2001, Holger Freyther", 0, 0, "freyther@kde.org");
+ ab->addAuthor("Holger Freyther",0, "freyther@kde.org");
+ setAboutData( ab );
+
+ QVBoxLayout *topLayout = new QVBoxLayout(this, 0, 0);
+ dialog = new KCMKuickDialog(this);
+ topLayout->add(dialog);
+ topLayout->addStretch();
+
+ connect( dialog->m_sbCopy, SIGNAL(valueChanged(int) ), SLOT(configChanged() ) );
+ connect( dialog->m_sbMove, SIGNAL(valueChanged(int) ), SLOT(configChanged() ) );
+ connect( dialog->pbCopyClear, SIGNAL(pressed() ), SLOT(slotClearCopyCache() ) );
+ connect( dialog->pbMoveClear, SIGNAL(pressed() ), SLOT(slotClearMoveCache() ) );
+ connect( dialog->m_chkShow, SIGNAL(clicked() ), SLOT(slotShowToggled() ) );
+
+ load();
+}
+
+void KCMKuick::slotShowToggled()
+{
+ bool showChecked = dialog->m_chkShow->isChecked();
+ dialog->m_grpCopy->setEnabled( showChecked );
+ dialog->m_grpMove->setEnabled( showChecked );
+ configChanged();
+}
+
+void KCMKuick::load()
+{
+ KConfig config( "konquerorrc");
+ config.setGroup("kuick-copy");
+ dialog->m_sbCopy->setValue(config.readNumEntry("ShowRecent",5) );
+
+ config.setGroup("kuick-move" );
+ dialog->m_sbMove->setValue(config.readNumEntry("ShowRecent",5) );
+
+ KConfig cfg("kuick_plugin.desktop", true, false, "services");
+ cfg.setDesktopGroup();
+ bool hidden=cfg.readBoolEntry("Hidden", false);
+ dialog->m_chkShow->setChecked(!hidden);
+ slotShowToggled();
+
+ emit changed(false);
+}
+
+KCMKuick::~KCMKuick()
+{
+}
+
+void KCMKuick::load(const QString & /*s*/)
+{
+}
+
+void KCMKuick::configChanged()
+{
+ emit changed(true);
+}
+
+void KCMKuick::save()
+{
+ KConfig config("konquerorrc" );
+ config.setGroup("kuick-copy");
+
+ config.writeEntry("ShowRecent", dialog->m_sbCopy->value() );
+
+ config.setGroup("kuick-move" );
+ config.writeEntry("ShowRecent", dialog->m_sbMove->value() );
+
+ config.sync(); //is it necessary ?
+
+ if ( dialog->m_chkShow->isChecked() ) {
+ QString servicespath = KGlobal::dirs()->saveLocation( "services");
+ QFile::remove(servicespath+"/kuick_plugin.desktop");
+ }
+ else {
+ KConfig cfg("kuick_plugin.desktop", false, false, "services");
+ cfg.setDesktopGroup();
+ cfg.writeEntry("Hidden", true);
+ }
+ KService::rebuildKSycoca(this);
+
+ emit changed(false);
+}
+
+void KCMKuick::slotClearCopyCache( ) {
+ KConfig config("konquerorrc");
+ config.setGroup("kuick-copy" );
+ config.writePathEntry("Paths", QStringList() );
+ config.sync(); //is it necessary ?
+}
+
+void KCMKuick::slotClearMoveCache() {
+ KConfig config("konquerorrc");
+ config.setGroup("kuick-move" );
+ config.writePathEntry("Paths", QStringList() );
+ config.sync(); //is it necessary ?
+}
+
+void KCMKuick::defaults()
+{
+ dialog->m_sbCopy->setValue(4);
+ dialog->m_sbMove->setValue(4);
+
+ dialog->m_chkShow->setChecked(true);
+ slotShowToggled();
+
+ emit changed( true );
+}
+
+QString KCMKuick::quickHelp() const
+{
+ return i18n("<h1>Kuick</h1> With this module you can configure Kuick, the KDE quick"
+ "copy and move plugin for Konqueror.");
+}
+
+#include "kcmkuick.moc"
diff --git a/konq-plugins/kuick/kcmkuick/kcmkuick.desktop b/konq-plugins/kuick/kcmkuick/kcmkuick.desktop
new file mode 100644
index 0000000..772dcce
--- /dev/null
+++ b/konq-plugins/kuick/kcmkuick/kcmkuick.desktop
@@ -0,0 +1,202 @@
+[Desktop Entry]
+Icon=editcopy
+Type=Application
+Exec=kcmshell kcmkuick
+X-KDE-ModuleType=Library
+X-KDE-Library=kuick
+Name=Quick Copy & Move Plugin
+Name[af]=Vinnige Kopie & Beweeg Inplak
+Name[ar]=ملحق النقل و النسخ السريع
+Name[az]=Əlavəni Sürətli Köçür və Daşı
+Name[bg]=Приставка за бързо копиране и преместване
+Name[bs]=Dodatak za brzo kopiranje i premještanje
+Name[ca]=Connector copia i mou ràpidament
+Name[cs]=Rychlé kopírování a přesouvání
+Name[cy]=Ategyn Copïo & Symud Brys
+Name[da]=Plugin for hurtig kopiering & flytning
+Name[de]=Kopieren und Verschieben
+Name[el]=Πρόσθετο γρήγορης αντιγραφής & μετακίνησης
+Name[eo]=Kromaĵo por rapida kopiado kaj movado
+Name[es]=Complemento para copiar y mover rápido
+Name[et]=Kiire kopeerimise ja liigutamise plugin
+Name[eu]=Kopiatu eta mugitzeko plugin azkarra
+Name[fa]=وصلۀ حرکت و رونوشت سریع
+Name[fi]=Nopea kopiointi ja siirto sovelma
+Name[fo]=Skjót avrita-og-flyta-ístingur
+Name[fr]=Outil de copie et de déplacement rapides
+Name[fy]=Fluch kopiearje en ferpleatse
+Name[gl]=Pugin para Copiar e Mover Axiña
+Name[he]=תוסף העתקה והעברה מהירה
+Name[hi]=जल्दी नक़ल व खिसकाना प्लगइन
+Name[hr]=Dodatak za brzo kopiranje i premještanje
+Name[hu]=Kuick modul
+Name[is]=Quick Copy & Move Íforrit
+Name[it]=Plugin copia/spostamento rapidi
+Name[ja]=高速コピー & 移動プラグイン
+Name[ka]=სწრაფი ასლის და გადატანის მოდული
+Name[kk]=Шұғыл көшірмелеу және жылжыту плагин модулі
+Name[km]=ចម្លង និង​ផ្លាស់ទី​កម្មវិធី​ជំនួយ​ដ៏រហ័ស
+Name[lt]=Greito kopijavimo ir perkėlimo priedas
+Name[lv]=Ātras Kopēšanas un Pārvietošanas Iespraudnis
+Name[mk]=Приклучок за брзо копирање и преместување
+Name[ms]=Salin Pantas & Alih Plugin
+Name[mt]=Plugin għal ikkupjar u tmexxija malajr
+Name[nb]=Programtillegg for rask kopi og flytt
+Name[nds]=Fix-Koperen un -Verschuvenmoduul
+Name[ne]=छिटो प्रतिलिपि गर्नुहोस् र प्लगइन सार्नुहोस्
+Name[nl]=Snel kopiëren en verplaatsen
+Name[nn]=Snøggkopi-og-flytt-modul
+Name[nso]=Plugin ya Kapela ya Gatisa & Sutisa
+Name[pa]=ਚੁਸਤ ਨਕਲ ਅਤੇ ਭੇਜਣ ਪਲੱਗਇਨ
+Name[pl]=Szybkie kopiowanie i przesuwanie
+Name[pt]='Plugin' de Cópia e Mudança Rápida
+Name[pt_BR]= Plugin de Copiar & Mover Rápido
+Name[ro]=Modul de copiere şi mutare rapidă
+Name[ru]=Быстрый перенос и копирование файлов
+Name[sk]=Modul pre rýchle kopírovanie a presun
+Name[sl]=Vstavek za hitro kopiranje in premikanje
+Name[sr]=Прикључак за брзо копирање и премештање
+Name[sr@Latn]=Priključak za brzo kopiranje i premeštanje
+Name[sv]=Snabbkopiera och -flytta
+Name[ta]=விரைவான நகலெடு மற்றும் நகர்த்து சொருகுபொருள்
+Name[tg]=Кӯчондани тез ва нусхаи файлҳо
+Name[th]=ปลั๊กอินคัดลอกและย้ายอย่างรวดเร็ว
+Name[tr]=Hızlı Kopyalama ve Taşıma Eklentisi
+Name[uk]=Втулок швидкого копіювання та пересування
+Name[uz]=Tez nusxa olish va koʻchirish plagini
+Name[uz@cyrillic]=Тез нусха олиш ва кўчириш плагини
+Name[ven]=Khophi ya tavhanya & tshimbidza Plugin
+Name[vi]=Bổ sung sao chép và di chuyển nhanh
+Name[xh]=Khawuleza Khuphela & Susa iplagi yangaphakathi
+Name[zh_CN]=快速复制和移动文件的插件
+Name[zh_TW]=快速複製及搬移外掛程式
+Name[zu]=Kuick Khiphela futhi Ususe i Plugin
+Comment=Kuick configuration module
+Comment[af]=Vinnige opstelling module
+Comment[ar]=أداة تهيئة Kuick
+Comment[az]=Kuick quraşdırma modulu
+Comment[bg]=Модул за настройване на Kuick
+Comment[br]=Mollad kefluniañ buan
+Comment[bs]=Modul za podešavanje Kuick-a
+Comment[ca]=Mòdul de configuració per a Kuick
+Comment[cs]=Konfigurační modul 'kuick'
+Comment[cy]=Modiwl ffurfweddu Kuick
+Comment[da]=Kuick indstillingsmodul
+Comment[de]=Einstellungsmodul für die Kopier- und Verschieberoutine "Kuick"
+Comment[el]=Άρθρωμα ρύθμισης του Kuick
+Comment[eo]=Agordmodulo por Rapidkopiilo
+Comment[es]=Módulo de configuración rápida
+Comment[et]=Kuicki seadistamine
+Comment[eu]=Kuick konfiguratzeko modulua
+Comment[fa]=پیمانۀ پیکربندی Kuick
+Comment[fi]=Kuick asetusmoduuli
+Comment[fr]=Module de configuration de Kuick
+Comment[fy]=Kuick-konfiguraasjemodule
+Comment[ga]=Modúl cumraíochta Kuick
+Comment[gl]=Módulo de configuración de Kuick
+Comment[he]=שינוי הגדרות התוסף Kuick
+Comment[hi]=क्विक कॉन्फ़िगरेशन मॉड्यूल
+Comment[hr]=Modul za konfiguriranje Kuicka
+Comment[hu]=A Kuick beállítómodulja
+Comment[is]=Stillingatól Kuick
+Comment[it]=Modulo di configurazione per Kuick
+Comment[ja]=Kuick の設定モジュール
+Comment[ka]=Kuick კონფიგურაციის მოდული
+Comment[kk]=Kuick баптау модулі
+Comment[km]=ម៉ូឌុល​​កំណត់​រចនា​សម្ព័ន្ធ​ Kuick
+Comment[lt]=Kuick konfigūravimo modulis
+Comment[mk]=Конфигурациски модул на Kuick
+Comment[ms]=Modul konfigurasi Kuick
+Comment[mt]=Konfigurazzjoni malajr
+Comment[nb]=Oppsettsmodul for Kuick
+Comment[nds]=Kuick-Instellenmoduul
+Comment[ne]=छिटो कन्फिगरेसन मिड्युल
+Comment[nl]=Kuick-configuratiemodule
+Comment[nn]=Oppsettsmodul for Kuick
+Comment[nso]=Seripa sa peakanyo ya Kuick
+Comment[pl]=Moduł konfiguracji Kuick
+Comment[pt]=Módulo de configuração do Kuick
+Comment[pt_BR]=Módulo de configuração do Kuick
+Comment[ro]=Modul configurare Kuick
+Comment[ru]=Модуль настройки Kuick
+Comment[sk]=Konfiguračný modul kuick
+Comment[sl]=Nastavitveni modul Kuick
+Comment[sr]=Kuick-ов модул за подешавање
+Comment[sr@Latn]=Kuick-ov modul za podešavanje
+Comment[sv]=Inställningsmodul för Kuick
+Comment[ta]=விரைவான வடிவமைப்பு கூற்று
+Comment[tg]=Модули танзими Kuick
+Comment[th]=โมดูลปรับแต่ง Kuick
+Comment[tr]=Hızlı yapılandırma modülü
+Comment[uk]=Модуль конфігурації Kuick
+Comment[uz]=Kuick moslamasi moduli
+Comment[uz@cyrillic]=Kuick мосламаси модули
+Comment[ven]=Modulu wa nzudzanyo wa Kuick
+Comment[vi]=Mô-đun cấu hình Kuick
+Comment[xh]=Uqwalaselo lomqongo womlinganiselo we Kuick
+Comment[zh_CN]=Kuick 配置模块
+Comment[zh_TW]=Kuick 設定模組
+Comment[zu]=Kuick imojula yenhlanganiselo
+Keywords=kuick,copy,move
+Keywords[az]=kuick,copy,move,köçürt,daşı
+Keywords[bg]=копиране, преместване, бързо, kuick, copy, move
+Keywords[ca]=kuick,copia,mou
+Keywords[cs]=kuick,kopírovat,přesunout
+Keywords[cy]=kuick,copï,symud
+Keywords[da]=kuick,kopiér,flyt
+Keywords[de]=kuick,kopieren,verschieben
+Keywords[el]=kuick,αντιγραφή,μετακίνηση
+Keywords[eo]=rapida,kopio,movo
+Keywords[es]=rápida,copiar,mover
+Keywords[et]=kuick,kopeerimine,liigutamine
+Keywords[fa]=kuick ،رونوشت، حرکت
+Keywords[fi]=kuick,kopioi,siirrä
+Keywords[fo]=kuick,avrita,flyta
+Keywords[fr]=kuick,copie,déplacement
+Keywords[fy]=kuick, kopiearje, ferpleatse
+Keywords[ga]=kuick,cóipeáil,bog
+Keywords[gl]=kuick,copiar,mover
+Keywords[he]=מהיר,העתקה,העברה, kuick,copy,move, quick
+Keywords[hi]=क्विक,नक़ल,खिसकाना
+Keywords[hr]=kuick,copy,move,kopiraj,premjesti,kopiranje,premještanje
+Keywords[hu]=Kuick,másolás,mozgatás
+Keywords[is]=fljót,afrita,færa
+Keywords[it]=kuick,copia,spostamento
+Keywords[ja]=kuick,コピー,移動
+Keywords[ka]=kuick,ასლი,გადატანა
+Keywords[km]=kuick ចម្លង ផ្លាស់ទី
+Keywords[lt]=kuick,copy,move,kopijuoti, perkelti
+Keywords[lv]=kuick,kopēt,pārvietot
+Keywords[mk]=kuick,копирај,премести,копирање,преместување
+Keywords[ms]=kuick,salin, alih
+Keywords[mt]=kuick,copy,move,ikkopja,mexxi
+Keywords[nb]=kuick,kopier,flytt
+Keywords[nds]=kuick,koperen,verschuven
+Keywords[ne]=छिटो,प्रतिलिपि,सार्नुहोस्
+Keywords[nl]=kuick,kopiëren,verplaatsen
+Keywords[nn]=kuick,kopier,flytt
+Keywords[nso]=kapela,gatisa,suta
+Keywords[pl]=kuick,kopiuj,przesuń
+Keywords[pt]=kuick,copiar,mover
+Keywords[pt_BR]=kuick,copiar,mover
+Keywords[ro]=kuick,copiere,mutare
+Keywords[ru]=kuick,копирование,перенос
+Keywords[sk]=kuick,kopírovať,presun
+Keywords[sl]=kuick,kopira,premakn
+Keywords[sr]=kuick,copy,move,копирај,премести
+Keywords[sr@Latn]=kuick,copy,move,kopiraj,premesti
+Keywords[sv]=kuick,kopiera,flytta
+Keywords[ta]=விரைவான,நகல் எடு, நகர்த்து
+Keywords[tg]=kuick, нусха, гузарондан
+Keywords[th]=รวดเร็ว,คัดลอก,ย้าย
+Keywords[tr]=kuick,hızlı,kopyala,taşı
+Keywords[uk]=kuick,копіювання,пересування
+Keywords[uz]=kuick,nusxa olish,koʻchirish
+Keywords[uz@cyrillic]=kuick,нусха олиш,кўчириш
+Keywords[ven]=kuick,khophi,tshimbila
+Keywords[vi]=kuick,sao chép,chép,di chuyển,chuyển
+Keywords[xh]=kuick,khuphela,hambisa
+Keywords[zh_CN]=kuick,copy,move,复制,移动
+Keywords[zu]=kuick,khiphela,susa
+X-KDE-ParentApp=kcontrol
+DocPath=konq-plugins/kuick/index.html
diff --git a/konq-plugins/kuick/kcmkuick/kcmkuick.h b/konq-plugins/kuick/kcmkuick/kcmkuick.h
new file mode 100644
index 0000000..c10d04e
--- /dev/null
+++ b/konq-plugins/kuick/kcmkuick/kcmkuick.h
@@ -0,0 +1,46 @@
+/***************************************************************************
+ kcmkuick.h
+ -------------------
+ copyright : (C) 2001 by Holger Freyther
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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 *
+ * the Free Software Foundation; version 2 of the License. *
+ * *
+ ***************************************************************************/
+
+#ifndef KCMKUICK_H
+#define KCMKUICK_H
+
+#include <kcmodule.h>
+#include <kaboutdata.h>
+#include "kcmkuickdialog.h"
+
+
+class KCMKuick
+ : public KCModule
+{
+ Q_OBJECT
+
+public:
+ KCMKuick (QWidget *parent, const char *name, const QStringList &);
+ ~KCMKuick();
+ void load();
+ void load(const QString &);
+ void save();
+ void defaults();
+ QString quickHelp() const;
+public slots:
+ void configChanged();
+private:
+ KCMKuickDialog *dialog;
+protected slots:
+ void slotClearMoveCache();
+ void slotClearCopyCache();
+ void slotShowToggled();
+};
+
+#endif
diff --git a/konq-plugins/kuick/kcmkuick/kcmkuickdialog.ui b/konq-plugins/kuick/kcmkuick/kcmkuickdialog.ui
new file mode 100644
index 0000000..5001ad9
--- /dev/null
+++ b/konq-plugins/kuick/kcmkuick/kcmkuickdialog.ui
@@ -0,0 +1,197 @@
+<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<class>KCMKuickDialog</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>KCMKuickDialog</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>598</width>
+ <height>190</height>
+ </rect>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>m_chkShow</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Show "Copy To" and "Move To" entries in context menus</string>
+ </property>
+ </widget>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>m_grpCopy</cstring>
+ </property>
+ <property name="title">
+ <string>Copy Operations</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QPushButton" row="2" column="0">
+ <property name="name">
+ <cstring>pbCopyClear</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Clear List</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="2">
+ <property name="name">
+ <cstring>m_txtCopyDir</cstring>
+ </property>
+ <property name="text">
+ <string>folders.</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>m_txtCopyCache</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Cache the last</string>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="0" column="1">
+ <property name="name">
+ <cstring>m_sbCopy</cstring>
+ </property>
+ <property name="maxValue">
+ <number>20</number>
+ </property>
+ <property name="minValue">
+ <number>1</number>
+ </property>
+ </widget>
+ <spacer row="0" column="3">
+ <property name="name">
+ <cstring>Spacer2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>m_grpMove</cstring>
+ </property>
+ <property name="title">
+ <string>Move Operations</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QPushButton" row="2" column="0">
+ <property name="name">
+ <cstring>pbMoveClear</cstring>
+ </property>
+ <property name="text">
+ <string>Clear &amp;List</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>m_txtMoveCache</cstring>
+ </property>
+ <property name="text">
+ <string>Cache the last</string>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="0" column="1">
+ <property name="name">
+ <cstring>m_sbMove</cstring>
+ </property>
+ <property name="maxValue">
+ <number>20</number>
+ </property>
+ <property name="minValue">
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="2">
+ <property name="name">
+ <cstring>m_txtMoveDir</cstring>
+ </property>
+ <property name="text">
+ <string>folders.</string>
+ </property>
+ </widget>
+ <spacer row="0" column="3">
+ <property name="name">
+ <cstring>Spacer3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ </vbox>
+</widget>
+<tabstops>
+ <tabstop>m_sbCopy</tabstop>
+ <tabstop>pbCopyClear</tabstop>
+ <tabstop>m_sbMove</tabstop>
+ <tabstop>pbMoveClear</tabstop>
+</tabstops>
+<slots>
+ <slot access="private">slotClearMoveCache()</slot>
+ <slot access="protected">slotClearCopyCache()</slot>
+</slots>
+<layoutdefaults spacing="6" margin="0"/>
+<layoutfunctions spacing="KDialog::spacingHint"/>
+</UI>
diff --git a/konq-plugins/kuick/kdirmenu.cpp b/konq-plugins/kuick/kdirmenu.cpp
new file mode 100644
index 0000000..2cbf6de
--- /dev/null
+++ b/konq-plugins/kuick/kdirmenu.cpp
@@ -0,0 +1,169 @@
+/* This file is part of the KDE project
+ Copyright (C) 2001 Holger Freyther <freyther@yahoo.com>
+ Icon stroing inspired by Matthias Elters browser_mnu.* (currently not used)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; version 2
+ of the License.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+#include <qiconset.h>
+#include <qdir.h>
+#include <qfileinfo.h>
+
+#include <kaction.h>
+#include <kapplication.h>
+#include <kiconloader.h>
+#include <kio/global.h>
+#include <klocale.h>
+#include <kurl.h>
+#include <ksimpleconfig.h>
+#include "kdirmenu.h"
+
+#define CICON(a) (*_icons)[a]
+
+QMap<QString, QPixmap> *KDirMenu::_icons = 0;
+
+KDirMenu::KDirMenu ( QWidget *parent, const KURL &_src,
+ const QString &_path, const QString &_name, bool /*showfile*/ )
+ : QPopupMenu(parent),
+ path(_path),
+ name(_name),
+ src( _src ),
+ action( 0 )
+{
+ children.setAutoDelete( true );
+ initIconMap( );
+ connect( this, SIGNAL( aboutToShow( ) ), this, SLOT( slotAboutToShow( ) ) );
+ connect( this, SIGNAL( aboutToHide( ) ), this, SLOT( slotAboutToHide( ) ) );
+ children.clear(); // just in case
+
+ QFileInfo fileInfo(path);
+ if (( src.path() != path || !src.isLocalFile()) && fileInfo.isWritable())
+ action = new KAction(name, 0, this, SLOT(new_slot( ) ), this);
+}
+KDirMenu::~KDirMenu( ) {
+ delete action;
+ clear( );
+ children.clear( );
+}
+void KDirMenu::insert( KDirMenu *submenu, const QString &_path ) {
+ static const QIconSet folder = SmallIconSet("folder");
+ QString escapedPath = _path;
+ QString completPath=path+'/'+_path;
+ // parse .directory if it does exist
+ if (QFile::exists(completPath + "/.directory")) {
+
+ KSimpleConfig c(completPath + "/.directory", true);
+ c.setDesktopGroup();
+ QString iconPath = c.readEntry("Icon");
+
+ if ( iconPath.startsWith("./") )
+ iconPath = _path + '/' + iconPath.mid(2);
+ QPixmap icon;
+ icon = KGlobal::iconLoader()->loadIcon(iconPath,
+ KIcon::Small, KIcon::SizeSmall,
+ KIcon::DefaultState, 0, true);
+ if(icon.isNull())
+ icon = CICON("folder");
+ insertItem( icon, escapedPath.replace( "&", "&&" ), submenu );
+ }
+ else
+ insertItem( folder, escapedPath.replace( "&", "&&" ), submenu );
+ children.append( submenu );
+ connect(submenu, SIGNAL(fileChosen(const QString &)),
+ this, SLOT(slotFileSelected(const QString &)));
+}
+
+void KDirMenu::slotAboutToShow( ) {
+
+ // ok, prepare the dir: list all dirs and insert the new menus
+ if (count() >= 1) return;
+
+ //Precaution: if not a directory, exit, in case some path in KMetaMenu
+ //isn't checked right
+ if ( !QFileInfo(path).isDir() )
+ return;
+
+ if ( action )
+ action->plug( this );
+ else
+ setItemEnabled( insertItem( name ), false );
+
+ // all dirs writeable and readable
+ QDir dir(path, QString::null,
+ QDir::Name | QDir::DirsFirst | QDir::IgnoreCase,
+ QDir::Dirs | QDir::Readable | QDir::Executable);
+
+ const QFileInfoList* dirList = dir.entryInfoList();
+ if ( !dirList || dirList->isEmpty() ) {
+ if ( action )
+ action->setEnabled( false );
+ return;
+ }
+
+ insertSeparator( );
+
+ if (dirList->count() == 2) {
+ insertItem(i18n("No Sub-Folders"), 0);
+ setItemEnabled(0, false);
+ return;
+ }
+
+ static const QString& dot = KGlobal::staticQString( "." );
+ static const QString& dotdot = KGlobal::staticQString( ".." );
+
+ for ( QFileInfoListIterator it( *dirList ); *it; ++it ) {
+ QString fileName = (*it)->fileName();
+ if ( fileName == dot || fileName == dotdot )
+ continue;
+
+ KURL u;
+ u.setPath((*it)->absFilePath());
+ if (kapp->authorizeURLAction("list", u, u))
+ {
+ insert(new KDirMenu(this, src, (*it)->absFilePath(), name),
+ KIO::decodeFileName( fileName ));
+ }
+ }
+}
+void KDirMenu::slotAboutToHide( ) {
+
+}
+void KDirMenu::initIconMap()
+{
+ if(_icons) return;
+
+// kdDebug(90160) << "PanelBrowserMenu::initIconMap" << endl;
+
+ _icons = new QMap<QString, QPixmap>;
+
+ _icons->insert("folder", SmallIcon("folder"));
+ _icons->insert("unknown", SmallIcon("mime_empty"));
+ _icons->insert("folder_open", SmallIcon("folder_open"));
+ _icons->insert("kdisknav", SmallIcon("kdisknav"));
+ _icons->insert("kfm", SmallIcon("kfm"));
+ _icons->insert("terminal", SmallIcon("terminal"));
+ _icons->insert("txt", SmallIcon("txt"));
+ _icons->insert("exec", SmallIcon("exec"));
+ _icons->insert("chardevice", SmallIcon("chardevice"));
+}
+void KDirMenu::slotFileSelected(const QString &_path ){
+ emit fileChosen( _path );
+}
+
+void KDirMenu::new_slot() {
+ emit fileChosen(path );
+}
+
+#include "kdirmenu.moc"
diff --git a/konq-plugins/kuick/kdirmenu.h b/konq-plugins/kuick/kdirmenu.h
new file mode 100644
index 0000000..6356e83
--- /dev/null
+++ b/konq-plugins/kuick/kdirmenu.h
@@ -0,0 +1,61 @@
+/* This file is part of the KDE project
+ Copyright (C) 2001 Holger Freyther <freyther@yahoo.com>
+
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; version 2
+ of the License.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef __kdirmenu_h
+#define __kdirmenu_h
+
+#include <qpopupmenu.h>
+#include <qptrlist.h>
+#include <qmap.h>
+
+class KAction;
+class KURL;
+
+class KDirMenu : public QPopupMenu {
+ Q_OBJECT
+public:
+ KDirMenu( QWidget *parent, const KURL &src, const QString &_path,
+ const QString &name, bool showfiles = false );
+ ~KDirMenu( );
+ void setPath( const QString &_path);
+ void insert( KDirMenu *menu, const QString &path );
+protected:
+ int target_id;
+ static QMap<QString, QPixmap> *_icons;
+
+signals:
+ void fileChosen( const QString &_path );
+private:
+ QString path;
+ QString name;
+ KURL src;
+ KAction *action;
+ QPtrList<KDirMenu> children;
+ void initIconMap( );
+public slots:
+ void slotAboutToShow( );
+ void slotAboutToHide( );
+ void slotFileSelected(const QString &_path );
+ /** No descriptions */
+ void new_slot();
+};
+
+#endif // __kdirmenu_h
+
diff --git a/konq-plugins/kuick/kimcontactmenu.cpp b/konq-plugins/kuick/kimcontactmenu.cpp
new file mode 100644
index 0000000..42cf980
--- /dev/null
+++ b/konq-plugins/kuick/kimcontactmenu.cpp
@@ -0,0 +1,82 @@
+/* This file is part of the KDE project
+ Copyright (C) 2004 Will Stephenson <lists@stevello.free-online.co.uk>
+
+ kimcontactmenu.cpp - Menu allowing a choice from a list of instant
+ messaging contacts
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; version 2
+ of the License.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <qstringlist.h>
+
+// The following enables kabc for contact name lookups instead of using Kopete's idea of their name.
+//#define KIMCONTACTS_USE_KABC
+
+#include <kimproxy.h>
+
+#ifdef KIMCONTACTS_USE_KABC
+#include <kabc/addressbook.h>
+#include <kabc/stdaddressbook.h>
+#endif
+
+#include "kimcontactmenu.h"
+
+KIMContactMenu::KIMContactMenu( QWidget *parent, KIMProxy *proxy )
+ : QPopupMenu( parent), mProxy( proxy )
+{
+#ifdef KIMCONTACTS_USE_KABC
+ m_addressBook = KABC::StdAddressBook::self( false );
+#endif
+ connect( this, SIGNAL( activated( int ) ), SLOT( slotItemActivated( int ) ) );
+ connect( this, SIGNAL( aboutToShow( ) ), this, SLOT( slotAboutToShow( ) ) );
+}
+
+KIMContactMenu::~KIMContactMenu()
+{
+}
+
+void KIMContactMenu::slotAboutToHide()
+{
+}
+
+void KIMContactMenu::slotAboutToShow()
+{
+ // the pointer may be returning to the menu, if it's already populated, there's nothing to do
+ if (count() >= 1) return;
+
+ mContacts = mProxy->fileTransferContacts();
+
+ int i = 0;
+
+ for ( QStringList::Iterator it = mContacts.begin(); it != mContacts.end(); ++it, ++i )
+ {
+#ifdef KIMCONTACTS_USE_KABC
+ insertItem( mProxy->presenceIcon( *it ), m_addressBook->findByUid( *it ).realName(), i );
+#else
+ insertItem( mProxy->presenceIcon( *it ), mProxy->displayName( *it ), i );
+#endif
+ }
+}
+
+void KIMContactMenu::slotItemActivated( int item )
+{
+ // look up corresponding UID
+ QString uid = mContacts[ item ];
+ // emit signal
+ emit contactChosen( uid );
+}
+
+#include "kimcontactmenu.moc"
diff --git a/konq-plugins/kuick/kimcontactmenu.h b/konq-plugins/kuick/kimcontactmenu.h
new file mode 100644
index 0000000..62c13bc
--- /dev/null
+++ b/konq-plugins/kuick/kimcontactmenu.h
@@ -0,0 +1,54 @@
+/* This file is part of the KDE project
+ Copyright (C) 2004 Will Stephenson <lists@stevello.free-online.co.uk>
+
+ kimcontactmenu.cpp - Menu allowing a choice from a list of instant
+ messaging contacts
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; version 2
+ of the License.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef __kim_contact_menu_h
+#define __kim_contact_menu_h
+
+#include <qpopupmenu.h>
+#include <qstringlist.h>
+
+class KIMProxy;
+namespace KABC {
+ class AddressBook;
+}
+
+class KIMContactMenu : public QPopupMenu
+{
+ Q_OBJECT
+public:
+ KIMContactMenu( QWidget *parent, KIMProxy *proxy );
+ ~KIMContactMenu();
+protected slots:
+ // populate menus if not already populated
+ void slotAboutToShow();
+ void slotAboutToHide();
+ void slotItemActivated( int item );
+signals:
+ void contactChosen( const QString &uid );
+
+protected:
+ KIMProxy *mProxy;
+ QStringList mContacts;
+ KABC::AddressBook* m_addressBook;
+};
+
+#endif
diff --git a/konq-plugins/kuick/kmetamenu.cpp b/konq-plugins/kuick/kmetamenu.cpp
new file mode 100644
index 0000000..065a825
--- /dev/null
+++ b/konq-plugins/kuick/kmetamenu.cpp
@@ -0,0 +1,180 @@
+/* This file is part of the KDE project
+ Copyright (C) 2001 Holger Freyther <freyther@yahoo.com>
+
+ 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 the Free Software Foundation; version 2
+ of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kiconloader.h>
+#include <kimproxy.h>
+#include <kapplication.h>
+#include <klocale.h>
+#include <kconfig.h>
+#include <kfiledialog.h>
+#include <kurl.h>
+#include <konq_popupmenu.h>
+
+#include <qpixmap.h>
+#include <qdir.h>
+#include <qiconset.h>
+#include <qstringlist.h>
+
+#include "kmetamenu.h"
+#include "kdirmenu.h"
+#include "kimcontactmenu.h"
+#include "kmetamenu.moc"
+
+KMetaMenu::KMetaMenu( QWidget *parent, const KURL &url,
+ const QString &text, const QString &key, KIMProxy *imProxy )
+: QPopupMenu( parent),
+ m_root( 0 ), m_home( 0 ), m_etc( 0 ), m_current( 0 ), m_browse( 0 ) {
+ int recent_no;
+ group = key;
+ actions.setAutoDelete( TRUE );
+
+ QStringList dirList;
+
+ KURL u;
+
+ u.setPath(QDir::homeDirPath());
+ if ( kapp->authorizeURLAction("list", u, u) )
+ {
+ m_home = new KDirMenu( parent, url, u.path() , text );
+ insertItem( SmallIcon( "kfm_home" ), i18n("&Home Folder"), m_home);
+ dirList << u.path();
+
+ connect(m_home, SIGNAL(fileChosen(const QString &)),
+ SLOT(slotFileChosen(const QString &) ) );
+ }
+
+ u.setPath(QDir::rootDirPath());
+ if ( kapp->authorizeURLAction("list", u, u) )
+ {
+ m_root = new KDirMenu( parent, url, u.path() , text );
+ insertItem( SmallIcon( "folder_red" ), i18n("&Root Folder"), m_root);
+ dirList << u.path();
+
+ connect(m_root, SIGNAL(fileChosen(const QString &)),
+ SLOT(slotFileChosen(const QString &) ) );
+ }
+
+ QString confDir = QDir::rootDirPath()+ "etc";
+ u.setPath(confDir);
+ if ( QFileInfo( confDir ).isWritable() &&
+ kapp->authorizeURLAction("list", u, u) )
+ {
+ m_etc = new KDirMenu( parent, url, confDir, text );
+ insertItem( SmallIcon( "folder_yellow" ) ,
+ i18n("&System Configuration"), m_etc);
+ dirList << confDir;
+
+ connect(m_etc , SIGNAL(fileChosen(const QString &)),
+ SLOT(slotFileChosen(const QString &) ) );
+ }
+
+ if ( url.isLocalFile()
+ && dirList.find( url.path() ) == dirList.end()
+ && QFileInfo( url.path() ).isWritable()
+ && QFileInfo( url.path() ).isDir()
+ && kapp->authorizeURLAction("list", url, url) )
+ //Need to check whether a directory so we don't crash trying to access it
+ //(#60192)
+ {
+ // Also add current working directory
+ m_current = new KDirMenu( parent, url, url.path(), text );
+ insertItem( SmallIcon( "folder" ), i18n( "&Current Folder" ),
+ m_current );
+
+ connect(m_current, SIGNAL(fileChosen(const QString &)),
+ SLOT(slotFileChosen(const QString &) ) );
+ }
+
+ if ( imProxy )
+ {
+ m_contacts = new KIMContactMenu( parent, imProxy );
+ int item = insertItem( SmallIconSet( "personal" ), i18n( "C&ontact" ), m_contacts );
+ connect ( m_contacts, SIGNAL( contactChosen( const QString &) ), SIGNAL( contactChosen( const QString & ) ) );
+ if ( !imProxy->initialize() || imProxy->fileTransferContacts().isEmpty() )
+ setItemEnabled( item, false );
+ }
+
+
+ m_browse = new KAction(i18n("&Browse..."), 0, this, SLOT(slotBrowse()), this );
+ m_browse->plug(this);
+ // read the last chosen dirs
+ // first set the group according to our parameter
+ conf = kapp->config( );
+ conf->setGroup(key );
+ recent_no = conf->readNumEntry("ShowRecent", 5);
+ list = conf->readPathListEntry("Paths");
+ if ( list.count() > 0 )
+ insertSeparator();
+ int i=1;
+ QStringList::Iterator it = list.begin();
+ while( it != list.end() ) {
+ if( i == (recent_no + 1) )
+ break;
+ QDir dir( *it );
+ u.setPath( *it );
+ if ( !dir.exists() || !kapp->authorizeURLAction("list", u, u) ) {
+ it = list.remove( it );
+ continue;
+ }
+ QString escapedDir = *it;
+ KAction *action = new KAction(escapedDir.replace("&", "&&"), 0, this, SLOT(slotFastPath()), this);
+ action->plug(this );
+ actions.append( action );
+ ++it;
+ i++;
+ }
+}
+
+KMetaMenu::KMetaMenu( ){
+
+}
+KMetaMenu::~KMetaMenu(){
+ delete m_root;
+ delete m_home;
+ delete m_etc;
+ delete m_current;
+ delete m_browse;
+ actions.clear();
+}
+void KMetaMenu::slotFileChosen(const QString &path ){
+ writeConfig(path );
+ emit fileChosen(path );
+}
+
+void KMetaMenu::slotFastPath( ) {
+ KAction *action;
+ action = (KAction*) sender();
+ QString text = action->plainText( );
+ slotFileChosen( text );
+}
+void KMetaMenu::writeConfig( const QString &path){
+ list.remove(path );
+ list.prepend(path );
+ conf->setGroup( group );
+ int c = conf->readNumEntry( "ShowRecent", 5 );
+ while ( list.count() > c && !list.isEmpty() )
+ list.remove(list.last());
+ conf->writePathEntry("Paths", list);
+ conf->sync( );
+}
+void KMetaMenu::slotBrowse() {
+ KURL dest = KFileDialog::getExistingURL();
+ if( dest.isEmpty() ) return;
+ slotFileChosen( dest.isLocalFile() ? dest.path() : dest.url() );
+}
diff --git a/konq-plugins/kuick/kmetamenu.h b/konq-plugins/kuick/kmetamenu.h
new file mode 100644
index 0000000..f6670f6
--- /dev/null
+++ b/konq-plugins/kuick/kmetamenu.h
@@ -0,0 +1,67 @@
+/* This file is part of the KDE project
+ Copyright (C) 2001 Holger Freyther <freyther@yahoo.com>
+
+ 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 the Free Software Foundation; version 2
+ of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef _kmetamenu_h
+#define _kmetamenu_h
+
+#include <qpopupmenu.h>
+#include <qptrlist.h>
+
+#include <kaction.h>
+
+class QIconSet;
+class QStringList;
+class KConfig;
+class KDirMenu;
+class KIMContactMenu;
+class KIMProxy;
+class KURL;
+
+class KMetaMenu : public QPopupMenu {
+ Q_OBJECT
+public:
+
+ KMetaMenu( QWidget *parent, const KURL &url, const QString &text,
+ const QString &key, KIMProxy * imProxy = 0L );
+ KMetaMenu();
+ ~KMetaMenu();
+ void writeConfig( const QString &path );
+public slots:
+ void slotFileChosen( const QString &path);
+ void slotFastPath( );
+ void slotBrowse( );
+signals:
+ void fileChosen( const QString &path );
+ void contactChosen( const QString &uid );
+private:
+ KDirMenu *m_root;
+ KDirMenu *m_home;
+ KDirMenu *m_etc;
+ KDirMenu *m_current;
+ KIMContactMenu *m_contacts;
+ KIMProxy *m_proxy;
+ KAction *m_browse;
+ QStringList list;
+ KConfig *conf;
+ QString group;
+ QPtrList<KAction> actions;
+};
+
+#endif
+
diff --git a/konq-plugins/kuick/kuick_plugin.cpp b/konq-plugins/kuick/kuick_plugin.cpp
new file mode 100644
index 0000000..80a7cc7
--- /dev/null
+++ b/konq-plugins/kuick/kuick_plugin.cpp
@@ -0,0 +1,114 @@
+/* This file is part of the KDE project
+ Copyright (C) 2001 Holger Freyther <freyther@yahoo.com>
+
+ 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 the Free Software Foundation; version 2
+ of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "kuick_plugin.h"
+#include "kuick_plugin.moc"
+#include "kdirmenu.h"
+
+#include <kapplication.h>
+#include <kaction.h>
+#include <kinstance.h>
+#include <kiconloader.h>
+#include <kimproxy.h>
+#include <klocale.h>
+#include <konq_popupmenu.h>
+#include <kmessagebox.h>
+#include <kgenericfactory.h>
+#include <qobject.h>
+#include <kio/jobclasses.h>
+#include <kio/job.h>
+#include <kurl.h>
+
+typedef KGenericFactory<KTestMenu, KonqPopupMenu> KTestMenuFactory;
+K_EXPORT_COMPONENT_FACTORY( libkuickplugin, KTestMenuFactory("kuick_plugin") )
+
+KTestMenu::KTestMenu( KonqPopupMenu *popupmenu, const char *name, const QStringList& /*list*/ ) : KonqPopupMenuPlugin( popupmenu, name) {
+ popup= popupmenu ;
+ meta_copy_mmu = 0L;
+ meta_move_mmu = 0L;
+ my_action = new KAction( "kuick_plugin", 0, this, SLOT( slotPopupMaeh( ) ), actionCollection( ), "Do some funky stuff" );
+ addAction( my_action );
+ addSeparator();
+ //popupmenu->addMerge();
+ connect( popup, SIGNAL(aboutToShow() ), this, SLOT(slotPrepareMenu( ) ) );
+ m_imProxy = KIMProxy::instance( kapp->dcopClient() );
+}
+KTestMenu::~KTestMenu( ){
+ delete meta_copy_mmu;
+ delete meta_move_mmu;
+}
+void KTestMenu::slotPopupMaeh( ){
+
+}
+void KTestMenu::slotStartCopyJob( const QString &path ) {
+ KURL url = KURL::fromPathOrURL( path );
+ KIO::CopyJob *copy;
+ copy = KIO::copy( popup->popupURLList(), url);
+ copy->setAutoErrorHandlingEnabled( true );
+}
+void KTestMenu::slotStartMoveJob( const QString &path) {
+ KURL url = KURL::fromPathOrURL( path );
+ KIO::CopyJob *move;
+ move = KIO::move( popup->popupURLList(), url );
+ move->setAutoErrorHandlingEnabled( true );
+}
+
+void KTestMenu::slotFileTransfer( const QString &uid ) {
+ m_imProxy->sendFile( uid, popup->popupURLList().first() );
+}
+
+void KTestMenu::slotPrepareMenu( ) { // now it's time to set up the menu...
+// search for the dummy entry 'kuick_plugin' stores it index reomev it plug copy at the position
+ KGlobal::locale()->insertCatalogue("kuick_plugin");
+
+ bool isKDesktop = QCString( kapp->name() ) == "kdesktop";
+
+ for(int i= popup->count(); i >=1; i--) {
+ int id = popup->idAt( i );
+ QString text = popup->text( id );
+ if( text.contains("kuick_plugin") ) {
+ popup->removeItem( id );
+ if (isKDesktop && !kapp->authorize("editable_desktop_icons"))
+ {
+ // Remove seperator as well
+ id = popup->idAt( i-1 );
+ if (popup->text( id ).isEmpty())
+ popup->removeItem( id );
+ break;
+ }
+ meta_copy_mmu = new KMetaMenu(popup, popup->url(),
+ i18n("&Copy Here") , "kuick-copy", m_imProxy );
+ popup->insertItem(i18n("Copy To"), meta_copy_mmu, -1, i );
+ connect( meta_copy_mmu, SIGNAL(fileChosen(const QString &) ),
+ SLOT(slotStartCopyJob(const QString & )) );
+
+ connect( meta_copy_mmu, SIGNAL( contactChosen( const QString & ) ),
+ SLOT( slotFileTransfer( const QString & )) );
+
+ if( popup->protocolInfo().supportsMoving() ){
+ meta_move_mmu = new KMetaMenu(popup, popup->url(),
+ i18n("&Move Here"), "kuick-move");
+ popup->insertItem(i18n("Move To"), meta_move_mmu, -1, i+1 );
+ connect( meta_move_mmu, SIGNAL(fileChosen(const QString &) ),
+ SLOT(slotStartMoveJob(const QString & )) );
+ }
+ break;
+ }
+ }
+}
diff --git a/konq-plugins/kuick/kuick_plugin.desktop b/konq-plugins/kuick/kuick_plugin.desktop
new file mode 100644
index 0000000..41138df
--- /dev/null
+++ b/konq-plugins/kuick/kuick_plugin.desktop
@@ -0,0 +1,67 @@
+[Desktop Entry]
+Type=Service
+Name=Kuick Copy and Move
+Name[af]=Vinnige Kopie en Beweeg
+Name[az]=Kuik Köçür və Daşı
+Name[bg]=Бързо копиране и преместване
+Name[bs]=Kuick kopiranje i premještanje
+Name[ca]=Kuick copia i mou
+Name[cs]=Rychlé kopírování a přesouvání
+Name[cy]=Copïo a Symud Kuick
+Name[da]=Kuick kopiér & flyt
+Name[de]=Kuick - Kopieren und Verschieben
+Name[el]=Γρήγορη αντιγραφή και μετακίνηση
+Name[eo]=Rapidkopiilo
+Name[es]=Movimiento y copiado rápido
+Name[et]=Kuicki kopeerimine ja liigutamine
+Name[eu]=Kuick kopiatu eta mugitu
+Name[fa]=رونوشت و حرکت Kuick
+Name[fi]=Nopea kopiointi ja siirto
+Name[fr]=Copie et déplacement rapides
+Name[fy]=Kuick Kopiearje en Ferpleatse
+Name[gl]=Copiar e Mover Rapidamente
+Name[he]=העתקה והעברה מהירה
+Name[hi]=क्विक नक़ल तथा खिसकाना
+Name[hr]=KBrzo kopiranje i premještanje
+Name[hu]=Kuick - másolás és mozgatás
+Name[it]=Copia e spostamento rapidi
+Name[ja]=高速コピー & 移動
+Name[ka]=Kuick ასლი და გადატანა
+Name[kk]=Kuick көшірмелеу мен жылжыту
+Name[km]=Kuick ចម្លង ​និង​ផ្លាស់ទី
+Name[lt]=Kuick kopijavimas ir perkėlimas
+Name[lv]=Kuick Kopēšana un Pārvietošana
+Name[mk]=Kuick копирање и преместување
+Name[ms]=Salin Kuick dan Alih
+Name[nb]=Kuick kopier og flytt
+Name[nds]=Kuick - Koperen un Verschuven
+Name[ne]=छिटो प्रतिलिपि गर्नुहोस् र सार्नुहोस्
+Name[nl]=Kuick Kopiëren en Verplaatsen
+Name[nn]=Snøggkopi-og-flytt
+Name[nso]=Tshutiso le Kgatiso ya Kuick
+Name[pl]=Szybkie kopiowanie i przesuwanie
+Name[pt]=Cópia e Mudança Rápida
+Name[pt_BR]=Lançador rápido
+Name[ro]=Mutare şi copiere Kuick
+Name[ru]=Быстрое копирование
+Name[sk]=Kuick Kopírovanie a Presun
+Name[sl]=Kopiranje in premikanje Kuick
+Name[sr]=Kuick, копирај и премести
+Name[sr@Latn]=Kuick, kopiraj i premesti
+Name[sv]=Snabbkopiera och -flytta
+Name[ta]=விரைவான நகல் எடு மற்றும் நகர்த்து
+Name[tg]=Нусхаи тез - Kuick
+Name[th]=คัดลอกและย้ายอย่างรวดเร็ว
+Name[tr]=Hızlı Kopyalama ve Taşıma
+Name[uk]=Kuick копіювання та пересування
+Name[uz]=Tez nusxa olish va koʻchirish
+Name[uz@cyrillic]=Тез нусха олиш ва кўчириш
+Name[ven]=Kuick khophi na u tshimbila
+Name[vi]=Sao chép và di chuyển Kuick
+Name[xh]=Ukhuphelo noHambiso lweKuick
+Name[zh_CN]=快速复制和移动
+Name[zh_TW]=Kuick 複製與移動
+Name[zu]=Kuick Khiphela futhi Ususe
+Icon=kmultiple
+X-KDE-Library=libkuickplugin
+ServiceTypes=KonqPopupMenu/Plugin,all/all
diff --git a/konq-plugins/kuick/kuick_plugin.h b/konq-plugins/kuick/kuick_plugin.h
new file mode 100644
index 0000000..15ffdcd
--- /dev/null
+++ b/konq-plugins/kuick/kuick_plugin.h
@@ -0,0 +1,54 @@
+/* This file is part of the KDE project
+ Copyright (C) 2001 Holger Freyther <freyther@yahoo.com>
+
+ 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 the Free Software Foundation; version 2
+ of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef _PLUGIN_TEST_H_
+#define _PLUGIN_TEST_H_
+
+#include <konq_popupmenu.h>
+
+#include "kmetamenu.h"
+
+class KAction;
+class KURL;
+class KTestMenu : public KonqPopupMenuPlugin {
+ Q_OBJECT
+public:
+ KTestMenu (KonqPopupMenu *, const char *name, const QStringList &list);
+ virtual ~KTestMenu( );
+ KMetaMenu *meta_copy_mmu;
+ KMetaMenu *meta_move_mmu;
+ KonqPopupMenu *popup;
+
+private:
+ KAction *my_action;
+ KIMProxy *m_imProxy;
+
+public slots:
+ void slotPopupMaeh( );
+ void slotStartCopyJob(const QString &path );
+ //void slotStartCopyJob(const KURL &url );
+ void slotStartMoveJob(const QString &path );
+ //void slotStartMoveJob(const KURL &url );
+ void slotFileTransfer( const QString &uid );
+ void slotPrepareMenu( );
+};
+
+
+#endif
+
diff --git a/konq-plugins/kuick/kuickplugin.desktop b/konq-plugins/kuick/kuickplugin.desktop
new file mode 100644
index 0000000..da4b262
--- /dev/null
+++ b/konq-plugins/kuick/kuickplugin.desktop
@@ -0,0 +1,66 @@
+[Desktop Entry]
+Name=Kuick Copy and Move
+Name[af]=Vinnige Kopie en Beweeg
+Name[az]=Kuik Köçür və Daşı
+Name[bg]=Бързо копиране и преместване
+Name[bs]=Kuick kopiranje i premještanje
+Name[ca]=Kuick copia i mou
+Name[cs]=Rychlé kopírování a přesouvání
+Name[cy]=Copïo a Symud Kuick
+Name[da]=Kuick kopiér & flyt
+Name[de]=Kuick - Kopieren und Verschieben
+Name[el]=Γρήγορη αντιγραφή και μετακίνηση
+Name[eo]=Rapidkopiilo
+Name[es]=Movimiento y copiado rápido
+Name[et]=Kuicki kopeerimine ja liigutamine
+Name[eu]=Kuick kopiatu eta mugitu
+Name[fa]=رونوشت و حرکت Kuick
+Name[fi]=Nopea kopiointi ja siirto
+Name[fr]=Copie et déplacement rapides
+Name[fy]=Kuick Kopiearje en Ferpleatse
+Name[gl]=Copiar e Mover Rapidamente
+Name[he]=העתקה והעברה מהירה
+Name[hi]=क्विक नक़ल तथा खिसकाना
+Name[hr]=KBrzo kopiranje i premještanje
+Name[hu]=Kuick - másolás és mozgatás
+Name[it]=Copia e spostamento rapidi
+Name[ja]=高速コピー & 移動
+Name[ka]=Kuick ასლი და გადატანა
+Name[kk]=Kuick көшірмелеу мен жылжыту
+Name[km]=Kuick ចម្លង ​និង​ផ្លាស់ទី
+Name[lt]=Kuick kopijavimas ir perkėlimas
+Name[lv]=Kuick Kopēšana un Pārvietošana
+Name[mk]=Kuick копирање и преместување
+Name[ms]=Salin Kuick dan Alih
+Name[nb]=Kuick kopier og flytt
+Name[nds]=Kuick - Koperen un Verschuven
+Name[ne]=छिटो प्रतिलिपि गर्नुहोस् र सार्नुहोस्
+Name[nl]=Kuick Kopiëren en Verplaatsen
+Name[nn]=Snøggkopi-og-flytt
+Name[nso]=Tshutiso le Kgatiso ya Kuick
+Name[pl]=Szybkie kopiowanie i przesuwanie
+Name[pt]=Cópia e Mudança Rápida
+Name[pt_BR]=Lançador rápido
+Name[ro]=Mutare şi copiere Kuick
+Name[ru]=Быстрое копирование
+Name[sk]=Kuick Kopírovanie a Presun
+Name[sl]=Kopiranje in premikanje Kuick
+Name[sr]=Kuick, копирај и премести
+Name[sr@Latn]=Kuick, kopiraj i premesti
+Name[sv]=Snabbkopiera och -flytta
+Name[ta]=விரைவான நகல் எடு மற்றும் நகர்த்து
+Name[tg]=Нусхаи тез - Kuick
+Name[th]=คัดลอกและย้ายอย่างรวดเร็ว
+Name[tr]=Hızlı Kopyalama ve Taşıma
+Name[uk]=Kuick копіювання та пересування
+Name[uz]=Tez nusxa olish va koʻchirish
+Name[uz@cyrillic]=Тез нусха олиш ва кўчириш
+Name[ven]=Kuick khophi na u tshimbila
+Name[vi]=Sao chép và di chuyển Kuick
+Name[xh]=Ukhuphelo noHambiso lweKuick
+Name[zh_CN]=快速复制和移动
+Name[zh_TW]=Kuick 複製與移動
+Name[zu]=Kuick Khiphela futhi Ususe
+Icon=kmultiple
+X-KDE-ParentApp=konqueror
+DocPath=konq-plugins/kuick/index.html