Merge lp://qastaging/~donadigo/switchboard-plug-networking/common-rewrite into lp://qastaging/~elementary-pantheon/switchboard-plug-networking/trunk

Proposed by Adam Bieńkowski
Status: Needs review
Proposed branch: lp://qastaging/~donadigo/switchboard-plug-networking/common-rewrite
Merge into: lp://qastaging/~elementary-pantheon/switchboard-plug-networking/trunk
Diff against target: 5097 lines (+2200/-2108)
35 files modified
src/CMakeLists.txt (+21/-17)
src/Plug.vala (+45/-45)
src/Utils.vala (+0/-251)
src/Widgets/Device/DeviceItem.vala (+37/-28)
src/Widgets/Device/DevicePage.vala (+4/-5)
src/Widgets/DeviceList.vala (+31/-25)
src/Widgets/EthernetView.vala (+11/-8)
src/Widgets/Hotspot/HotspotDialog.vala (+0/-227)
src/Widgets/HotspotView.vala (+38/-50)
src/Widgets/InfoBox.vala (+10/-10)
src/Widgets/Page.vala (+18/-22)
src/Widgets/Proxy/ProxyView.vala (+13/-13)
src/Widgets/VPNView.vala (+29/-42)
src/Widgets/View.vala (+159/-0)
src/Widgets/WiFiView.vala (+38/-116)
src/common/Utils.vala (+0/-63)
src/common/Widgets/AbstractEtherInterface.vala (+0/-77)
src/common/Widgets/AbstractHotspotInterface.vala (+0/-40)
src/common/Widgets/AbstractWifiInterface.vala (+0/-371)
src/common/Widgets/NMVisualizer.vala (+0/-156)
src/common/Widgets/VPNMenuItem.vala (+0/-121)
src/common/Widgets/WidgetNMInterface.vala (+0/-58)
src/common/Widgets/WifiMenuItem.vala (+0/-214)
src/common/rfkill.vala (+0/-149)
src/shared/Abstract/AbstractEthernetView.vala (+71/-0)
src/shared/Abstract/AbstractHotspotView.vala (+45/-0)
src/shared/Abstract/AbstractView.vala (+34/-0)
src/shared/Abstract/AbstractWiFiView.vala (+345/-0)
src/shared/HotspotDialog.vala (+226/-0)
src/shared/PlaceholderLabel.vala (+34/-0)
src/shared/RFKill.vala (+168/-0)
src/shared/Utils.vala (+385/-0)
src/shared/VPNMenuItem.vala (+112/-0)
src/shared/ViewManager.vala (+144/-0)
src/shared/WifiMenuItem.vala (+182/-0)
To merge this branch: bzr merge lp://qastaging/~donadigo/switchboard-plug-networking/common-rewrite
Reviewer Review Type Date Requested Status
Zisu Andrei (community) Needs Fixing
kay van der Zander (community) Needs Fixing
xapantu Pending
Review via email: mp+302207@code.qastaging.launchpad.net

Commit message

* Complete common code rewrite.

Description of the change

This is almost a complete rewrite of a "common" code which is a code which is a base for this plug and network indicator.

"Common" code is now named "shared".

The changes are made to the naming of the classes and methods, code style and there are a few additions to the common API itself.

All of the classes that need to be implemented are now in the "shared/Abstract" folder.

Classes are now named "Abstract[DeviceType]View" instead of "Abstract[DeviceType]Interface"
"NMVisualizer" class has been renamed to "ViewManager".

The classes are now inheriting Gtk.Bin instead of hardcoding each widget for the projects.
I moved Hotspot and WiFi utilities to the shared Utils class for easier access from the indicator.

Everything should be working as it worked before, there are no additional features introduced in this branch.

This branch needs extensive testing before it can get merged (at least two reviews for UI / function testing).

Obviously this most probably won't make into Loki since there is so many changes introduced.

To post a comment you must log in.
Revision history for this message
kay van der Zander (kay20) wrote :

see diff comments.

please use smaller functions instead of 40+lines in a update function.

don't duplicade code

anduse proper get set functions instead of those ugly property implementation

review: Needs Fixing
291. By Adam Bieńkowski

Update the branch with suggestions from kay

Revision history for this message
Adam Bieńkowski (donadigo) wrote :

kay20: I did fix some of your issues, but not all of them, because I do not agree with them, and the elementary code-style has changed so:

- We don't use "this" anymore. It's used for the case where you have a property and you want to assign it from the parameter like this:
this.a = a;

- I don't agree there should be white lines between the variable creation and checking it for something, simply because it looks for me better and actually holds the concept that this assignment is now verified.

- I moved the portions of the code to shorter methods, however I still couldn't make them all, because they use a lot of variables they depend on and if I would make them into smaller methods, these would need to have parameters, but I agree into moving the code to smaller methods, this branch isn't just place for this.

Revision history for this message
Zisu Andrei (matzipan) wrote :

Some comments inline.

I'm not familiarised with the network plug, so I'm not aware of all the subtleties but I did not notice anything fundamentally wrong.

Ideally, changes like this should be done in smaller merges in the future.

review: Needs Fixing
Revision history for this message
Zisu Andrei (matzipan) wrote :

There are also some merge commits.

review: Needs Fixing
292. By Adam Bieńkowski

Address issues from Andrei

Revision history for this message
Adam Bieńkowski (donadigo) wrote :

matzipan: I addressed all your issues, except the label styling and unmanaged state of NetworkManager. These should probably be done in a different branch, the code you're seeing is just copied and refactored into more elegant code structure.

Revision history for this message
Zisu Andrei (matzipan) wrote :

Whoops. Meant to say there are some merge conflicts and ended up saying there are some merge commits.

review: Needs Fixing
293. By Adam Bieńkowski

Resolve conflicts and merge trunk

294. By Adam Bieńkowski

Restore, rename, and modify deleted files

Unmerged revisions

294. By Adam Bieńkowski

Restore, rename, and modify deleted files

293. By Adam Bieńkowski

Resolve conflicts and merge trunk

292. By Adam Bieńkowski

Address issues from Andrei

291. By Adam Bieńkowski

Update the branch with suggestions from kay

290. By Adam Bieńkowski

Almost completely rewrite common code

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: