Re: Review Request 125921: Don't rely graphic objects in panel script engine

2015-12-28 Thread David Edmundson

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

(Updated Dec. 28, 2015, 3:43 p.m.)


Review request for Plasma.


Changes
---

Use a shared function to get the right config


Repository: plasma-workspace


Description
---

The basic design of Plasma is that scripts and and the shell (in theory)
manipulate a tree of basic applet geometry and configs.

Plasmashell then reacts to those changes and displays them visually with
a distinct separation between the layout and UI.

Panel's scriptengine seemed to do away with all, and try and manipulate the 
graphic object directly..which might not exist and that leads to complex code.

This changes it to read/write from the same config object as
PanelView will use. More akin to how the script engine for applet and 
contiainment work.

If there's a view for this panel, we update immediately, otherwise it'll just 
get loaded when it's needed. PanelView::reload() has the error checking/bounds 
management so no point duplicating that.

Idea is to fix the same bug as https://git.reviewboard.kde.org/r/125920/ but 
also clean up a lot of the code which I thought had grown a bit complex. 

Bit too big to backport though. Might be Plasma 5.6 material at this point.


Diffs (updated)
-

  shell/panelview.h 9f8d4ce9c92e86d81aa8076ca8eb01c0eb8a18c9 
  shell/panelview.cpp 4dec906b63bd535b3add732f2f5e3971c0a5f37a 
  shell/scripting/panel.h f7279100a7c79f2f15917b88d8199573a379cb7d 
  shell/scripting/panel.cpp fb0ff2119850823c4fb76f223ed04f0e9c0d0010 

Diff: https://git.reviewboard.kde.org/r/125921/diff/


Testing
---

Modified my layout.js to set min, max sizes as well as alignment and offset 
which were previously broken.

Once loaded opened the interactive editor and run stuff like:
panel = panelById(1);
panel.alignment = "center"
panel.height = 40

Seems to work as before


Thanks,

David Edmundson

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


Re: Review Request 125921: Don't rely graphic objects in panel script engine

2015-12-28 Thread David Edmundson

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

(Updated Dec. 28, 2015, 3:44 p.m.)


Review request for Plasma.


Bugs: 355918
https://bugs.kde.org/show_bug.cgi?id=355918


Repository: plasma-workspace


Description
---

The basic design of Plasma is that scripts and and the shell (in theory)
manipulate a tree of basic applet geometry and configs.

Plasmashell then reacts to those changes and displays them visually with
a distinct separation between the layout and UI.

Panel's scriptengine seemed to do away with all, and try and manipulate the 
graphic object directly..which might not exist and that leads to complex code.

This changes it to read/write from the same config object as
PanelView will use. More akin to how the script engine for applet and 
contiainment work.

If there's a view for this panel, we update immediately, otherwise it'll just 
get loaded when it's needed. PanelView::reload() has the error checking/bounds 
management so no point duplicating that.

Idea is to fix the same bug as https://git.reviewboard.kde.org/r/125920/ but 
also clean up a lot of the code which I thought had grown a bit complex. 

Bit too big to backport though. Might be Plasma 5.6 material at this point.


Diffs
-

  shell/panelview.h 9f8d4ce9c92e86d81aa8076ca8eb01c0eb8a18c9 
  shell/panelview.cpp 4dec906b63bd535b3add732f2f5e3971c0a5f37a 
  shell/scripting/panel.h f7279100a7c79f2f15917b88d8199573a379cb7d 
  shell/scripting/panel.cpp fb0ff2119850823c4fb76f223ed04f0e9c0d0010 

Diff: https://git.reviewboard.kde.org/r/125921/diff/


Testing
---

Modified my layout.js to set min, max sizes as well as alignment and offset 
which were previously broken.

Once loaded opened the interactive editor and run stuff like:
panel = panelById(1);
panel.alignment = "center"
panel.height = 40

Seems to work as before


Thanks,

David Edmundson

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


Re: Review Request 125921: Don't rely graphic objects in panel script engine

2015-12-28 Thread David Edmundson

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

(Updated Dec. 28, 2015, 4:24 p.m.)


Status
--

This change has been marked as submitted.


Review request for Plasma.


Changes
---

Submitted with commit 0dc7f6c3e5d62f6d8211e5d024ee3080b2baae37 by David 
Edmundson to branch master.


Bugs: 355918
https://bugs.kde.org/show_bug.cgi?id=355918


Repository: plasma-workspace


Description
---

The basic design of Plasma is that scripts and and the shell (in theory)
manipulate a tree of basic applet geometry and configs.

Plasmashell then reacts to those changes and displays them visually with
a distinct separation between the layout and UI.

Panel's scriptengine seemed to do away with all, and try and manipulate the 
graphic object directly..which might not exist and that leads to complex code.

This changes it to read/write from the same config object as
PanelView will use. More akin to how the script engine for applet and 
contiainment work.

If there's a view for this panel, we update immediately, otherwise it'll just 
get loaded when it's needed. PanelView::reload() has the error checking/bounds 
management so no point duplicating that.

Idea is to fix the same bug as https://git.reviewboard.kde.org/r/125920/ but 
also clean up a lot of the code which I thought had grown a bit complex. 

Bit too big to backport though. Might be Plasma 5.6 material at this point.


Diffs
-

  shell/panelview.h 9f8d4ce9c92e86d81aa8076ca8eb01c0eb8a18c9 
  shell/panelview.cpp 4dec906b63bd535b3add732f2f5e3971c0a5f37a 
  shell/scripting/panel.h f7279100a7c79f2f15917b88d8199573a379cb7d 
  shell/scripting/panel.cpp fb0ff2119850823c4fb76f223ed04f0e9c0d0010 

Diff: https://git.reviewboard.kde.org/r/125921/diff/


Testing
---

Modified my layout.js to set min, max sizes as well as alignment and offset 
which were previously broken.

Once loaded opened the interactive editor and run stuff like:
panel = panelById(1);
panel.alignment = "center"
panel.height = 40

Seems to work as before


Thanks,

David Edmundson

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


Re: Review Request 125921: Don't rely graphic objects in panel script engine

2015-12-28 Thread Marco Martin

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125921/#review90228
---

Ship it!


Ship It!

- Marco Martin


On Dec. 28, 2015, 3:44 p.m., David Edmundson wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125921/
> ---
> 
> (Updated Dec. 28, 2015, 3:44 p.m.)
> 
> 
> Review request for Plasma.
> 
> 
> Bugs: 355918
> https://bugs.kde.org/show_bug.cgi?id=355918
> 
> 
> Repository: plasma-workspace
> 
> 
> Description
> ---
> 
> The basic design of Plasma is that scripts and and the shell (in theory)
> manipulate a tree of basic applet geometry and configs.
> 
> Plasmashell then reacts to those changes and displays them visually with
> a distinct separation between the layout and UI.
> 
> Panel's scriptengine seemed to do away with all, and try and manipulate the 
> graphic object directly..which might not exist and that leads to complex code.
> 
> This changes it to read/write from the same config object as
> PanelView will use. More akin to how the script engine for applet and 
> contiainment work.
> 
> If there's a view for this panel, we update immediately, otherwise it'll just 
> get loaded when it's needed. PanelView::reload() has the error 
> checking/bounds management so no point duplicating that.
> 
> Idea is to fix the same bug as https://git.reviewboard.kde.org/r/125920/ but 
> also clean up a lot of the code which I thought had grown a bit complex. 
> 
> Bit too big to backport though. Might be Plasma 5.6 material at this point.
> 
> 
> Diffs
> -
> 
>   shell/panelview.h 9f8d4ce9c92e86d81aa8076ca8eb01c0eb8a18c9 
>   shell/panelview.cpp 4dec906b63bd535b3add732f2f5e3971c0a5f37a 
>   shell/scripting/panel.h f7279100a7c79f2f15917b88d8199573a379cb7d 
>   shell/scripting/panel.cpp fb0ff2119850823c4fb76f223ed04f0e9c0d0010 
> 
> Diff: https://git.reviewboard.kde.org/r/125921/diff/
> 
> 
> Testing
> ---
> 
> Modified my layout.js to set min, max sizes as well as alignment and offset 
> which were previously broken.
> 
> Once loaded opened the interactive editor and run stuff like:
> panel = panelById(1);
> panel.alignment = "center"
> panel.height = 40
> 
> Seems to work as before
> 
> 
> Thanks,
> 
> David Edmundson
> 
>

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


Review Request 125921: Don't rely graphic objects in panel script engine

2015-11-02 Thread David Edmundson

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

Review request for Plasma.


Repository: plasma-workspace


Description
---

The basic design of Plasma is that scripts and and the shell (in theory)
manipulate a tree of basic applet geometry and configs.

Plasmashell then reacts to those changes and displays them visually with
a distinct separation between the layout and UI.

Panel's scriptengine seemed to do away with all, and try and manipulate the 
graphic object directly..which might not exist and that leads to complex code.

This changes it to read/write from the same config object as
PanelView will use. More akin to how the script engine for applet and 
contiainment work.

If there's a view for this panel, we update immediately, otherwise it'll just 
get loaded when it's needed. PanelView::reload() has the error checking/bounds 
management so no point duplicating that.

Idea is to fix the same bug as https://git.reviewboard.kde.org/r/125920/ but 
also clean up a lot of the code which I thought had grown a bit complex. 

Bit too big to backport though. Might be Plasma 5.6 material at this point.


Diffs
-

  shell/panelview.cpp 2a80a65a9bbcaaad82a52e28525c73e816046a3d 
  shell/scripting/panel.h f7279100a7c79f2f15917b88d8199573a379cb7d 
  shell/scripting/panel.cpp bd78fc9b9dd9577012600b2d41e3822e95ae 

Diff: https://git.reviewboard.kde.org/r/125921/diff/


Testing
---

Modified my layout.js to set min, max sizes as well as alignment and offset 
which were previously broken.

Once loaded opened the interactive editor and run stuff like:
panel = panelById(1);
panel.alignment = "center"
panel.height = 40

Seems to work as before


Thanks,

David Edmundson

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


Re: Review Request 125921: Don't rely graphic objects in panel script engine

2015-11-02 Thread Marco Martin

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125921/#review87882
---


good direction, just a little point below


shell/scripting/panel.cpp (line 124)


I think i would feel better if this was shared with panelview, to save 
possible very weird bugs (i wonder if it could be made static from panelview)


- Marco Martin


On Nov. 2, 2015, 4:26 p.m., David Edmundson wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125921/
> ---
> 
> (Updated Nov. 2, 2015, 4:26 p.m.)
> 
> 
> Review request for Plasma.
> 
> 
> Repository: plasma-workspace
> 
> 
> Description
> ---
> 
> The basic design of Plasma is that scripts and and the shell (in theory)
> manipulate a tree of basic applet geometry and configs.
> 
> Plasmashell then reacts to those changes and displays them visually with
> a distinct separation between the layout and UI.
> 
> Panel's scriptengine seemed to do away with all, and try and manipulate the 
> graphic object directly..which might not exist and that leads to complex code.
> 
> This changes it to read/write from the same config object as
> PanelView will use. More akin to how the script engine for applet and 
> contiainment work.
> 
> If there's a view for this panel, we update immediately, otherwise it'll just 
> get loaded when it's needed. PanelView::reload() has the error 
> checking/bounds management so no point duplicating that.
> 
> Idea is to fix the same bug as https://git.reviewboard.kde.org/r/125920/ but 
> also clean up a lot of the code which I thought had grown a bit complex. 
> 
> Bit too big to backport though. Might be Plasma 5.6 material at this point.
> 
> 
> Diffs
> -
> 
>   shell/panelview.cpp 2a80a65a9bbcaaad82a52e28525c73e816046a3d 
>   shell/scripting/panel.h f7279100a7c79f2f15917b88d8199573a379cb7d 
>   shell/scripting/panel.cpp bd78fc9b9dd9577012600b2d41e3822e95ae 
> 
> Diff: https://git.reviewboard.kde.org/r/125921/diff/
> 
> 
> Testing
> ---
> 
> Modified my layout.js to set min, max sizes as well as alignment and offset 
> which were previously broken.
> 
> Once loaded opened the interactive editor and run stuff like:
> panel = panelById(1);
> panel.alignment = "center"
> panel.height = 40
> 
> Seems to work as before
> 
> 
> Thanks,
> 
> David Edmundson
> 
>

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