Re: Replace kimpanel in kdeplasma-addons with a rewrite version

2011-09-25 Thread David Palacio
On Mon, Sep 19, 2011 at 08:39:11PM +0800, Weng Xuetian wrote:
 Hi Plasma World,
 Kimpanel in plasma-addons is without maintainer for quite a long time,
 since the author has some difficulty get access to internet due to his
 job (He has let his friend leave a comment on blog of the kimtoy
 author recently). So kimpanel has some really nasty bug and not fixed
 for a long time.
 
Hi,

What did you mean with regard to the kimtoy author? Are you going to unite
your efforts? Or are both applications going different ways?

Thanks for taking care of Kimpanel.

Regards,
David

 Like this:
 https://bugs.kde.org/show_bug.cgi?id=229105
 (I could report more bug, but since the first one didn't get fixed so ... )
 
 So I rewrite kimpanel (Use the same dbus protocol), and use dataengine
 for instead of direct dbus access. And I would like to maintain it in
 the future.
 Currently I put my code in github (
 https://github.com/csslayer/kimpanel-rewrite ), and it's already has
 the same feature as the old kimpanel, with all bug I found fixed, some
 new feature. I hope I can push the new version into KDE 4.8.
 
 Regards,
 Xuetian
 ___
 Plasma-devel mailing list
 Plasma-devel@kde.org
 https://mail.kde.org/mailman/listinfo/plasma-devel
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Review Request: plasma-windowed: Quit on closeEvent not on hideEvent

2011-06-28 Thread David Palacio

---
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/101802/
---

Review request for Plasma.


Summary
---

The view deletes itself when a hideEvent (QWidget) is sent. This is wrong as 
minimization and desktop switches send this kind of event.


This addresses bug 253153.
http://bugs.kde.org/show_bug.cgi?id=253153


Diffs
-

  plasma/generic/shells/plasma-windowed/singleview.h ba9e767 
  plasma/generic/shells/plasma-windowed/singleview.cpp da87cf8 

Diff: http://git.reviewboard.kde.org/r/101802/diff


Testing
---

Tested on KDE 4.6.


Thanks,

David

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Review Request: plasma-windowed: Quit on closeEvent not on hideEvent

2011-06-28 Thread David Palacio

---
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/101802/#review4239
---



plasma/generic/shells/plasma-windowed/singleview.cpp
http://git.reviewboard.kde.org/r/101802/#comment3478

I think the deleteLater() call should stay. Maybe after 
QGraphicsView::closeEvent()?


- David


On June 29, 2011, 2:19 a.m., David Palacio wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 http://git.reviewboard.kde.org/r/101802/
 ---
 
 (Updated June 29, 2011, 2:19 a.m.)
 
 
 Review request for Plasma.
 
 
 Summary
 ---
 
 The view deletes itself when a hideEvent (QWidget) is sent. This is wrong as 
 minimization and desktop switches send this kind of event.
 
 
 This addresses bug 253153.
 http://bugs.kde.org/show_bug.cgi?id=253153
 
 
 Diffs
 -
 
   plasma/generic/shells/plasma-windowed/singleview.h ba9e767 
   plasma/generic/shells/plasma-windowed/singleview.cpp da87cf8 
 
 Diff: http://git.reviewboard.kde.org/r/101802/diff
 
 
 Testing
 ---
 
 Tested on KDE 4.6.
 
 
 Thanks,
 
 David
 


___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Review Request: plasma-windowed: Quit on closeEvent not on hideEvent

2011-06-28 Thread David Palacio

---
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/101802/#review4240
---


- David


On June 29, 2011, 2:19 a.m., David Palacio wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 http://git.reviewboard.kde.org/r/101802/
 ---
 
 (Updated June 29, 2011, 2:19 a.m.)
 
 
 Review request for Plasma.
 
 
 Summary
 ---
 
 The view deletes itself when a hideEvent (QWidget) is sent. This is wrong as 
 minimization and desktop switches send this kind of event.
 
 
 This addresses bug 253153.
 http://bugs.kde.org/show_bug.cgi?id=253153
 
 
 Diffs
 -
 
   plasma/generic/shells/plasma-windowed/singleview.h ba9e767 
   plasma/generic/shells/plasma-windowed/singleview.cpp da87cf8 
 
 Diff: http://git.reviewboard.kde.org/r/101802/diff
 
 
 Testing
 ---
 
 Tested on KDE 4.6.
 
 
 Thanks,
 
 David
 


___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Review Request: Preconfigurable plasmoids

2011-05-05 Thread David Palacio


 On April 28, 2011, 9:19 p.m., Aaron J. Seigo wrote:
  an interesting idea, but the configuration values should not appear in the 
  metadata.desktop file. it not only bloats up the # of keys we have, it 
  doesn't scale to plasmoids with more/different configuration.
  
  i think this would make more sense as a .desktop + a KConfigGroup (could 
  even be in the same file?) that holds the complete default configuration 
  that is then copied over after the applet is created.
 
 David Palacio wrote:
 I am making a DBusLauncher base plasmoid to see how far this can get. It 
 faces one issue so far: How to make some entries in the [Configuration] group 
  translatable? (provided by the configuration desktop file). Some data should 
 be translated (as user facing strings) and some other must not be translated 
 (as resources identifiers).
 
 David Palacio wrote:
 (Note to self, this is not a chatroom)
 
 In Techbase an article describes a way to extract the wanted messages:
 
 http://techbase.kde.org/Development/Tutorials/Localization/i18n_Build_Systems#Translating_.desktop_Files
 
 Also, KLocale seems to be the way to get the translated strings, if they 
 exist in the language of interest.
 
 Is there a better method?
 
 Aaron J. Seigo wrote:
 yes, as long as the string has been translated, then in the code you can 
 pass the QString to i18n and it will do its magic. the trick is that the 
 translatable strings need to go into a translation (po) file, as noted in the 
 link you provided from techbase.
 
 my first question, however, is what strings in the configuration need to 
 be translated?

If I want to replicate showActivityManager functionality, I need to set a 
tooltip for it. The tooltip text strings need to be translated.

Some solutions:
1. Initially I thought of making the DBusLauncher applet load the translations 
itself, by introducing an extra setting that points to an appropiate catalog.

2. Load the translations in PluginLoader and set the translated strings in the 
applet configuration. This solution is much simpler and general, with the 
downside that the strings remain the same when the user changes the language 
settings.


- David


---
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/101251/#review2950
---


On May 4, 2011, 12:52 a.m., David Palacio wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 http://git.reviewboard.kde.org/r/101251/
 ---
 
 (Updated May 4, 2011, 12:52 a.m.)
 
 
 Review request for Plasma.
 
 
 Summary
 ---
 
 There is some code duplication in that some plasmoids share very much of 
 program logic but actually differ in just a setting. E.g. the recently made 
 ShowActivityManager plasmoid, which just is a DBus call launcher. The Icon 
 plasmoid is an example of this made right. I'd like to have more generic 
 plasmoids. Even better, I'd like to have an easy way to configure them.   
   
   
  
   
   

 Let's see the code. config.patch shows a way to load a config metadata file 
 and fill a designated plasmoid with the configuration data 
 (metadata.desktop). We search for a X-Plasma-ConfigApplet property that 
 defines the plasmoid to configure and load. Additional properties define the 
 plasmoid settings. This allows us, for example, to easily provide access to 
 any webservice without code duplication.  
   
 
 
 
 Diffs
 -
 
   plasma/data/servicetypes/plasma-applet.desktop 8fabddb 
   plasma/pluginloader.cpp 43a5b7c 
   plasma/tests/CMakeLists.txt 1d04aa5 
   plasma/tests/plasmoidconfigtest.h PRE-CREATION 
   plasma/tests/plasmoidconfigtest.cpp PRE-CREATION 
 
 Diff: http://git.reviewboard.kde.org/r/101251/diff
 
 
 Testing
 ---
 
 Loading of plasmoids works.
 
 Testcase: Install these widgets:
 http://kde-look.org/content/show.php/Label?content=99881
 http://kde-look.org/content/show.php?content=141270
 
 Add configlabel to desktop.
 
 
 Thanks,
 
 David
 


___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Review Request: Preconfigurable plasmoids

2011-05-04 Thread David Palacio


 On April 28, 2011, 9:19 p.m., Aaron J. Seigo wrote:
  an interesting idea, but the configuration values should not appear in the 
  metadata.desktop file. it not only bloats up the # of keys we have, it 
  doesn't scale to plasmoids with more/different configuration.
  
  i think this would make more sense as a .desktop + a KConfigGroup (could 
  even be in the same file?) that holds the complete default configuration 
  that is then copied over after the applet is created.

I am making a DBusLauncher base plasmoid to see how far this can get. It faces 
one issue so far: How to make some entries in the [Configuration] group  
translatable? (provided by the configuration desktop file). Some data should be 
translated (as user facing strings) and some other must not be translated (as 
resources identifiers).


- David


---
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/101251/#review2950
---


On May 4, 2011, 12:52 a.m., David Palacio wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 http://git.reviewboard.kde.org/r/101251/
 ---
 
 (Updated May 4, 2011, 12:52 a.m.)
 
 
 Review request for Plasma.
 
 
 Summary
 ---
 
 There is some code duplication in that some plasmoids share very much of 
 program logic but actually differ in just a setting. E.g. the recently made 
 ShowActivityManager plasmoid, which just is a DBus call launcher. The Icon 
 plasmoid is an example of this made right. I'd like to have more generic 
 plasmoids. Even better, I'd like to have an easy way to configure them.   
   
   
  
   
   

 Let's see the code. config.patch shows a way to load a config metadata file 
 and fill a designated plasmoid with the configuration data 
 (metadata.desktop). We search for a X-Plasma-ConfigApplet property that 
 defines the plasmoid to configure and load. Additional properties define the 
 plasmoid settings. This allows us, for example, to easily provide access to 
 any webservice without code duplication.  
   
 
 
 
 Diffs
 -
 
   plasma/data/servicetypes/plasma-applet.desktop 8fabddb 
   plasma/pluginloader.cpp 43a5b7c 
   plasma/tests/CMakeLists.txt 1d04aa5 
   plasma/tests/plasmoidconfigtest.h PRE-CREATION 
   plasma/tests/plasmoidconfigtest.cpp PRE-CREATION 
 
 Diff: http://git.reviewboard.kde.org/r/101251/diff
 
 
 Testing
 ---
 
 Loading of plasmoids works.
 
 Testcase: Install these widgets:
 http://kde-look.org/content/show.php/Label?content=99881
 http://kde-look.org/content/show.php?content=141270
 
 Add configlabel to desktop.
 
 
 Thanks,
 
 David
 


___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Review Request: Preconfigurable plasmoids

2011-05-03 Thread David Palacio

---
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/101251/
---

(Updated May 4, 2011, 12:52 a.m.)


Review request for Plasma.


Changes
---

Added unit test.


Summary
---

There is some code duplication in that some plasmoids share very much of 
program logic but actually differ in just a setting. E.g. the recently made 
ShowActivityManager plasmoid, which just is a DBus call launcher. The Icon 
plasmoid is an example of this made right. I'd like to have more generic 
plasmoids. Even better, I'd like to have an easy way to configure them. 


   


   
Let's see the code. config.patch shows a way to load a config metadata file and 
fill a designated plasmoid with the configuration data (metadata.desktop). We 
search for a X-Plasma-ConfigApplet property that defines the plasmoid to 
configure and load. Additional properties define the plasmoid settings. This 
allows us, for example, to easily provide access to any webservice without code 
duplication.




Diffs (updated)
-

  plasma/data/servicetypes/plasma-applet.desktop 8fabddb 
  plasma/pluginloader.cpp 43a5b7c 
  plasma/tests/CMakeLists.txt 1d04aa5 
  plasma/tests/plasmoidconfigtest.h PRE-CREATION 
  plasma/tests/plasmoidconfigtest.cpp PRE-CREATION 

Diff: http://git.reviewboard.kde.org/r/101251/diff


Testing
---

Loading of plasmoids works.

Testcase: Install these widgets:
http://kde-look.org/content/show.php/Label?content=99881
http://kde-look.org/content/show.php?content=141270

Add configlabel to desktop.


Thanks,

David

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Review Request: Preconfigurable plasmoids

2011-04-30 Thread David Palacio


 On April 29, 2011, 10:24 a.m., Aaron J. Seigo wrote:
  plasma/pluginloader.cpp, line 121
  http://git.reviewboard.kde.org/r/101251/diff/3/?file=15592#file15592line121
 
  applet-config() probably does not return the actual config group, but 
  a temporary group that gets migrated later. i assume this works (and that 
  you have test it :). this would be overly easy to break, however.
  
  as a result, i'd like to see an automated test in kdelibs/plasma/tests/ 
  that tests this mechanism, otherwise it will be far too easy for it to 
  break accidentally leaving all widgets that use it non-operational.

I need some help on this. For the unit test, I guess it must only depend on 
kdelibs. On what to test, it is an applet configuration being correctly 
migrated to a corona config layout, right?. So, I would need an applet, a 
containment and a corona for this test.


 On April 29, 2011, 10:24 a.m., Aaron J. Seigo wrote:
  plasma/pluginloader.cpp, line 119
  http://git.reviewboard.kde.org/r/101251/diff/3/?file=15592#file15592line119
 
  config does not need to cascade. you only need a KSimpleConfig here

SimpleConfig flag, right?


- David


---
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/101251/#review2961
---


On April 29, 2011, 1:09 a.m., David Palacio wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 http://git.reviewboard.kde.org/r/101251/
 ---
 
 (Updated April 29, 2011, 1:09 a.m.)
 
 
 Review request for Plasma.
 
 
 Summary
 ---
 
 There is some code duplication in that some plasmoids share very much of 
 program logic but actually differ in just a setting. E.g. the recently made 
 ShowActivityManager plasmoid, which just is a DBus call launcher. The Icon 
 plasmoid is an example of this made right. I'd like to have more generic 
 plasmoids. Even better, I'd like to have an easy way to configure them.   
   
   
  
   
   

 Let's see the code. config.patch shows a way to load a config metadata file 
 and fill a designated plasmoid with the configuration data 
 (metadata.desktop). We search for a X-Plasma-ConfigApplet property that 
 defines the plasmoid to configure and load. Additional properties define the 
 plasmoid settings. This allows us, for example, to easily provide access to 
 any webservice without code duplication.  
   
 
 
 
 Diffs
 -
 
   plasma/data/servicetypes/plasma-applet.desktop 8fabddb 
   plasma/pluginloader.cpp e57cac5 
 
 Diff: http://git.reviewboard.kde.org/r/101251/diff
 
 
 Testing
 ---
 
 Loading of plasmoids works.
 
 Testcase: Install these widgets:
 http://kde-look.org/content/show.php/Label?content=99881
 http://kde-look.org/content/show.php?content=141270
 
 Add configlabel to desktop.
 
 
 Thanks,
 
 David
 


___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Preconfigurable plasmoids

2011-04-28 Thread David Palacio
Greetings Plasma developers,

There is some code duplication in that some plasmoids share very much of
program logic but actually differ in just a setting. E.g. the recently
made ShowActivityManager plasmoid, which just is a DBus call launcher.
The Icon plasmoid is an example of this made right. I'd like to have
more generic plasmoids. Even better, I'd like to have an easy way to
configure them.

Let's see the code. config.patch shows a way to load a config metadata
file and fill a designated plasmoid with the configuration data
(metadata.desktop). We search for a X-Plasma-ConfigApplet property that
defines the plasmoid to configure and load. Additional properties define
the plasmoid settings. This allows us, for example, to easily provide
access to any webservice without code duplication.

Other uses include DBus call launchers, data visualizers.

What is missing in my code is a working way to fill/override the
plasmoid settings.

Do you like this idea? If so please help me in getting the configuration
part to work. Is the applet loading code in PluginLoader wrong? Please
tell me where I should work instead. I'm on #plasma-devel as dpalacio.

Kind regards,
David.

diff --git a/plasma/data/servicetypes/plasma-applet.desktop 
b/plasma/data/servicetypes/plasma-applet.desktop
index 8fabddb..5fbc986 100644
--- a/plasma/data/servicetypes/plasma-applet.desktop
+++ b/plasma/data/servicetypes/plasma-applet.desktop
@@ -79,6 +79,15 @@ Comment[zh_TW]=Plasma 小程式
 [PropertyDef::X-Plasma-API]
 Type=QString
 
+[PropertyDef::X-Plasma-ConfigApplet]
+Type=QString
+
+[PropertyDef::X-Plasma-ConfigUrl]
+Type=QString
+
+[PropertyDef::X-Plasma-ConfigIcon]
+Type=QString
+
 [PropertyDef::X-Plasma-DropMimeTypes]
 Type=QStringList
 
diff --git a/plasma/pluginloader.cpp b/plasma/pluginloader.cpp
index e57cac5..6fc4c6e 100644
--- a/plasma/pluginloader.cpp
+++ b/plasma/pluginloader.cpp
@@ -107,6 +107,26 @@ Applet *PluginLoader::loadApplet(const QString name, uint 
appletId, const QVari
 }
 
 KService::Ptr offer = offers.first();
+if(!offer-property(X-Plasma-ConfigApplet).toString().isEmpty()) {
+QString appletName = 
offer-property(X-Plasma-ConfigApplet).toString();
+kDebug()  we have a configuration for applet  appletName;
+applet = loadApplet(appletName, appletId, args);
+if(!applet) {
+return 0;
+}
+KConfigGroup *config = applet-d-mainConfigGroup();
+if(offer-property(X-Plasma-ConfigIcon).isValid()) {
+config-writeEntry(Icon, offer-property(X-Plasma-ConfigIcon));
+}
+kDebug()  Check Url valid?  
offer-property(X-Plasma-ConfigUrl).isValid()  
offer-property(X-Plasma-ConfigUrl);
+if(offer-property(X-Plasma-ConfigUrl).isValid()) {
+kDebug()  write Url as  
offer-property(X-Plasma-ConfigUrl).toString();
+config-writeEntry(Url, 
offer-property(X-Plasma-ConfigUrl).toString());
+}
+config-sync();
+applet-restore(*config);
+return applet;
+}
  
 if (appletId == 0) {
 appletId = ++AppletPrivate::s_maxAppletId;
[Desktop Entry]
Name=KDE webview
Name[x-test]=xxGoogle Tasksxx
Comment=KDE EXample david
Comment[x-test]=xxGoogle Tasks widget. Works best if GMail autologins in 
Konqueror.xx
Type=Service
ServiceTypes=Plasma/Applet,Plasma/PopupApplet

X-Plasma-ConfigApplet=org.kde.configurable.webview
X-Plasma-ConfigIcon=konqueror
X-Plasma-ConfigUrl=http://kde.org/

X-KDE-PluginInfo-Author=David Palacio
X-KDE-PluginInfo-Email=dpala...@orbitalibre.org
X-KDE-PluginInfo-Name=org.example.kde
X-KDE-PluginInfo-Version=1.0
X-KDE-PluginInfo-Website=http://kde.example.org/
X-KDE-PluginInfo-Category=Online Services
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=true
X-Plasma-NotificationArea=true

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Review Request: Preconfigurable plasmoids

2011-04-28 Thread David Palacio

---
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/101251/
---

Review request for Plasma.


Summary
---

There is some code duplication in that some plasmoids share very much of 
program logic but actually differ in just a setting. E.g. the recently made 
ShowActivityManager plasmoid, which just is a DBus call launcher. The Icon 
plasmoid is an example of this made right. I'd like to have more generic 
plasmoids. Even better, I'd like to have an easy way to configure them. 


   


   
Let's see the code. config.patch shows a way to load a config metadata file and 
fill a designated plasmoid with the configuration data (metadata.desktop). We 
search for a X-Plasma-ConfigApplet property that defines the plasmoid to 
configure and load. Additional properties define the plasmoid settings. This 
allows us, for example, to easily provide access to any webservice without code 
duplication.




Diffs
-

  plasma/data/servicetypes/plasma-applet.desktop 8fabddb 
  plasma/pluginloader.cpp e57cac5 

Diff: http://git.reviewboard.kde.org/r/101251/diff


Testing
---

Loading of plasmoids works.
Configuration is not correctly being feed to plasmoids.


Thanks,

David

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Preconfigurable plasmoids

2011-04-28 Thread David Palacio
On Thu, Apr 28, 2011 at 03:16:45PM -0500, David Palacio wrote:
 Greetings Plasma developers,
 
 There is some code duplication in that some plasmoids share very much of
 program logic but actually differ in just a setting. E.g. the recently
 made ShowActivityManager plasmoid, which just is a DBus call launcher.
 The Icon plasmoid is an example of this made right. I'd like to have
 more generic plasmoids. Even better, I'd like to have an easy way to
 configure them.
 
 Let's see the code. config.patch shows a way to load a config metadata
 file and fill a designated plasmoid with the configuration data
 (metadata.desktop). We search for a X-Plasma-ConfigApplet property that
 defines the plasmoid to configure and load. Additional properties define
 the plasmoid settings. This allows us, for example, to easily provide
 access to any webservice without code duplication.
 
 Other uses include DBus call launchers, data visualizers.
 
 What is missing in my code is a working way to fill/override the
 plasmoid settings.
 
 Do you like this idea? If so please help me in getting the configuration
 part to work. Is the applet loading code in PluginLoader wrong? Please
 tell me where I should work instead. I'm on #plasma-devel as dpalacio.
 
 Kind regards,
 David.
 

Reviewboard: https://git.reviewboard.kde.org/r/101251/

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Review Request: Preconfigurable plasmoids

2011-04-28 Thread David Palacio

---
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/101251/
---

(Updated April 29, 2011, 12:13 a.m.)


Review request for Plasma.


Changes
---

Fetch configuration instead from [Configuration] group.


Summary
---

There is some code duplication in that some plasmoids share very much of 
program logic but actually differ in just a setting. E.g. the recently made 
ShowActivityManager plasmoid, which just is a DBus call launcher. The Icon 
plasmoid is an example of this made right. I'd like to have more generic 
plasmoids. Even better, I'd like to have an easy way to configure them. 


   


   
Let's see the code. config.patch shows a way to load a config metadata file and 
fill a designated plasmoid with the configuration data (metadata.desktop). We 
search for a X-Plasma-ConfigApplet property that defines the plasmoid to 
configure and load. Additional properties define the plasmoid settings. This 
allows us, for example, to easily provide access to any webservice without code 
duplication.




Diffs (updated)
-

  plasma/data/servicetypes/plasma-applet.desktop 8fabddb 
  plasma/pluginloader.cpp e57cac5 

Diff: http://git.reviewboard.kde.org/r/101251/diff


Testing
---

Loading of plasmoids works.
Configuration is not correctly being feed to plasmoids.


Thanks,

David

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Review Request: Preconfigurable plasmoids

2011-04-28 Thread David Palacio

---
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/101251/
---

(Updated April 29, 2011, 1:08 a.m.)


Review request for Plasma.


Changes
---

Use available copy functions.

Testing:
Install these widgets:
http://kde-look.org/content/show.php/Label?content=99881
http://kde-look.org/content/show.php?content=141270

Add configlabel to desktop.


Summary
---

There is some code duplication in that some plasmoids share very much of 
program logic but actually differ in just a setting. E.g. the recently made 
ShowActivityManager plasmoid, which just is a DBus call launcher. The Icon 
plasmoid is an example of this made right. I'd like to have more generic 
plasmoids. Even better, I'd like to have an easy way to configure them. 


   


   
Let's see the code. config.patch shows a way to load a config metadata file and 
fill a designated plasmoid with the configuration data (metadata.desktop). We 
search for a X-Plasma-ConfigApplet property that defines the plasmoid to 
configure and load. Additional properties define the plasmoid settings. This 
allows us, for example, to easily provide access to any webservice without code 
duplication.




Diffs (updated)
-

  plasma/data/servicetypes/plasma-applet.desktop 8fabddb 
  plasma/pluginloader.cpp e57cac5 

Diff: http://git.reviewboard.kde.org/r/101251/diff


Testing
---

Loading of plasmoids works.
Configuration is not correctly being feed to plasmoids.


Thanks,

David

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Review Request: Preconfigurable plasmoids

2011-04-28 Thread David Palacio

---
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/101251/
---

(Updated April 29, 2011, 1:09 a.m.)


Review request for Plasma.


Summary
---

There is some code duplication in that some plasmoids share very much of 
program logic but actually differ in just a setting. E.g. the recently made 
ShowActivityManager plasmoid, which just is a DBus call launcher. The Icon 
plasmoid is an example of this made right. I'd like to have more generic 
plasmoids. Even better, I'd like to have an easy way to configure them. 


   


   
Let's see the code. config.patch shows a way to load a config metadata file and 
fill a designated plasmoid with the configuration data (metadata.desktop). We 
search for a X-Plasma-ConfigApplet property that defines the plasmoid to 
configure and load. Additional properties define the plasmoid settings. This 
allows us, for example, to easily provide access to any webservice without code 
duplication.




Diffs
-

  plasma/data/servicetypes/plasma-applet.desktop 8fabddb 
  plasma/pluginloader.cpp e57cac5 

Diff: http://git.reviewboard.kde.org/r/101251/diff


Testing (updated)
---

Loading of plasmoids works.

Testcase: Install these widgets:
http://kde-look.org/content/show.php/Label?content=99881
http://kde-look.org/content/show.php?content=141270

Add configlabel to desktop.


Thanks,

David

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Review Request: Fix resizing of popup applets on panel resizing

2011-04-17 Thread David Palacio

---
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/101148/
---

Review request for Plasma, Aaron J. Seigo and Marco Martin.


Summary
---

Since commit 1ed8e4ca6b53c2338d8da8e616752f0426038961 popup applets as Shelf 
and Places (kde-look.org) do not resize when the panel resizes.
This patch ensures the icon is added to the widget layout before the function 
returns.


This addresses bug 268104.
http://bugs.kde.org/show_bug.cgi?id=268104


Diffs
-

  plasma/popupapplet.cpp 9238bd1 

Diff: http://git.reviewboard.kde.org/r/101148/diff


Testing
---


Thanks,

David

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: KRunner in 4.5.1

2010-09-06 Thread David Palacio
On Mon, Sep 6, 2010 at 06:37, Matteo Agostinelli agostine...@gmail.com wrote:
 Have you tried simply resizing krunner using the bottom/lateral
 handles? It should remember the size next time you execute the runner
 (at least it's working on my box). Same applies to the 'Settings'
 window...

`Free mode` krunner users face this bug
https://bugs.kde.org/show_bug.cgi?id=242516

There is a workaround for the issue.
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Review Request: multi-screen support for plasma-overlay

2009-12-09 Thread David Palacio

---
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/2344/
---

Review request for Plasma and Chani Armitage.


Summary
---

Plasma-overlay support for multiple screens. It setups containments for each 
screen and allows for widgets to be added in each.

P.S. Recently the toolbox and widget handles dissappeared from KDE trunk/. 
AFAIK it is not related to this change.


This addresses bug 197299.
https://bugs.kde.org/show_bug.cgi?id=197299


Diffs
-

  /trunk/KDE/kdebase/workspace/krunner/lock/lockprocess.cc 1057557 
  /trunk/KDE/kdebase/workspace/plasma/screensaver/shell/backgrounddialog.h 
1057557 
  /trunk/KDE/kdebase/workspace/plasma/screensaver/shell/backgrounddialog.cpp 
1057557 
  /trunk/KDE/kdebase/workspace/plasma/screensaver/shell/plasmaapp.h 1057557 
  /trunk/KDE/kdebase/workspace/plasma/screensaver/shell/plasmaapp.cpp 1057557 
  /trunk/KDE/kdebase/workspace/plasma/screensaver/shell/savercorona.h 1057557 
  /trunk/KDE/kdebase/workspace/plasma/screensaver/shell/savercorona.cpp 1057557 
  /trunk/KDE/kdebase/workspace/plasma/screensaver/shell/saverview.h 1057557 
  /trunk/KDE/kdebase/workspace/plasma/screensaver/shell/saverview.cpp 1057557 

Diff: http://reviewboard.kde.org/r/2344/diff


Testing
---


Thanks,

David

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Multi-screen widgets on screensaver

2009-11-10 Thread David Palacio
On Lunes 09 Noviembre 2009 15:42:21 Aaron J. Seigo escribió:
 On November 8, 2009, David Palacio wrote:
  I added support to plasma-overlay for multiple screens. For now only
  tested on a TwinView setup.
 
 nice .. Chani should also review it and give it her thumbs up/down and/or
 other input.
 
  I am not sure if the work done on lockprocess.cc will work on non
  Xinerama setups.
 
 this should be sent to Oswald as he maintains that bit of code.

Actually, it should work. It would pick the right root window and map the 
correct coordinates. Though, if there is a better way to get the screen under 
the pointer, please say.

I would like to get rid of the m_views vector. Nothing meaningful is done with 
the views.

plasmaapp.cpp:469
 void PlasmaApp::dialogDestroyed(QObject *obj)
 {
 m_dialogs.removeAll(qobject_castQWidget*(obj));
 if (m_dialogs.isEmpty()) {
 //FIXME multiview
 //if (m_view) {
 //this makes qactions work again
 //m_view-activateWindow();
 //}
Is this still a problem? I am not sure what problems occur regarding QActions.

Move widgets between screens:
Would be nice, but not essential. I think Kephal helps on this? It is not 
documented, though :/


signature.asc
Description: This is a digitally signed message part.
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Multi-screen widgets on screensaver

2009-11-08 Thread David Palacio
I added support to plasma-overlay for multiple screens. For now only tested on 
a TwinView setup.

I am not sure if the work done on lockprocess.cc will work on non Xinerama 
setups.

To let the plasma app work with multiple views I (ab)use signals/slots.

Related bugs:

Bug 193020: Screensaver widgets can't be moved to second monitor
** (not fixed yet)

Bug 197299: screensaver overlay assumes screen starts at (0,0)  screensaver 
overlay assumes screen starts at (0,0)
** (fixed)
Index: krunner/lock/lockprocess.cc
===
--- krunner/lock/lockprocess.cc	(revisión: 1044119)
+++ krunner/lock/lockprocess.cc	(copia de trabajo)
@@ -1410,8 +1410,31 @@
 {
 //kDebug()  forward to plasma;
 XEvent ev2 = *event;
-ev2.xkey.window = ev2.xkey.subwindow = mForeignInputWindows.first();
-XSendEvent(QX11Info::display(), ev2.xkey.window, False, NoEventMask, ev2);
+Window root_return;
+int x_return, y_return;
+unsigned int width_return, height_return, border_width_return, depth_return;
+WId targetWindow = 0;
+kDebug()  root is  winId();
+kDebug()  search window under pointer with  mForeignInputWindows.size()  windows;
+foreach(WId window, mForeignInputWindows)
+{
+XGetGeometry(QX11Info::display(), window, root_return,
+x_return, y_return,
+width_return, height_return,
+border_width_return, depth_return);
+if( (event-xkey.x=x_return  event-xkey.x=x_return+(int)width_return)
+
+(event-xkey.y=y_return  event-xkey.y=y_return+(int)height_return) )
+{
+kDebug()  found window  window;
+targetWindow = window;
+ev2.xkey.window = ev2.xkey.subwindow = targetWindow;
+ev2.xkey.x = event-xkey.x - x_return;
+ev2.xkey.y = event-xkey.y - y_return;
+break;
+}
+}
+XSendEvent(QX11Info::display(), targetWindow, False, NoEventMask, ev2);
 ret = true;
 }
 default:
Index: plasma/screensaver/shell/plasmaapp.cpp
===
--- plasma/screensaver/shell/plasmaapp.cpp	(revisión: 1044119)
+++ plasma/screensaver/shell/plasmaapp.cpp	(copia de trabajo)
@@ -126,7 +126,6 @@
 PlasmaApp::PlasmaApp(Display* display, Qt::HANDLE visual, Qt::HANDLE colormap)
 : KUniqueApplication(display, visual, colormap),
   m_corona(0),
-  m_view(0),
   m_configDialog(0)
 {
 //load translations for libplasma
@@ -142,7 +141,9 @@
 // Add 10% so that other (smaller) pixmaps can also be cached.
 int cacheSize = 0;
 QDesktopWidget *desktop = QApplication::desktop();
-for (int i = 0; i  desktop-numScreens(); i++) {
+int numScreens = desktop-numScreens();
+m_views.resize(numScreens);
+for (int i = 0; i  numScreens; i++) {
 QRect geometry = desktop-screenGeometry(i);
 cacheSize += 4 * geometry.width() * geometry.height() / 1024;
 }
@@ -226,8 +227,8 @@
 m_corona-saveLayout();
 }
 
-delete m_view;
-delete m_corona;
+//delete m_view; //should not be needed
+delete m_corona; //should not be needed?
 
 KGlobal::config()-sync();
 }
@@ -238,10 +239,7 @@
 return;
 }
 m_activeOpacity = opacity;
-if (m_view) {
-//assume it's active, since things are happening
-m_view-setWindowOpacity(opacity);
-}
+emit setViewOpacity(opacity);
 KConfigGroup cg(KGlobal::config(), General);
 cg.writeEntry(activeOpacity, opacity);
 m_corona-requestConfigSync();
@@ -271,41 +269,33 @@
 
 void PlasmaApp::setActive(bool activate)
 {
-if (!m_view) {
-return;
-}
-
 if (activate) {
-m_view-setWindowOpacity(m_activeOpacity);
-m_view-showView();
-m_view-containment()-openToolBox();
-} else if (m_view-isVisible()) {
+emit setViewOpacity(m_activeOpacity);
+emit showViews();
+emit openToolBox(); //TODO slot in Containment?
+} else {
 if (qFuzzyCompare(m_idleOpacity + qreal(1.0), qreal(1.0))) {
 //opacity is 0
-m_view-hideView();
+emit hideViews();
 } else {
 lock();
-m_view-setWindowOpacity(m_idleOpacity);
-m_view-containment()-closeToolBox();
+emit setViewOpacity(m_idleOpacity);
+emit showViews();
+emit closeToolBox(); //TODO slot in Containment?
 }
-} else {
-if (m_idleOpacity  0) {
-

Re: Generic view widget for Plasma

2009-09-20 Thread David Palacio
Sorry I am not properly replying. I am not subscribed and forgot to tell you 
that. /me subscribes.

Aarón Seigo escribió:
 On September 18, 2009, David Palacio wrote:
  * The private Plasma::Style should be extended to let the scrollarea and
   view items be painted in the current theme style.

 we already have one item delegate in libplasma, we i suppose we could have
 another.
I saw that. It does not work properly with a simple QStringListModel and the 
View still feels out of place. The latter is because a delegate only styles 
items, it misses the background and frame. That is why I think extending the 
Plasma style is the best option.

 exporting Plasma::Style is not an option as we have no idea whether that
 what we can commit to in the longer term.
Of course. But if view widgets were exported from kdelibs, they could use the 
private extended style.

  * Export the different view widgets to Plasma.

 this is a possibility. i was half-waiting for the new Qt M/V stuff to
 emerge, but i suppose we can only hold our breath for so long.

 iirc Lancelot and FolderView both have some M/V integration. the device
 notifier being ported to QGV will also need something.

 given that work and its usefulness to the kate/konsole/etc sessions
 plasmoids, a list widget would likely be a welcome addition.

 i would like to see us avoid forcing people to use Qt's rather painful M/V
 API just to get a nice list, however. so it should be a feature rather than
 a requirement to use such a Plasma::Widget.

  Or Chani's desktop menu launcher

 if you're referring to the ContainmentActions plugin, i don't think there
 is anything that can or should be done about this.
It is always possible :)

  Reimplementation of the konsole profiles widget as a folderview
  http://imagebin.ca/view/Ayp-Nz.html

 is this a mockup or have you actually ported the konsole profiles?
You could call it a mockup. The two widgets to the left are actually 
folderviews. For each profile I created a .desktop link. The Qt one includes 
Assistant, Designer and Creator links.

 i'm not sure that using folderview's list widget is really the best of
 ideas. if you take a look at the existing delegate in libplasma, you can
 see some of the current requirements. and again, Jacopo and Giulio are
 working on the device notifier to take it in this direction, so maybe they
 could end up creating a nice generic list widget out of that for use by
 others?
That is the idea. A grid or tree view widget with a custom delegate would be 
great as well.


signature.asc
Description: This is a digitally signed message part.
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel