summaryrefslogtreecommitdiffstats
path: root/kicker/menuext/konq-profiles
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
commit4aed2c8219774f5d797760606b8489a92ddc5163 (patch)
tree3f8c130f7d269626bf6a9447407ef6c35954426a /kicker/menuext/konq-profiles
downloadtdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz
tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.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/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kicker/menuext/konq-profiles')
-rw-r--r--kicker/menuext/konq-profiles/Makefile.am15
-rw-r--r--kicker/menuext/konq-profiles/konquerormenu.desktop136
-rw-r--r--kicker/menuext/konq-profiles/konqy_menu.cpp102
-rw-r--r--kicker/menuext/konq-profiles/konqy_menu.h50
4 files changed, 303 insertions, 0 deletions
diff --git a/kicker/menuext/konq-profiles/Makefile.am b/kicker/menuext/konq-profiles/Makefile.am
new file mode 100644
index 000000000..07df8f9ab
--- /dev/null
+++ b/kicker/menuext/konq-profiles/Makefile.am
@@ -0,0 +1,15 @@
+INCLUDES = $(all_includes)
+
+kde_module_LTLIBRARIES = kickermenu_konqueror.la
+
+kickermenu_konqueror_la_SOURCES = konqy_menu.cpp
+kickermenu_konqueror_la_LDFLAGS = $(all_libraries) -module -avoid-version
+kickermenu_konqueror_la_LIBADD = $(LIB_KDEUI) $(LIB_KIO)
+
+kickermenu_konqueror_la_METASOURCES = AUTO
+
+desktopmenu_DATA = konquerormenu.desktop
+desktopmenudir = $(kde_datadir)/kicker/menuext
+
+messages:
+ $(XGETTEXT) *.cpp -o $(podir)/libkickermenu_konqueror.pot
diff --git a/kicker/menuext/konq-profiles/konquerormenu.desktop b/kicker/menuext/konq-profiles/konquerormenu.desktop
new file mode 100644
index 000000000..e051239b5
--- /dev/null
+++ b/kicker/menuext/konq-profiles/konquerormenu.desktop
@@ -0,0 +1,136 @@
+[Desktop Entry]
+Name=Konqueror Profiles
+Name[af]=Konqueror Profiele
+Name[ar]=مواصفات في Konqueror
+Name[az]=Konqueror Profilləri
+Name[be]=Профілі Konqueror
+Name[bg]=Профили на браузъра
+Name[bn]=কংকরার প্রোফাইল
+Name[br]=Profiloù Konqueror
+Name[bs]=Konqueror profili
+Name[ca]=Perfils de Konqueror
+Name[cs]=Profily Konqueroru
+Name[csb]=Profile Konquerora
+Name[cy]=Proffilau Konqueror
+Name[da]=Konqueror-profiler
+Name[de]=Konqueror-Profile
+Name[el]=Προφίλ του Konqueror
+Name[eo]=Konkerantaj Profiloj
+Name[es]=Perfiles de Konqueror
+Name[et]=Konquerori profiilid
+Name[eu]=Konquerorren profilak
+Name[fa]=Profileهای Konqueror
+Name[fi]=Konquerorin profiilit
+Name[fr]=Profils de Konqueror
+Name[fy]=Konqueror-profielen
+Name[ga]=Próifílí Konqueror
+Name[gl]=Perfis de Konqueror
+Name[he]=פרופילים של Konqueror
+Name[hi]=कॉन्करर प्रोफ़ाइल्स
+Name[hr]=Konqueror profili
+Name[hu]=Konqueror-profilok
+Name[is]=Konqueror sniðmát
+Name[it]=Profili di Konqueror
+Name[ja]=Konqueror プロファイル
+Name[ka]=Konqueror-ის პროფილები
+Name[kk]=Konqueror профильдер
+Name[km]=ទម្រង់ Konqueror
+Name[ko]=Konqueror 제스처
+Name[lt]=Konqueror profiliai
+Name[lv]=Iekarotāja profili
+Name[mk]=Профили за Konqueror
+Name[ms]=Profil Konqueror
+Name[mt]=Profili ta' Konqueror
+Name[nb]=Profiler for Konqueror
+Name[nds]=Konqueror-Profilen
+Name[ne]=कन्क्वेरर प्रोफाइल
+Name[nl]=Konqueror-profielen
+Name[nn]=Profilar for Konqueror
+Name[pa]=ਕੋਨਕਿਉਰੋਰ ਪਰੋਫਾਇਲ
+Name[pl]=Profile Konquerora
+Name[pt]=Perfis do Konqueror
+Name[pt_BR]=Perfis do Konqueror
+Name[ro]=Profile Konqueror
+Name[ru]=Профили Konqueror
+Name[rw]=Ibijyana na Konqueror
+Name[se]=Konqueror-profiillat
+Name[sk]=Profily pre Konqueror
+Name[sl]=Profili Konquerorja
+Name[sr]=Konqueror-ови профили
+Name[sr@Latn]=Konqueror-ovi profili
+Name[sv]=Konqueror-profiler
+Name[ta]=Konqueror விவரக்குறிப்புகள்
+Name[te]=కాంకెరర్ ప్రొఫైల్లు
+Name[th]=โปรไฟล์ของคอนเควอร์เรอร์
+Name[tr]=Konqueror Profilleri
+Name[tt]=Konqueror Caybireme
+Name[uk]=Профілі Konqueror
+Name[uz]=Konqueror profillari
+Name[uz@cyrillic]=Konqueror профиллари
+Name[vi]=Thông số Konqueror
+Name[wa]=Profils Konqueror
+Name[zh_CN]=Konqueror 配置文件
+Name[zh_TW]=Konqueror 設定組合
+Comment=Menu for accessing the Konqueror profiles
+Comment[af]=Kieslys om toegang tot die Konqueror profiele te verkry
+Comment[ar]=قائمة للوصول إلى مواصفات في Konqueror
+Comment[be]=Меню для доступу да профіляў Konqueror
+Comment[bg]=Меню за достъп до профилите на браузъра
+Comment[bn]=সহজে বিভিন্ন কংকরার প্রোফাইল খোলার জন্য মেনু
+Comment[bs]=Meni za pristup do profila Konquerora
+Comment[ca]=Menú per accedir als perfils Konqueror
+Comment[cs]=Přístup k profilům Konqueroru
+Comment[csb]=Menu przistãpù do profilów Konquerora
+Comment[da]=Menu for adgang til Konquerors profiler
+Comment[de]=Vereinfachter Zugang zu den Konqueror-Profilen
+Comment[el]=Μενού πρόσβασης στα προφίλ του Konqueror
+Comment[eo]=Menuo por atingi Konkerantajn profilojn
+Comment[es]=Menú para acceder a los perfiles de Konqueror
+Comment[et]=Menüü Konquerori profiilide kasutamiseks
+Comment[eu]=Konqueror profilak atzitzeko menua
+Comment[fa]=گزینگان برای دستیابی به profileهای Konqueror
+Comment[fi]=Valikko Konquerorin profiileille
+Comment[fr]=Menu d'accès aux profils de Konqueror
+Comment[fy]=Menu foar tagong ta de Konqueror-profielen
+Comment[gl]=Aceso doado aos perfis de Konqueror
+Comment[he]=תפריט גישה לפרופילים של Konqueror
+Comment[hr]=Izbornik za pristupanje Konqueror profilima
+Comment[hu]=Menü a Konqueror profiljainak eléréséhez
+Comment[is]=Einföld leið að sniðmátum Konqueror
+Comment[it]=Menu per accedere ai profili di Konqueror
+Comment[ja]=Konqueror プロファイルにアクセスするためのメニュー
+Comment[ka]=Konqueror-ის პროფილების წვდომის მენიუ
+Comment[kk]=Konqueror профильдеріне қатынау мәзірі
+Comment[km]=ម៉ឺនុយ​សម្រាប់​ចូល​ដំណើរការ​ទម្រង់​របស់ Konqueror
+Comment[lt]=Konqueror profilių pasiekimo meniu
+Comment[mk]=Мени за пристапување до профилите на Konqueror
+Comment[nb]=Meny for Konquerors profiler
+Comment[nds]=Menü för Konqueror sien Profilen
+Comment[ne]=कन्क्वेरर प्रोफाइल पहुँचका लागि मेनु
+Comment[nl]=Menu voor toegang tot de Konqueror-profielen
+Comment[nn]=Meny for Konqueror-profilane
+Comment[pa]=ਕੋਨਕਿਉਰੋਰ ਪਰੋਫਾਇਲ ਲਈ ਸੌਖੀ ਪਹੁੰਚ ਲਈ ਮੇਨੂ
+Comment[pl]=Menu dostępu do profili Konquerora
+Comment[pt]=Um menu para aceder aos perfis do Konqueror
+Comment[pt_BR]=Acesso fácil aos perfis do Konqueror
+Comment[ro]=Meniu pentru accesul profilelor Konqueror
+Comment[ru]=Быстрый доступ к профилям Konqueror
+Comment[se]=Fállu mii čájeha Konqueror-profiillaid
+Comment[sk]=Menu pre prístup k profilom pre Konqueror
+Comment[sl]=Meni za dostop do profilov Konquerorja
+Comment[sr]=Мени за приступ Konqueror-овим профилима
+Comment[sr@Latn]=Meni za pristup Konqueror-ovim profilima
+Comment[sv]=Meny för att komma åt Konquerors profiler
+Comment[te]=కాంకెరర్ ప్రొఫైల్లు చూసెందుకు కొరకు పట్టి
+Comment[th]=เมนูสำหรับเข้าใช้โปรไฟล์ของคอนเควอร์เรอร์วดเร็ว
+Comment[tr]=Konqueror profillerine kolay erişim menüsü
+Comment[uk]=Меню для доступу до профілів Konqueror
+Comment[uz]=Konqueror profillarining menyusi
+Comment[uz@cyrillic]=Konqueror профилларининг менюси
+Comment[vi]=Thực đơn truy cập đến các thông số của Konqueror
+Comment[wa]=Dressêye poz aveur accès ås profils di Konqueror
+Comment[zh_CN]=访问 Konqueror 配置文件的菜单
+Comment[zh_TW]=方便存取 Konqueror 設定組合的選單
+Icon=konqueror
+
+X-KDE-Library=kickermenu_konqueror
diff --git a/kicker/menuext/konq-profiles/konqy_menu.cpp b/kicker/menuext/konq-profiles/konqy_menu.cpp
new file mode 100644
index 000000000..3ac09e050
--- /dev/null
+++ b/kicker/menuext/konq-profiles/konqy_menu.cpp
@@ -0,0 +1,102 @@
+/*****************************************************************
+
+Copyright (c) 1996-2001 the kicker authors. See file AUTHORS.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+******************************************************************/
+
+#include "konqy_menu.h"
+#include <kiconloader.h>
+#include <klocale.h>
+#include <kglobal.h>
+#include <kapplication.h>
+#include <krun.h>
+#include <kstandarddirs.h>
+#include <kio/global.h>
+#include <ksimpleconfig.h>
+
+#include <qregexp.h>
+#include <qfileinfo.h>
+
+K_EXPORT_KICKER_MENUEXT(konqueror, KonquerorProfilesMenu)
+
+KonquerorProfilesMenu::KonquerorProfilesMenu(QWidget *parent, const char *name, const QStringList & /*args*/)
+: KPanelMenu("", parent, name)
+{
+ static bool kdeprintIconsInitialized = false;
+ if ( !kdeprintIconsInitialized ) {
+ KGlobal::iconLoader()->addAppDir("kdeprint");
+ kdeprintIconsInitialized = true;
+ }
+}
+
+KonquerorProfilesMenu::~KonquerorProfilesMenu()
+{
+}
+
+void KonquerorProfilesMenu::initialize()
+{
+ if (initialized()) clear();
+ setInitialized(true);
+
+ QStringList profiles = KGlobal::dirs()->findAllResources( "data", "konqueror/profiles/*", false, true );
+
+ m_profiles.resize(profiles.count());
+ int id=1;
+ QStringList::ConstIterator pEnd = profiles.end();
+ for (QStringList::ConstIterator pIt = profiles.begin(); pIt != pEnd; ++pIt )
+ {
+ QFileInfo info( *pIt );
+ QString profileName = KIO::decodeFileName( info.baseName() );
+ QString niceName=profileName;
+ KSimpleConfig cfg( *pIt, true );
+ if ( cfg.hasGroup( "Profile" ) )
+ {
+ cfg.setGroup( "Profile" );
+ if ( cfg.hasKey( "Name" ) )
+ niceName = cfg.readEntry( "Name" );
+
+ insertItem(niceName, id);
+ m_profiles[id-1]=profileName;
+ id++;
+ }
+ }
+}
+
+void KonquerorProfilesMenu::slotExec(int id)
+{
+ QStringList args;
+ args<<"--profile"<<m_profiles[id-1];
+ kapp->kdeinitExec("konqueror", args);
+}
+
+void KonquerorProfilesMenu::reload()
+{
+ initialize();
+}
+
+void KonquerorProfilesMenu::slotAboutToShow()
+{
+ reinitialize();
+ KPanelMenu::slotAboutToShow();
+}
+
+
+#include "konqy_menu.moc"
+
diff --git a/kicker/menuext/konq-profiles/konqy_menu.h b/kicker/menuext/konq-profiles/konqy_menu.h
new file mode 100644
index 000000000..f47b026ee
--- /dev/null
+++ b/kicker/menuext/konq-profiles/konqy_menu.h
@@ -0,0 +1,50 @@
+/*****************************************************************
+
+Copyright (c) 1996-2001 the kicker authors. See file AUTHORS.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+******************************************************************/
+
+#ifndef _konqy_menu_h_
+#define _konqy_menu_h_
+
+#include <kpanelmenu.h>
+
+#include <qvaluevector.h>
+
+class KonquerorProfilesMenu : public KPanelMenu
+{
+ Q_OBJECT
+
+ public:
+ KonquerorProfilesMenu(QWidget *parent, const char *name, const QStringList & /*args*/);
+ ~KonquerorProfilesMenu();
+
+ protected slots:
+ void slotExec(int id);
+ void initialize();
+ void slotAboutToShow();
+
+ protected:
+ void reload();
+ QValueVector<QString> m_profiles;
+
+};
+
+#endif