Re: Changes in plasma desktop scripting

2014-03-29 Thread Nowardev-Team
i don't get the point of these changes.
i would not spend my time doing this

and as said by kevin desktop and activities are not the same concept

2014-03-28 21:56 GMT+01:00 Kevin Krammer kram...@kde.org:
 Hi Marco,

 On Thursday, 2014-03-27, 21:39:12, Marco Martin wrote:
 Hi all,

 we had still a problem in the plasma desktop scripting api, because it comes
 from a time when one containment == one activity, therefore right now
 adding new activities from the script is pretty much broken.

 Since now is the only moment we can screw the api, today I made the
 following changes:
 activities() - desktops()
 activityById() - desktopById()
 activityForScreen() - desktopForScreen()

 I might be confusing terminology but aren't desktops and activities orthogonal
 concepts?

 E.g. like having a work and home activity and having a desktop setup with 6
 virtual desktops?

 Cheers,
 Kevin

 --
 Kevin Krammer, KDE developer, xdg-utils developer
 KDE user support, developer mentoring

 ___
 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


Re: Changes in plasma desktop scripting

2014-03-29 Thread Sebastian Kügler
On Friday, March 28, 2014 21:56:55 Kevin Krammer wrote:
 I might be confusing terminology but aren't desktops and activities
 orthogonal  concepts?
 
 E.g. like having a work and home activity and having a desktop setup with 6 
 virtual desktops?

Mostly, but we have for example an active desktop per activity, so when 
switching activities, it remembers the desktop you're on, and will go back to 
that desktop when you switch back to that activity.

Cheers,
-- 
sebas

http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Changes in plasma desktop scripting

2014-03-29 Thread Marco Martin
On Friday 28 March 2014 21:56:55 Kevin Krammer wrote:

 I might be confusing terminology but aren't desktops and activities
 orthogonal concepts?
 
 E.g. like having a work and home activity and having a desktop setup with 6
 virtual desktops?

in this case desktop = desktop containment.
in the first draft i had containment but then, is just desktop containments 
and there also panel containments, called Panel

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


Re: Changes in plasma desktop scripting

2014-03-29 Thread Kevin Krammer
On Saturday, 2014-03-29, 17:44:48, Marco Martin wrote:
 On Friday 28 March 2014 21:56:55 Kevin Krammer wrote:
  I might be confusing terminology but aren't desktops and activities
  orthogonal concepts?
  
  E.g. like having a work and home activity and having a desktop setup with
  6
  virtual desktops?
 
 in this case desktop = desktop containment.
 in the first draft i had containment but then, is just desktop
 containments and there also panel containments, called Panel

Wouldn't it be then make more sense to use desktopContainments?

And isn't this a rather invasive change behavioral wise?

I mean if you currently have a script that addresses activities you would then 
(after porting) have a script addressing containments?

Or did the old API not actually address activities and you are fixing that 
misnaming?

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring


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


Re: Changes in plasma desktop scripting

2014-03-29 Thread Kevin Krammer
On Saturday, 2014-03-29, 17:32:14, Sebastian Kügler wrote:
 On Friday, March 28, 2014 21:56:55 Kevin Krammer wrote:
  I might be confusing terminology but aren't desktops and activities
  orthogonal  concepts?
  
  E.g. like having a work and home activity and having a desktop setup with
  6
  virtual desktops?
 
 Mostly, but we have for example an active desktop per activity, so when
 switching activities, it remembers the desktop you're on, and will go back
 to that desktop when you switch back to that activity.

Sure, but if you have, e.g. 6 desktops and 2 activities, I would expect a 
JavaScript call for activities to return an array of 2 objects while a call to 
a function containing desktops would return 6.

Or is the desktops array a property of an activity object?

Cheers,
Kevin
-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring


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


Re: Changes in plasma desktop scripting

2014-03-28 Thread Kevin Krammer
Hi Marco,

On Thursday, 2014-03-27, 21:39:12, Marco Martin wrote:
 Hi all,
 
 we had still a problem in the plasma desktop scripting api, because it comes
 from a time when one containment == one activity, therefore right now
 adding new activities from the script is pretty much broken.
 
 Since now is the only moment we can screw the api, today I made the
 following changes:
 activities() - desktops()
 activityById() - desktopById()
 activityForScreen() - desktopForScreen()

I might be confusing terminology but aren't desktops and activities orthogonal 
concepts?

E.g. like having a work and home activity and having a desktop setup with 6 
virtual desktops?

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring


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


Changes in plasma desktop scripting

2014-03-27 Thread Marco Martin
Hi all,

we had still a problem in the plasma desktop scripting api, because it comes 
from a time when one containment == one activity, therefore right now adding 
new activities from the script is pretty much broken.

Since now is the only moment we can screw the api, today I made the following 
changes:
activities() - desktops()
activityById() - desktopById()
activityForScreen() - desktopForScreen()

To create a new activity, there is the new global function
createActivity(activtyName, containmentPlugin (optional))

when you want to access the actual containments created by the activity, you 
do

Array[containments] = desktopsForActivity(activityId)

Opinions? comments?

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


Re: Changes in plasma desktop scripting

2014-03-27 Thread Marco Martin
On Thursday 27 March 2014 21:39:12 Marco Martin wrote:
 Hi all,
 
 we had still a problem in the plasma desktop scripting api, because it comes
 from a time when one containment == one activity, therefore right now
 adding new activities from the script is pretty much broken.
 
 Since now is the only moment we can screw the api, today I made the
 following changes:
 activities() - desktops()
 activityById() - desktopById()
 activityForScreen() - desktopForScreen()


I have also updated the documentation on a clone page of the docs of the 
plasma1 version:
http://techbase.kde.org/KDE_System_Administration/PlasmaTwoDesktopScripting


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