After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 764258 - [PATCH] Split lightsoff.vala in two files.
[PATCH] Split lightsoff.vala in two files.
Status: RESOLVED OBSOLETE
Product: lightsoff
Classification: Applications
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: lightsoff-maint
lightsoff-maint
Depends on:
Blocks:
 
 
Reported: 2016-03-27 14:00 UTC by Arnaud B.
Modified: 2018-05-22 11:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Split lightsoff.vala in two files. (17.12 KB, patch)
2016-03-27 14:01 UTC, Arnaud B.
none Details | Review
Split lightsoff.vala in two files. (11.63 KB, patch)
2016-03-28 23:37 UTC, Arnaud B.
committed Details | Review
Move GSettings level management in game-view.vala. (4.75 KB, patch)
2016-03-29 13:09 UTC, Arnaud B.
accepted-commit_now Details | Review

Description Arnaud B. 2016-03-27 14:00:24 UTC
Here is a patch to move the application logic in one file and the window one in another. That helps working on following changes.
Comment 1 Arnaud B. 2016-03-27 14:01:45 UTC
Created attachment 324836 [details] [review]
Split lightsoff.vala in two files.
Comment 2 Michael Catanzaro 2016-03-28 15:27:54 UTC
Review of attachment 324836 [details] [review]:

I would name the file either lightsoff.vala or simply main.vala, rather than lightsoff-main.vala. Similarly, lightsoff-window.vala I would name simply window.vala. There's no value in having the prefix lightsoff in each name, IMO, and we don't do that for other games.
Comment 3 Arnaud B. 2016-03-28 23:37:51 UTC
Created attachment 324905 [details] [review]
Split lightsoff.vala in two files.

Forgot the po/* files.

(In reply to Michael Catanzaro from comment #2)
> Review of attachment 324836 [details] [review] [review]:
> I would name the file either lightsoff.vala or simply main.vala, rather than
> lightsoff-main.vala.

Quite sure “lightsoff.vala” is less clear than “lightsoff-main.vala”, but it’s probably not something that is important enough to take time to talk about.

> Similarly, lightsoff-window.vala I would name simply window.vala.
> There's no value in having the prefix lightsoff in each name, IMO,
> and we don't do that for other games.

We do it, and there’s a value in having the prefix lightsoff in each name, IMO. But we already discussed that elsewhere, and so that just continues to be time lost for interesting things.
Comment 4 Arnaud B. 2016-03-29 13:09:03 UTC
Created attachment 324936 [details] [review]
Move GSettings level management in game-view.vala.

For now, the management of the game level is in the GameView class, but the update of the related GSettings key is in LightsoffWindow. It’s probably better to change that, so that the window doesn’t have to know anything.
Comment 5 Arnaud B. 2016-03-30 09:43:48 UTC
Comment on attachment 324905 [details] [review]
Split lightsoff.vala in two files.

Committed this one, as per IRC talk. Keeping the other patch around and the bug open for now.
Comment 6 Michael Catanzaro 2016-03-31 19:59:33 UTC
Review of attachment 324936 [details] [review]:

::: src/lightsoff-window.vala
@@ +83,2 @@
     {
+        int level = game_view.current_level;

var
Comment 7 GNOME Infrastructure Team 2018-05-22 11:40:54 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/lightsoff/issues/5.