Merge lp://qastaging/~elementary-dev-community/pantheon-files/vala-code-style into lp://qastaging/~elementary-apps/pantheon-files/trunk

Proposed by Julián Unrrein
Status: Merged
Approved by: Cody Garver
Approved revision: 1280
Merged at revision: 1321
Proposed branch: lp://qastaging/~elementary-dev-community/pantheon-files/vala-code-style
Merge into: lp://qastaging/~elementary-apps/pantheon-files/trunk
Diff against target: 16992 lines (+3254/-3531)
104 files modified
libcore/Plugin.vala (+8/-10)
libcore/PluginManager.vala (+70/-94)
libcore/eel-accessibility.c (+14/-14)
libcore/eel-accessibility.h (+1/-1)
libcore/eel-debug.c (+5/-5)
libcore/eel-debug.h (+5/-5)
libcore/eel-fcts.c (+7/-7)
libcore/eel-fcts.h (+1/-1)
libcore/eel-gdk-extensions.c (+2/-2)
libcore/eel-gio-extensions.c (+6/-6)
libcore/eel-gio-extensions.h (+5/-5)
libcore/eel-glib-extensions.c (+3/-3)
libcore/eel-glib-extensions.h (+1/-1)
libcore/eel-gtk-extensions.c (+14/-14)
libcore/eel-gtk-extensions.h (+2/-2)
libcore/eel-pango-extensions.c (+1/-1)
libcore/eel-stock-dialogs.c (+2/-2)
libcore/eel-string.c (+10/-10)
libcore/eel-ui.c (+2/-2)
libcore/eel-vfs-extensions.c (+1/-1)
libcore/eel-vfs-extensions.h (+1/-1)
libcore/fm-list-model.c (+9/-9)
libcore/fm-list-model.h (+4/-4)
libcore/gof-callwhenready.vala (+15/-19)
libcore/gof-directory-async.vala (+72/-104)
libcore/gof-file.c (+120/-120)
libcore/gof-file.h (+1/-1)
libcore/gof-preferences.vala (+9/-9)
libcore/marlin-exec.c (+6/-6)
libcore/marlin-exec.h (+5/-5)
libcore/marlin-file-changes-queue.c (+9/-9)
libcore/marlin-file-changes-queue.h (+5/-5)
libcore/marlin-file-conflict-dialog.c (+7/-7)
libcore/marlin-file-conflict-dialog.h (+3/-3)
libcore/marlin-file-operations.c (+55/-55)
libcore/marlin-file-operations.h (+15/-15)
libcore/marlin-file-utilities.c (+5/-5)
libcore/marlin-icon-info.c (+13/-13)
libcore/marlin-icon-info.h (+2/-2)
libcore/marlin-intl.h (+1/-1)
libcore/marlin-progress-info.c (+5/-5)
libcore/marlin-progress-info.h (+5/-5)
libcore/marlin-trash-monitor.c (+6/-6)
libcore/marlin-trash-monitor.h (+5/-5)
libcore/marlin-undostack-manager.c (+35/-35)
libcore/marlin-undostack-manager.h (+1/-1)
libcore/tests/Makefile.am (+1/-1)
libcore/tests/marlincore-tests-file.c (+11/-11)
libcore/tests/marlincore-tests-gof.c (+1/-1)
libcore/tests/marlincore-tests-icon-info.c (+2/-2)
libwidgets/Animations.vala (+11/-10)
libwidgets/BreadcrumbsElements.vala (+127/-122)
libwidgets/BreadcrumbsEntry.vala (+248/-271)
libwidgets/LocationBar.vala (+430/-496)
libwidgets/tests/tests-pathbar.vala (+111/-114)
marlin-daemon/client.vala (+0/-2)
marlin-daemon/marlind-tagging.vala (+65/-73)
plugins/marlin-ctags/plugin.vala (+21/-34)
plugins/marlin-trash/plugin.vala (+23/-32)
src/View/Browser.vala (+39/-60)
src/View/Chrome/ColorWidget.vala (+55/-60)
src/View/Chrome/ImgEventBox.vala (+22/-28)
src/View/Chrome/TopMenu.vala (+37/-38)
src/View/Chrome/ViewSwicher.vala (+39/-46)
src/View/Chrome/XsEntry.vala (+11/-16)
src/View/DbusTags.vala (+9/-11)
src/View/DirectoryNotFound.vala (+8/-8)
src/View/DiskRenderer.vala (+17/-18)
src/View/LocationBar.vala (+142/-167)
src/View/PropertiesWindow.vala (+199/-219)
src/View/Resources.vala (+4/-4)
src/View/ViewContainer.vala (+64/-65)
src/View/ViewMode.vala (+0/-1)
src/View/Window.vala (+12/-8)
src/eel-editable-label.c (+258/-258)
src/eel-editable-label.h (+4/-4)
src/exo-icon-view.c (+356/-356)
src/exo-icon-view.h (+5/-5)
src/exo-tree-view.c (+3/-3)
src/fm-abstract-icon-view.c (+16/-16)
src/fm-columns-view.c (+17/-17)
src/fm-directory-view.c (+101/-101)
src/fm-directory-view.h (+18/-18)
src/fm-icon-view-ui.xml (+1/-1)
src/fm-icon-view.c (+4/-4)
src/fm-list-view.c (+17/-17)
src/gof-window-slot.c (+9/-9)
src/marlin-bookmark-list.c (+27/-28)
src/marlin-bookmark-list.h (+1/-1)
src/marlin-bookmark.c (+22/-21)
src/marlin-bookmark.h (+2/-2)
src/marlin-clipboard-manager.c (+1/-1)
src/marlin-connect-server-dialog.c (+2/-2)
src/marlin-deep-count.vala (+10/-16)
src/marlin-dnd.c (+1/-1)
src/marlin-dnd.h (+1/-1)
src/marlin-icon-renderer.c (+22/-22)
src/marlin-icon-renderer.h (+1/-1)
src/marlin-text-renderer.c (+13/-13)
src/marlin-text-renderer.h (+1/-1)
src/marlin-thumbnailer.c (+51/-51)
src/marlin-thumbnailer.h (+5/-5)
src/tests/marlintests.c (+1/-1)
src/tests/mwc_tests.c (+1/-1)
To merge this branch: bzr merge lp://qastaging/~elementary-dev-community/pantheon-files/vala-code-style
Reviewer Review Type Date Requested Status
Cody Garver (community) Approve
David Gomes (community) Approve
Review via email: mp+176244@code.qastaging.launchpad.net

Commit message

Improve code style of all Vala source files.

Description of the change

Improve code style of all Vala source files to adjust them to elementary code style guidelines.

Mostly, the changes were to ensure the following:
- Spaces before and after opening and closing parenthesis, respectively.
- Opening curly braces in the same line as the opening statement.
- Do not use "using" statements.
- Remove trailing whitespace.

To post a comment you must log in.
Revision history for this message
David Gomes (davidgomes) wrote :

(all lines refer to a diff line)

138 while(info != null) { → while(info != null) {
221 load_module(Path.build_filename(parent, keyfile.get_string ("Plugin", "File")), name); → load_module (Path.build_filename (parent, keyfile.get_string ("Plugin", "File")), name);
280 public void ui(Gtk.UIManager data) { → public void ui (Gtk.UIManager data) {
989 if(old_adj_value != adj.value) → if (old_adj_value != adj.value) (yes I know it's a comment, but it doesn't hurt)
1003 align it correctly, that is, the 'M' on the second line should be aligned with the 'i' on the first line
1033 return text_width + left_padding + right_padding + last_height/2; → return text_width + left_padding + right_padding + last_height / 2;
1038 return (max_width > 0 ? max_width : text_width) + left_padding + right_padding + last_height/2; → return (max_width > 0 ? max_width : text_width) + left_padding + right_padding + last_height / 2;
1085 cr.set_source_rgb (0,0,0); → cr.set_source_rgb (0, 0, 0);
1129-1160 height/2 → height / 2
1187 x -= Math.sin (offset*Math.PI/2) * width; → x -= Math.sin (offset * Math.PI / 2) * width;
1206 & 1210 align them correctly and ()/2 → () / 2

Actually, this is going to be too much, can you change branch owner to elementary-dev-community so I can help with fixing what's left?

Also, I have to say, bravo and very good job and thank you so much for this branch!

review: Needs Fixing
Revision history for this message
Julián Unrrein (junrrein) wrote :

Thanks for the review David!

I have given ownership of the branch to elementary-dev-community. Notice that I didn't apply your suggestions, since unfortunately I don't have the time to keep developing now.

Regards.

Revision history for this message
David Gomes (davidgomes) wrote :

I will be working on it on the next few days but it'll take a while, it'll surely get done I just don't know when and I'll have to keep updating it to trunk.

1269. By David Gomes

Some code style cleanup on libcore/ and libwidgets/.

1270. By David Gomes

Stripped trailing whitespace from src/.

1271. By David Gomes

Stripped more trailing white space and fixed a typo on Animations.vala.

1272. By David Gomes

Fixed LocationBar.vala code style.

1273. By David Gomes

Fixed BreadcrumbsEntry.vala code style.

Revision history for this message
David Gomes (davidgomes) wrote :

It's an 18,000+ lines diff now and I even ended up fixing stuff that is not Vala, but I think it's much much better now and this ought to make the difference.

review: Approve
Revision history for this message
David Gomes (davidgomes) wrote :

>Text conflict in src/View/OverlayBar.vala
>Text conflict in src/View/Window.vala
>Contents conflict in src/marlin-main.c
>Text conflict in src/marlin-places-sidebar.c

Only that left to fix.

Revision history for this message
Julián Unrrein (junrrein) wrote :

marlin-main.c doesn't exist anymore in trunk. You can safely delete it.

1274. By David Gomes

Removed marlin-main.c

1275. By David Gomes

Fixed some conflicts.

1276. By David Gomes

Attempt to fix marlin-places-sidebar.c conflict.

1277. By David Gomes

Fixing src/View/Window.vala conflicts.

1278. By David Gomes

Got Window.vala from trunk.

1279. By David Gomes

Got OverlayBar.vala from trunk.

Revision history for this message
David Gomes (davidgomes) wrote :

It builds for me on 13.04, but somebody else has to approve this now because I've worked too much on it.

Also, it only builds if we merge it with trunk first, by itself it won't build but that's not a problem.

review: Approve
Revision history for this message
Cody Garver (codygarver) wrote :

The game plan: this merge creates conflicts with all currently proposed merges. So we are going to merge the branches that are named *-to-vala. Then Munchor is going to fix the conflicts that caused in THIS branch. Then we will merge THIS branch and tell all the outstanding reviews to merge with trunk and fix their conflicts.

Revision history for this message
David Gomes (davidgomes) wrote :

Can you believe this doesn't conflict? Awesome.

Revision history for this message
Cody Garver (codygarver) wrote :

Fix the conflicts and lets finally get this merged now that 0.1.4 is out

review: Needs Fixing
1280. By Julián Unrrein

Merge changes from trunk. Resolve conflicts.

Revision history for this message
Julián Unrrein (junrrein) wrote :

I merged changes from trunk and fixed the conflicts. I can compile, and Files didn't explode on me. That's all that I tested.

Revision history for this message
Cody Garver (codygarver) wrote :

Thanks!

review: Approve

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: