From a05d8d023721a0e3230d0ad2a512ac669525ed31 Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Tue, 20 Dec 2011 12:31:55 +0100 Subject: [PATCH 1/4] use the dialog's current position if not moving widgets/.pushbutton.h.swp --- popupapplet.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/popupapplet.cpp b/popupapplet.cpp index dd983fd21..9064f812b 100644 --- a/popupapplet.cpp +++ b/popupapplet.cpp @@ -922,15 +922,14 @@ void PopupAppletPrivate::updateDialogPosition(bool move) const QPoint appletPos = view->mapToGlobal(view->mapFromScene(q->scenePos())); - QPoint dialogPos; - if (!q->containment() || view == q->containment()->view()) { - kDebug() << "requesting with" << q->scenePos(); - dialogPos = corona->popupPosition(q, dialog->size(), popupAlignment); - } else { - kDebug() << "requesting with" << q->parentItem(); - dialogPos = corona->popupPosition(q->parentItem(), dialog->size(), popupAlignment); + QPoint dialogPos = dialog->pos(); + if (move) { + if (!q->containment() || view == q->containment()->view()) { + dialogPos = corona->popupPosition(q, dialog->size(), popupAlignment); + } else { + dialogPos = corona->popupPosition(q->parentItem(), dialog->size(), popupAlignment); + } } - kDebug() << "dialog position is" << dialogPos <<" with location" << q->location() << "<<<<<<<<<<<<<<<<<<<<<<<<"; bool reverse = false; if (q->formFactor() == Plasma::Vertical) { From e01191b409ac0916522b68692c78d1b4f5e4a27e Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Wed, 21 Dec 2011 09:59:40 +0100 Subject: [PATCH 2/4] SVN_SILENT made messages (.desktop file) --- data/services/plasma.protocol | 3 ++- data/servicetypes/plasma-dataengine.desktop | 2 +- data/servicetypes/plasma-runner.desktop | 1 + tests/packagemetadatatest.desktop | 2 +- .../plasma-containmentactions-test.desktop | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/data/services/plasma.protocol b/data/services/plasma.protocol index c3ae0d68b..dd9f2242b 100644 --- a/data/services/plasma.protocol +++ b/data/services/plasma.protocol @@ -7,6 +7,7 @@ output=none Icon=plasma Description=A protocol for Plasma services +Description[bg]=Протокол за услуги Plasma Description[bs]=Protokol Plazma usluga Description[ca]=Un protocol pels serveis del Plasma Description[ca@valencia]=Un protocol pels serveis del Plasma @@ -19,6 +20,7 @@ Description[et]=Plasma teenuste protokoll Description[eu]=Plasma zerbitzuentzako protokolo bat Description[fi]=Plasma-palvelujen yhteyskäytäntö Description[fr]=Un protocole pour les services Plasma +Description[gl]=Un protocolo para servizos do Plasma Description[hr]=Protokol za servise u Plasmi Description[hu]=Protokoll a Plazma-szolgáltatáshoz Description[ia]=un protocollo per servicios de Plasma @@ -45,7 +47,6 @@ Description[sr@ijekavian]=Протокол за плазма сервисе Description[sr@ijekavianlatin]=Protokol za plasma servise Description[sr@latin]=Protokol za plasma servise Description[sv]=Ett protokoll för Plasma-tjänster -Description[th]=โพรโทคอลสำหรับใช้กับบริการของพลาสมา Description[tr]=Plasma servisleri için bir protokol Description[ug]=پلازما(Plasma) مۇلازىمىتىنىڭ كېلىشىمى Description[uk]=Протокол для служб Плазми diff --git a/data/servicetypes/plasma-dataengine.desktop b/data/servicetypes/plasma-dataengine.desktop index ab82e66a3..b4da43ed3 100644 --- a/data/servicetypes/plasma-dataengine.desktop +++ b/data/servicetypes/plasma-dataengine.desktop @@ -71,7 +71,7 @@ Comment[ta]=பிளாஸ்மா தரவு இயந்திரம் Comment[tg]=Системаи маълумотии Plasma Comment[th]=กลไกข้อมูลของพลาสมา Comment[tr]=Plasma Veri Motoru -Comment[ug]=Plasma سانلىق-مەلۇمات ماتورى +Comment[ug]=Plasma سانلىق مەلۇمات ماتورى Comment[uk]=Рушій даних Плазми Comment[wa]=Moteur di dnêyes di Plasma Comment[x-test]=xxPlasma Data Enginexx diff --git a/data/servicetypes/plasma-runner.desktop b/data/servicetypes/plasma-runner.desktop index 79148221f..7179c3090 100644 --- a/data/servicetypes/plasma-runner.desktop +++ b/data/servicetypes/plasma-runner.desktop @@ -22,6 +22,7 @@ Comment[en_GB]=KRunner plugin Comment[es]=Complemento para KRunner Comment[et]=KRunneri plugin Comment[eu]=KRnner plugin-a +Comment[fa]=وصله KRunner Comment[fi]=KRunner-liitännäinen Comment[fr]=Module KRunner Comment[fy]=KRunner plugin diff --git a/tests/packagemetadatatest.desktop b/tests/packagemetadatatest.desktop index 069943718..a0f785460 100644 --- a/tests/packagemetadatatest.desktop +++ b/tests/packagemetadatatest.desktop @@ -64,7 +64,7 @@ Name[ta]=பொதியின் மூலத்தரவு சோதனைக Name[tg]=Файли санҷишии стсетмаи metadata Name[th]=แฟ้มทดสอบข้อมูลกำกับแพกเกจ Name[tr]=Paket metadata test dosyası -Name[ug]=بوغچا مېتا سانلىق-مەلۇمات سىناق ھۆججەت +Name[ug]=بوغچا مېتا سانلىق مەلۇمات سىناق ھۆججەت Name[uk]=Файл перевірки метаданих пакунка Name[wa]=Fitchî d' asprouvaedje des meta-dnêyes do pacaedje Name[x-test]=xxPackage metadata test filexx diff --git a/tests/testcontainmentactionsplugin/plasma-containmentactions-test.desktop b/tests/testcontainmentactionsplugin/plasma-containmentactions-test.desktop index 87582b8d9..b5ca8e01e 100644 --- a/tests/testcontainmentactionsplugin/plasma-containmentactions-test.desktop +++ b/tests/testcontainmentactionsplugin/plasma-containmentactions-test.desktop @@ -47,7 +47,7 @@ Name[sr@latin]=Proba Name[sv]=Test Name[th]=ทดสอบ Name[tr]=Deneme -Name[ug]=سىناق +Name[ug]=سىنا Name[uk]=Тест Name[wa]=Sayî Name[x-test]=xxTestxx From f8c1d76547c9f24da52dca93b38a69c8f8481095 Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Thu, 22 Dec 2011 11:44:55 +0100 Subject: [PATCH 3/4] SVN_SILENT made messages (.desktop file) --- data/services/plasma-applet-extenderapplet.desktop | 1 + data/services/plasma.protocol | 1 + data/servicetypes/plasma-animator.desktop | 1 + data/servicetypes/plasma-applet.desktop | 1 + data/servicetypes/plasma-dataengine.desktop | 1 + data/servicetypes/plasma-packagestructure.desktop | 1 + data/servicetypes/plasma-runner.desktop | 1 + data/servicetypes/plasma-scriptengine.desktop | 1 + data/servicetypes/plasma-service.desktop | 1 + data/servicetypes/plasma-toolbox.desktop | 1 + data/servicetypes/plasma-wallpaper.desktop | 1 + tests/packagemetadatatest.desktop | 2 ++ .../plasma-containmentactions-test.desktop | 2 ++ tests/testengine/plasma-dataengine-testengine.desktop | 1 + 14 files changed, 16 insertions(+) diff --git a/data/services/plasma-applet-extenderapplet.desktop b/data/services/plasma-applet-extenderapplet.desktop index 80206dc1f..7df6fa071 100644 --- a/data/services/plasma-applet-extenderapplet.desktop +++ b/data/services/plasma-applet-extenderapplet.desktop @@ -69,6 +69,7 @@ Name[th]=ชุดสะสม Name[tr]=Koleksiyon Name[ug]=توپلام Name[uk]=Збірка +Name[vi]=Bộ sưu tập Name[wa]=Ramexhnêye Name[x-test]=xxCollectionxx Name[zh_CN]=收藏 diff --git a/data/services/plasma.protocol b/data/services/plasma.protocol index dd9f2242b..f95baf84d 100644 --- a/data/services/plasma.protocol +++ b/data/services/plasma.protocol @@ -50,6 +50,7 @@ Description[sv]=Ett protokoll för Plasma-tjänster Description[tr]=Plasma servisleri için bir protokol Description[ug]=پلازما(Plasma) مۇلازىمىتىنىڭ كېلىشىمى Description[uk]=Протокол для служб Плазми +Description[vi]=Một giao thức cho các dịch vụ Plasma Description[x-test]=xxA protocol for Plasma servicesxx Description[zh_CN]=Plasma 服务协议 Description[zh_TW]=Plasma 服務協定 diff --git a/data/servicetypes/plasma-animator.desktop b/data/servicetypes/plasma-animator.desktop index 44fe07ea3..45b475c58 100644 --- a/data/servicetypes/plasma-animator.desktop +++ b/data/servicetypes/plasma-animator.desktop @@ -72,6 +72,7 @@ Comment[th]=กลไกแสดงความเคลื่อนไหว Comment[tr]=Plasma Canlandırma Motoru Comment[ug]=Plasma جانلاندۇرۇم ماتورى Comment[uk]=Рушій анімації Плазми +Comment[vi]=Cơ chế hoạt ảnh Plasma Comment[wa]=Moteur d' animåcion di Plasma Comment[x-test]=xxPlasma Animation Enginexx Comment[zh_CN]=Plasma 动画引擎 diff --git a/data/servicetypes/plasma-applet.desktop b/data/servicetypes/plasma-applet.desktop index ed73c409b..d733d0fe0 100644 --- a/data/servicetypes/plasma-applet.desktop +++ b/data/servicetypes/plasma-applet.desktop @@ -73,6 +73,7 @@ Comment[th]=แอพเพล็ตของพลาสมา Comment[tr]=Plasma programcığı Comment[ug]=Plasma قوللانچاق Comment[uk]=Аплет Плазми +Comment[vi]=Tiểu dụng Plasma Comment[wa]=Aplikete di Plasma Comment[x-test]=xxPlasma appletxx Comment[zh_CN]=Plasma 小程序 diff --git a/data/servicetypes/plasma-dataengine.desktop b/data/servicetypes/plasma-dataengine.desktop index b4da43ed3..13e85544e 100644 --- a/data/servicetypes/plasma-dataengine.desktop +++ b/data/servicetypes/plasma-dataengine.desktop @@ -73,6 +73,7 @@ Comment[th]=กลไกข้อมูลของพลาสมา Comment[tr]=Plasma Veri Motoru Comment[ug]=Plasma سانلىق مەلۇمات ماتورى Comment[uk]=Рушій даних Плазми +Comment[vi]=Cơ chế dữ liệu Plasma Comment[wa]=Moteur di dnêyes di Plasma Comment[x-test]=xxPlasma Data Enginexx Comment[zh_CN]=Plasma 数据引擎 diff --git a/data/servicetypes/plasma-packagestructure.desktop b/data/servicetypes/plasma-packagestructure.desktop index 6fc56ae09..be6d3dca9 100644 --- a/data/servicetypes/plasma-packagestructure.desktop +++ b/data/servicetypes/plasma-packagestructure.desktop @@ -67,6 +67,7 @@ Comment[th]=นิยามโครงสร้างแพกเกจขอ Comment[tr]=Plasma paketi yapı tanımlaması Comment[ug]=Plasma بوغچا قۇرۇلما ئېنىقلىمىسى Comment[uk]=Опис структури пакунка плазми +Comment[vi]=Định nghĩa cấu trúc gói Plasma Comment[wa]=Definixha del sitructeure do pacaedje di Plasma Comment[x-test]=xxPlasma package structure definitionxx Comment[zh_CN]=Plasma 包结构定义 diff --git a/data/servicetypes/plasma-runner.desktop b/data/servicetypes/plasma-runner.desktop index 7179c3090..2ca88a865 100644 --- a/data/servicetypes/plasma-runner.desktop +++ b/data/servicetypes/plasma-runner.desktop @@ -75,6 +75,7 @@ Comment[th]=โปรแกรมเสริมของ KRunner Comment[tr]=KRunner eklentisi Comment[ug]=KRunner قىستۇرما Comment[uk]=Додаток до KRunner +Comment[vi]=Phần bổ sung KRunner Comment[wa]=Tchôke-divins KRunner Comment[x-test]=xxKRunner pluginxx Comment[zh_CN]=KRunner 插件 diff --git a/data/servicetypes/plasma-scriptengine.desktop b/data/servicetypes/plasma-scriptengine.desktop index 97e3210ef..02b7819cf 100644 --- a/data/servicetypes/plasma-scriptengine.desktop +++ b/data/servicetypes/plasma-scriptengine.desktop @@ -70,6 +70,7 @@ Comment[th]=ส่วนเสริมภาษาสคริปต์สำ Comment[tr]=Plasma için betik dili eklentisi Comment[ug]=Plasma نىڭ قوليازما تىل كېڭەيتىلمىسى Comment[uk]=Розширення скриптових мов для Плазми +Comment[vi]=Phần mở rộng ngôn ngữ lệnh cho Plasma Comment[wa]=Rawete di lingaedje di scriptaedje po Plasma Comment[x-test]=xxScripting language extension for Plasmaxx Comment[zh_CN]=Plasma 的脚本语言扩展 diff --git a/data/servicetypes/plasma-service.desktop b/data/servicetypes/plasma-service.desktop index db21604e7..e04e3b437 100644 --- a/data/servicetypes/plasma-service.desktop +++ b/data/servicetypes/plasma-service.desktop @@ -50,6 +50,7 @@ Comment[th]=บริการของพลาสมา Comment[tr]=Plasma servisi Comment[ug]=Plasma مۇلازىمىتى Comment[uk]=Служба Плазми +Comment[vi]=Dịch vụ Plasma Comment[wa]=Siervice di Plasma Comment[x-test]=xxPlasma servicexx Comment[zh_CN]=Plasma 服务 diff --git a/data/servicetypes/plasma-toolbox.desktop b/data/servicetypes/plasma-toolbox.desktop index 92a5bffaa..308ff77e8 100644 --- a/data/servicetypes/plasma-toolbox.desktop +++ b/data/servicetypes/plasma-toolbox.desktop @@ -52,6 +52,7 @@ Comment[th]=กล่องเครื่องมือของพลาส Comment[tr]=Plasma araç kutusu Comment[ug]=Plasma قورال ساندۇقى Comment[uk]=Набір інструментів Плазми +Comment[vi]=Hộp công cụ Plasma Comment[wa]=Boesse ås usteyes di Plasma Comment[x-test]=xxPlasma toolboxxx Comment[zh_CN]=Plasma 工具箱 diff --git a/data/servicetypes/plasma-wallpaper.desktop b/data/servicetypes/plasma-wallpaper.desktop index 09acfeec4..28707a6fd 100644 --- a/data/servicetypes/plasma-wallpaper.desktop +++ b/data/servicetypes/plasma-wallpaper.desktop @@ -71,6 +71,7 @@ Comment[th]=ภาพพื้นหลังของพลาสมา Comment[tr]=Plasma duvar kağıdı Comment[ug]=Plasma تام قەغىزى Comment[uk]=Тло стільниці Плазми +Comment[vi]=Hình nền Plasma Comment[wa]=Tapisreye di Plasma Comment[x-test]=xxPlasma wallpaperxx Comment[zh_CN]=Plasma 壁纸 diff --git a/tests/packagemetadatatest.desktop b/tests/packagemetadatatest.desktop index a0f785460..793f65ca0 100644 --- a/tests/packagemetadatatest.desktop +++ b/tests/packagemetadatatest.desktop @@ -66,6 +66,7 @@ Name[th]=แฟ้มทดสอบข้อมูลกำกับแพก Name[tr]=Paket metadata test dosyası Name[ug]=بوغچا مېتا سانلىق مەلۇمات سىناق ھۆججەت Name[uk]=Файл перевірки метаданих пакунка +Name[vi]=Tập tin kiểm tra dữ liệu lý lịch Plasma Name[wa]=Fitchî d' asprouvaedje des meta-dnêyes do pacaedje Name[x-test]=xxPackage metadata test filexx Name[zh_CN]=工具包元数据测试文件 @@ -137,6 +138,7 @@ Comment[th]=แฟ้มทดสอบพื้นที่ทำงาน ส Comment[tr]=PackageMetaData sınıfını test etmek için bir desktop dosyası. Comment[ug]=PackageMetaData خىلىدىكى سىناشقا ئىشلىتىدىغان desktop تىپىدىكى ھۆججەت. Comment[uk]=Тестовий стільничний файл для перевірки класу PackageMetaData. +Comment[vi]=Một tập tin thử để kiểm tra lớp PackageMetaData. Comment[wa]=On fitchî desktop di saye pos asprouver l' classe PackageMetaData. Comment[x-test]=xxA test desktop file to test the PackageMetaData class.xx Comment[zh_CN]=用于测试 PackageMetaData 类的 desktop 类型文件。 diff --git a/tests/testcontainmentactionsplugin/plasma-containmentactions-test.desktop b/tests/testcontainmentactionsplugin/plasma-containmentactions-test.desktop index b5ca8e01e..6d12204b8 100644 --- a/tests/testcontainmentactionsplugin/plasma-containmentactions-test.desktop +++ b/tests/testcontainmentactionsplugin/plasma-containmentactions-test.desktop @@ -49,6 +49,7 @@ Name[th]=ทดสอบ Name[tr]=Deneme Name[ug]=سىنا Name[uk]=Тест +Name[vi]=Kiểm tra Name[wa]=Sayî Name[x-test]=xxTestxx Name[zh_CN]=测试 @@ -101,6 +102,7 @@ Comment[th]=โปรแกรมเสริมเทียมสำหรั Comment[tr]=Denemek için sahte bir eklenti Comment[ug]=سىناشقا ئىشلىتىدىغان قىستۇرما Comment[uk]=Додаток для тестування +Comment[vi]=Một phần bổ sung giả để kiểm thử Comment[wa]=On fås tchôke-divins po l' asprouvaedje Comment[x-test]=xxA dummy plugin for testingxx Comment[zh_CN]=测试用插件 diff --git a/tests/testengine/plasma-dataengine-testengine.desktop b/tests/testengine/plasma-dataengine-testengine.desktop index 734aadfe6..feadb0ade 100644 --- a/tests/testengine/plasma-dataengine-testengine.desktop +++ b/tests/testengine/plasma-dataengine-testengine.desktop @@ -69,6 +69,7 @@ Name[th]=กลไกทดสอบข้อมูล Name[tr]=Test Veri Motoru Name[ug]=سىناققا ئىشلىتىدىغان ماتور Name[uk]=Перевірка рушія даних +Name[vi]=Cơ chế kiểm tra dữ liệu Name[wa]=Moteur di dnêyes d' asprouvaedje Name[x-test]=xxTest Data Enginexx Name[zh_CN]=测试用数据引擎 From e54737c040ada839b157de2853dd1ac97e1d74fe Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Thu, 22 Dec 2011 13:32:06 +0100 Subject: [PATCH 4/4] promote to public API from protected; needed by desktop scripting --- corona.h | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/corona.h b/corona.h index 3e7b0f311..6152514b7 100644 --- a/corona.h +++ b/corona.h @@ -104,6 +104,27 @@ public: */ Containment *addContainment(const QString &name, const QVariantList &args = QVariantList()); + /** + * Loads a containment with delayed initialization, primarily useful + * for implementations of loadDefaultLayout. The caller is responsible + * for all initializating, saving and notification of a new containment. + * + * @param name the plugin name for the containment, as given by + * KPluginInfo::pluginName(). If an empty string is passed in, the defalt + * containment plugin will be used (usually DesktopContainment). If the + * string literal "null" is passed in, then no plugin will be loaded and + * a simple Containment object will be created instead. + * @param args argument list to pass to the containment + * + * @return a pointer to the containment on success, or 0 on failure. Failure can + * be caused by the Immutability type being too restrictive, as containments can't be added + * when widgets are locked, or if the requested containment plugin can not be located + * or successfully loaded. + * @see addContainment + **/ + Containment *addContainmentDelayed(const QString &name, + const QVariantList &args = QVariantList()); + /** * Returns the Containment, if any, for a given physical screen and desktop * @@ -438,27 +459,6 @@ protected: **/ virtual void loadDefaultLayout(); - /** - * Loads a containment with delayed initialization, primarily useful - * for implementations of loadDefaultLayout. The caller is responsible - * for all initializating, saving and notification of a new containment. - * - * @param name the plugin name for the containment, as given by - * KPluginInfo::pluginName(). If an empty string is passed in, the defalt - * containment plugin will be used (usually DesktopContainment). If the - * string literal "null" is passed in, then no plugin will be loaded and - * a simple Containment object will be created instead. - * @param args argument list to pass to the containment - * - * @return a pointer to the containment on success, or 0 on failure. Failure can - * be caused by the Immutability type being too restrictive, as containments can't be added - * when widgets are locked, or if the requested containment plugin can not be located - * or successfully loaded. - * @see addContainment - **/ - Containment *addContainmentDelayed(const QString &name, - const QVariantList &args = QVariantList()); - /** * Maps a stock animation to one of the semantic animations. Used to control things such * as what animation is used to make a Plasma::Appear appear in a containment.