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 667140 - Refactor IProperties interface a bit
Refactor IProperties interface a bit
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-01-02 15:54 UTC by Zeeshan Ali
Modified: 2016-03-31 13:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Refactor IProperties interface a bit (5.72 KB, patch)
2012-01-02 15:54 UTC, Zeeshan Ali
reviewed Details | Review
Clean-up IProperties interface a bit (5.75 KB, patch)
2012-01-02 18:05 UTC, Zeeshan Ali
committed Details | Review

Description Zeeshan Ali 2012-01-02 15:54:20 UTC
- Rename to PropertiesProvider.
- Put into separate vala file.
Comment 1 Zeeshan Ali 2012-01-02 15:54:21 UTC
Created attachment 204454 [details] [review]
Refactor IProperties interface a bit

- Rename to PropertiesProvider.
- Put into separate vala file.
Comment 2 Marc-Andre Lureau 2012-01-02 16:05:57 UTC
Review of attachment 204454 [details] [review]:

::: src/machine.vala
@@ +4,3 @@
 using Gtk;
 
+private abstract class Boxes.Machine: Boxes.CollectionItem, Boxes.PropertiesProvider {

Why did you drop the "I" prefix for interfaces? We should be consistant here.
Comment 3 Marc-Andre Lureau 2012-01-02 16:06:38 UTC
Review of attachment 204454 [details] [review]:

I would change title to s/Refactor/Move
Comment 4 Zeeshan Ali 2012-01-02 16:43:53 UTC
(In reply to comment #2)
> Review of attachment 204454 [details] [review]:
> 
> ::: src/machine.vala
> @@ +4,3 @@
>  using Gtk;
> 
> +private abstract class Boxes.Machine: Boxes.CollectionItem,
> Boxes.PropertiesProvider {
> 
> Why did you drop the "I" prefix for interfaces? We should be consistant here.

There is only one other interface so we can call that inconsistent and change name of that instead. :) Was never a fan of indicating types in names, we might as well prefix all classnames with 'C' so I think it just makes the name ugly but if you feel strongly about this, we can keep the 'I' prefix.
Comment 5 Marc-Andre Lureau 2012-01-02 17:00:41 UTC
I too prefer to keep the I for similar reasons explained here, but I don't feel very strongly about it.

http://stackoverflow.com/questions/2728093/to-use-the-i-prefix-for-interfaces-or-not-to

Only that we should be consistant. Instead of changing things without real reasons, I prefer to keep it the way they are, or we could change it every second day.
Comment 6 Zeeshan Ali 2012-01-02 17:14:43 UTC
(In reply to comment #5)
> I too prefer to keep the I for similar reasons explained here, but I don't feel
> very strongly about it.
> 
> http://stackoverflow.com/questions/2728093/to-use-the-i-prefix-for-interfaces-or-not-to

The top answer there has a fairly reasonable objection to it in the 2nd comment.

> Only that we should be consistant.

Won't argue against that.

> Instead of changing things without real
> reasons, I prefer to keep it the way they are, or we could change it every
> second day.

The reason would be to have a more meaningful/descriptive name.
Comment 7 Zeeshan Ali 2012-01-02 17:19:53 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > I too prefer to keep the I for similar reasons explained here, but I don't feel
> > very strongly about it.
> > 
> > http://stackoverflow.com/questions/2728093/to-use-the-i-prefix-for-interfaces-or-not-to
> 
> The top answer there has a fairly reasonable objection to it in the 2nd
> comment.

 Oh and this answer makes more sense to me: http://stackoverflow.com/a/2728180/988490
Comment 8 Marc-Andre Lureau 2012-01-02 17:29:04 UTC
(In reply to comment #7)
>  Oh and this answer makes more sense to me:
> http://stackoverflow.com/a/2728180/988490

Not to most people (on stackoverflow), and his points are either arguable or do not apply to Vala.

If you insist, please drop the 'I' everywhere, (and submit a patch to gobject tutorial ;)
Comment 9 Zeeshan Ali 2012-01-02 18:05:09 UTC
Created attachment 204464 [details] [review]
Clean-up IProperties interface a bit

- Rename to IPropertiesProvider.
- Put into separate vala file.
Comment 10 Marc-Andre Lureau 2012-01-02 21:04:57 UTC
Review of attachment 204464 [details] [review]:

ack
Comment 11 Zeeshan Ali 2012-01-02 21:13:50 UTC
Attachment 204464 [details] pushed as 8a767e8 - Clean-up IProperties interface a bit