Главная | Actual Topics | Обратная связь | В избранное | Сделать домашней | Антиспам ;)
 System & Utilities
 Unix News
 OS Emulator
Каталог статей
Все статьи

Биллу Гейтсу тоже предлагают избавиться ...
Вымогательство в борьбе со спамом

May, 2019
Какой из этих ОС Вы отдаете большее предпочтение?

Mac OS
Windows XP
Windows 2003
Что такое ОС? :)

Другие опросы

Всего голосов: 328
Комментарии: 0

Архив Новостей
 May 2019 (6)
 April 2019 (10)
 March 2019 (8)
 February 2019 (11)
 January 2019 (9)
 December 2018 (13)
 November 2018 (7)
 October 2018 (13)
 September 2018 (8)
 August 2018 (8)
 July 2018 (11)
 June 2018 (13)
 May 2018 (10)
 April 2018 (14)
 March 2018 (11)
 February 2018 (13)
 January 2018 (13)
 December 2017 (14)
 November 2017 (15)
 October 2017 (19)
 September 2017 (18)
 August 2017 (13)
 February 2017 (14)
 January 2017 (19)
 December 2016 (16)
 November 2016 (16)
 October 2016 (21)
 September 2016 (18)
 August 2016 (16)
 July 2016 (16)
 June 2016 (20)
 May 2016 (18)
 April 2016 (15)
 March 2016 (22)
 February 2016 (17)
 January 2016 (15)
 December 2015 (15)
 November 2015 (22)
 October 2015 (20)
 September 2015 (17)
 August 2015 (25)
 July 2015 (20)
 June 2015 (23)
 May 2015 (21)
 April 2015 (17)
 March 2015 (19)
 February 2015 (9)
 January 2015 (23)
 December 2014 (9)
 November 2014 (13)
 October 2014 (12)
 September 2014 (18)
 August 2014 (20)
 July 2014 (10)
 June 2014 (12)
 May 2014 (12)
 April 2014 (10)
 March 2014 (22)
 February 2014 (10)
 January 2014 (8)
 December 2013 (26)
 November 2013 (53)
 October 2013 (40)
 September 2013 (48)
 August 2013 (63)
 July 2013 (56)
 June 2013 (52)
 May 2013 (49)
 April 2013 (67)
 March 2013 (74)
 February 2013 (63)
 January 2013 (62)
 December 2012 (62)
 November 2012 (66)
 October 2012 (68)
 September 2012 (48)
 August 2012 (75)
 July 2012 (60)
 June 2012 (71)
 May 2012 (69)
 April 2012 (85)
 March 2012 (86)
 February 2012 (90)
 January 2012 (81)
 December 2011 (103)
 November 2011 (118)
 October 2011 (74)
 September 2011 (2)
 June 2011 (110)
 May 2011 (118)
 April 2011 (111)
 March 2011 (112)
 February 2011 (101)
 January 2011 (119)
 December 2010 (117)
 November 2010 (118)
 October 2010 (131)
 September 2010 (117)
 August 2010 (226)
 July 2010 (351)
 June 2010 (305)
 May 2010 (319)
 April 2010 (343)
 March 2010 (329)
 February 2010 (311)
 January 2010 (312)
 December 2009 (266)
 November 2009 (156)
 July 2009 (101)
 June 2009 (279)
 May 2009 (365)
 April 2009 (348)
 March 2009 (347)
 February 2009 (323)
 January 2009 (318)
 December 2008 (237)
 November 2008 (155)
 October 2008 (334)
 September 2008 (310)
 August 2008 (343)
 July 2008 (362)
 June 2008 (322)
 May 2008 (404)
 April 2008 (1276)
 March 2008 (1658)
 February 2008 (249)
 January 2008 (6)
 November 2007 (1)
 September 2007 (1)
 June 2007 (1)
 May 2007 (1)
 March 2007 (1)
 January 2007 (2)
 December 2006 (1)
 October 2006 (2)
 September 2006 (1)
 August 2006 (2)

Aaron Seigo (aseigo): Plasma Packages

System & UtilitiesFace of Aaron Seigo (aseigo)Here's another of the topics I was going to show in the screencast: Packages. The test case was getting Apple's Dashboard Widgets to work out of the box. The rules were that we couldn't adjust any of the Plasma infrastructure at all .. it has to all work with Packages and ScriptEngines. This meant changing and improving a few things in those parts of Plasma but the result was .. well, let's take a look:

In the Add Widgets dialog the Install New Widgets button is now a menu, letting you choose between downloading from the Internet using GetHotNewStuff and DXS (where what you are about to see is even more automated) or opening a widget from a file. Our test case was the Hello World widget example from Apple.

When you select the "Open From File" entry you get this:

It's an assistant dialog that lists all known packages. It doesn't list all known applet types because to the user it shouldn't matter whether a widget is implemented in Python, Ruby, ECMA Script, XTHML+JavaScript or what-not. If they behave the same and load the same then to the user they are the same. The difference here is the package type: Apple's widgets are different from Plasma's native widgets in how they are packed up and they appear to the user as different.

I'd like to eventually automate this by trying to get plasma to figure out what kind of package it is automatically. Unfortunately right now we don't have mimetype detection for different kinds of widgets and I just haven't done enough research with all the possible package types before me to do this. This is something I want to look into for 4.2 (unless someone beats me to it, of course).

Anyways, the way we get this listing is Plasma queries for all known widget types. Every widget type advertises what "language" it is; for Mac Dashboard support the language is "dashboard". Every widget type may also advertise what sort of package structure it uses. Here's the .desktop file contents for Mac Dashboard:

[Desktop Entry]
Comment=MacOS X dashboard widget

X-KDE-PluginInfo-Author=Zack Rusin

Currently Plasma has package structures for wallpapers, Plasma themes and widgets. New ones can be added at runtime, however. If the package structure is static, which is to say the files are always in the same place in the package, you can do this with a simple rc file. The PackageStructure class can read and write these files as well. If the package is not static, then you can instead provide a C++ plugin that manages this. Also, if the package requires special installation routines the same C++ plugin can provide that. Both are true in the case of the Mac Dashboard widget support.

So when a Mac Dashboard widget is opened up, Plasma looks at the X-Plasma-PackageFormat entry and goes off in search of the dashboard package format. It finds it here:

[Desktop Entry]
Name=Dashboard Widget
Comment=MacOS dashboard widget

X-KDE-PluginInfo-Author=Zack Rusin

Mimetypes and filters for the file selection are defined, as is the library and plugin name by which to load it. At this point Plasma can now call the install method which looks like this in the dashboard package structure plugin:

bool Bundle::installPackage(const QString &archivePath,
const QString &packageRoot)
QFile f(archivePath);;
m_data = f.readAll();

if (m_isValid) {
QString pluginName = \"dashboard_\" + m_bundleId;
//kDebug() \"valid, so going to move it in to\" pluginName;
KIO::CopyJob* job = KIO::move(m_tempDir->name(), packageRoot + pluginName,
m_isValid = job->exec();

if (m_isValid) {
//kDebug() \"still so good ... registering\";
Plasma::PackageMetadata data;
Plasma::Package::registerPackage(data, m_iconLocation);

if (!m_isValid) {
// make sure we clean up after ourselves afterwards on failure

return m_isValid;

What's happening in the code above is that Bundle opens the file at archivePath and makes sure it does indeed have the needed contents. It then copies it to packagRoot and registers the widget. Reigstration is accomplished by creating a PackageMetadata object, setting the relevant fields and passing it to Package::registerPackage, optionally along with the path to an icon for it. This creates an entry in the ksycoca database using a .desktop file that looks exactly like a native Plasma widget, except that this one is marked as being in the "dashboard" language.

This process all happens fairly well instantly and the result is that the widget appears in the widget listing alongside all the others:

The user sees no real difference. Places on the canvas we get:

As with native Plasmoids you can rotate it, resize it, drag it around to wherever you want, etc. Corona, Containment and even Applet are all blithely unaware anything different is going on. Zack was downloading various widgets from and trying them out and they tended to Just Work(tm).

(There are some issues currently with QtWebkit and these widgets (such as the white background and incorrect starting size), but Zack has pushed fixes for those upstream and those should be trickling down soon.)

Remember, however, that this is not specific to Mac Dashboard widgets. We can do this for any widget type we want. Indeed, Zack went ahead and did up a "native" webkit based widget for Plasma. As with Mac Dashboard widgets you do it all in HTML and use JavaScript within the webpage itself to manipulate it. Unlike Mac Dashboard, you can access Plasma goodies ... like DataEngines. So from embedded JavaScript you can fetch data from an engine and display it on your web based widget. Langauge type is "webkit". Nice.

(In fact, the Package stuff isn't specific to widgets at all. We could apply this to all sorts of after-market application add-ons.)

If you would like to add other types of widgets, I'd be happy and interested to both help you out and get resulting code into svn. Google Gadgets, Yahoo widgets, Windows Vista widgets, Opera Widgets ... they are all game. While they won't have all the features of the native Plasma widgets or cover the same kinds of topics, it would be great to be able to give people access to the whole world of widgets on their desktop.

Be Free to use the widgets you want, we have no agendas to push here.


Разместил: Planet KDE | Дата: 02.03.2008 | Прочитано: 1227 | Раздел: System & Utilities   
16 | System & Utilities | | Planet KDE |

Рейтинг статьи

Средняя оценка: 0.00/0Средняя оценка: 0Всего голосов:0

Хорошо Нормально Пойдёт Плохо

Смотрите также связанные темы

07.09.2008 Seigo on Plasma, Context and Nepomuk
KDE's Aaron Seigo has published a blog post in which he details how Nepomuk and the semantic desktop can be beneficial to users.
15.10.2010 E-mail
In his lengthy and interesting blog post covering the future of Plasma, KDE's Aaron Seigo proposes Qt Quick and QML as replacement of the Graphics View architecture currently used by Plasma.
29.01.2012 New Spark Tablet To Come Loaded With KDE's Active Plasma Interface
According to Aaron J. Seigo, 'It's the first tablet computer that comes with Plasma Active pre-installed.' The Spark, with its 7" screen, is built around a Cortex A9 with a Mali-400-gpu, 512MB RAM and an SD-card slot.
12.04.2011 KDE запускает проект Plasma Active для различных устройств
Вчера Арон Сейго (Aaron Seigo), разработчик из проекта рабочей среды KDE, объявил о запуске череды блоговых публикаций, посвященных новой инициативе, — Plasma Active.Идея Plasma Active — создать пользовательский интерфейс для современных мобильных устройств вроде планшетных компьютеров, мультимедийных центров и смартфонов. В основу ее дизайна заложен декларативный язык разметки Plasma Quick, позволяющий создавать интерфейс с помощью QML из Qt Quick.Plasma Active станет объединением ряда более узконаправленных проектов, таких как анонсированный Contour. Contour призван привнести «новую и захват...
02.02.2012 Анонсирован Spark — планшет с Mer (MeeGo) и KDE Plasma за 200 евро
Известный разработчик из проекта KDE Арон Сейго (Aaron Seigo) анонсировал первый в мире планшет с предварительно установленным графическим окружением KDE Plasma Active — Spark.В качестве управляющей операционной системы в Spark используются наработки проекта Mer — форка свободной мобильной платформы MeeGo. Известные на данный момент технические характеристики планшета Spark таковы: 7-дюймовый емкостной multitouch-дисплей, процессор ARM от AMLogic с тактовой частотой 1 ГГц, Mali-400 GPU, 512 мегабайт оперативной памяти, 4 Гб для хранения данных и слот для SD-карт, поддержка Wi-Fi. Стоимость нов...
04.03.2008 OpenGTL and QtCTL 0.9.1
A new release of JIT thanks to the use of the Aaron's feeling xvidcap hangs on debian, and I couldn't find out to make recordmydesktop records only a small part of a screen, and just the thought of post-editing scares me, yeah I am easily scared, but if you blink fast and can synchronize your blinking with the scrolling, you can see a short animation below !).
28.06.2008 'Aaron, we owe you' or 'Why I am happy that Nepomuk is not as popular as Plasma'
Submitted by trueg on Thu, 06/26/2008 - 09:50. After more than two weeks of vacation I read up on my email and of course am also sickened by some of the stuff I have to read there.
28.01.2009 Torvalds, KDE 4, and the Media Circus
"Torvalds' comment produced a flood of response across the web, including an apologia from leading KDE developer Aaron Seigo.
15.01.2011 Opinion: Why KDE is People, Not Software
"As the first of several opinion pieces exploring current issues in KDE, we offer you a video of Aaron Seigo explaining how KDE's success as a community producing all kinds of software led to outgrowing our old name, the "K Desktop Environment", what KDE means now and why it matters.
18.02.2012 Открыт предварительный заказ планшета Spark Tablet
Один из разработчиков KDE Аарон Сейго объявил в своем блоге об открытии предварительного заказа планшета Spark Tablet.Spark Tablet — новый планшет, работающий на ОС Mer Core (на основе MeeGo) и использующий адаптированную версию KDE Plasma Active.Характеристики планшета: Экран с диагональю 7 дюймов с поддержкой multi-touch 1 GHz ARM Cortex A9 processor с GPU Mali 400 512 MB DDR2 RAM 4 GB Nand Flash Disk 2 USB ports Батарея 3000mAH @ 7.4v Вес 355 гр. Предварительная стоимость планшета — 200 евро.
Нет комментариев. Почему бы Вам не оставить свой?
Вы не можете отправить комментарий анонимно, пожалуйста зарегистрируйтесь.
Google Search


Топ Новостей
1: Fedora and KDE/spin\'s treatment - Discussion
Просмотров - 3387

2: KDE\'s Kirigami 2.0 Framework for Convergent UIs Enters Beta with New Features
Просмотров - 1251

3: Offline Vaults for an extra layer of protection
Просмотров - 857

4: Come dine with the KDE e.V. board in Berlin in October
Просмотров - 754

5: Debugging issues booting a PC in 2018
Просмотров - 748

6: plib3.gui 0.9.9
Просмотров - 718

7: Konstruct
Просмотров - 702

8: KDE Connect – State of the union
Просмотров - 688

9: Best Desktop Environment
Просмотров - 685

10: Help Canonical Test GNOME Patches, Android Apps Illegally Tracking Kids, MySQL 8.0 Released and More
Просмотров - 684

11: KDE Connect Sprint
Просмотров - 678

12: Bluestar Gives Arch Linux a Celestial Glow
Просмотров - 657

13: Qt SCXML and State Chart Support in Qt Creator
Просмотров - 645

14: Help Canonical Test GNOME Patches, Android Apps Illegally Tracking Kids, MySQL 8.0 Released and More
Просмотров - 644

15: Volume Control in KDE Connect
Просмотров - 640

Google 120X240

Главная | Actual Topics | Статьи | Обратная связь | Guest Book
Генерация: 1.006 сек. и 13 запросов к базе данных за 0.936 сек.
Powered by SLAED CMS © 2005-2007 SLAED. All rights reserved.