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 742359 - Improve the code
Improve the code
Status: RESOLVED FIXED
Product: gnome-bluetooth
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-bluetooth-general-maint@gnome.bugs
gnome-bluetooth-general-maint@gnome.bugs
Depends on:
Blocks:
 
 
Reported: 2015-01-05 09:40 UTC by Ignacio Casal Quinteiro (nacho)
Modified: 2015-01-05 10:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Do not include INSTALL generated file (10.05 KB, patch)
2015-01-05 09:42 UTC, Ignacio Casal Quinteiro (nacho)
committed Details | Review
Do not use deprecated margin properties (1.55 KB, patch)
2015-01-05 09:42 UTC, Ignacio Casal Quinteiro (nacho)
committed Details | Review
pairing-dialog use G_DEFINE_WITH_PRIVATE (1.99 KB, patch)
2015-01-05 09:42 UTC, Ignacio Casal Quinteiro (nacho)
accepted-commit_after_freeze Details | Review
pairing-dialog: use "use-header-bar" property (3.48 KB, patch)
2015-01-05 09:42 UTC, Ignacio Casal Quinteiro (nacho)
accepted-commit_after_freeze Details | Review
pairing-dialog: no need to use g_clear_pointer on finalize (928 bytes, patch)
2015-01-05 09:42 UTC, Ignacio Casal Quinteiro (nacho)
committed Details | Review
pairing-dialog: no need to handle the action area anymore (1.49 KB, patch)
2015-01-05 09:42 UTC, Ignacio Casal Quinteiro (nacho)
accepted-commit_now Details | Review
chooser-button: no need to keep a static parent_class var (1.65 KB, patch)
2015-01-05 09:42 UTC, Ignacio Casal Quinteiro (nacho)
committed Details | Review
chooser-button: use g_clear_object (927 bytes, patch)
2015-01-05 09:43 UTC, Ignacio Casal Quinteiro (nacho)
committed Details | Review
chooser: use G_DEFINE_WITH_PRIVATE (3.66 KB, patch)
2015-01-05 09:43 UTC, Ignacio Casal Quinteiro (nacho)
accepted-commit_after_freeze Details | Review
settings-row: use G_DEFINE_TYPE_WITH_PRIVATE (2.42 KB, patch)
2015-01-05 09:43 UTC, Ignacio Casal Quinteiro (nacho)
accepted-commit_after_freeze Details | Review
settings-widget: use G_DEFINE_TYPE_WITH_PRIVATE (2.02 KB, patch)
2015-01-05 09:43 UTC, Ignacio Casal Quinteiro (nacho)
accepted-commit_after_freeze Details | Review
settings: use icon-name intead of stock (885 bytes, patch)
2015-01-05 09:43 UTC, Ignacio Casal Quinteiro (nacho)
accepted-commit_after_freeze Details | Review
pairing-dialog: use a template to create the UI (17.15 KB, patch)
2015-01-05 09:43 UTC, Ignacio Casal Quinteiro (nacho)
accepted-commit_after_freeze Details | Review
settings-row: port to use a template (7.30 KB, patch)
2015-01-05 09:43 UTC, Ignacio Casal Quinteiro (nacho)
accepted-commit_after_freeze Details | Review
Bump glib requirement to 2.38 (741 bytes, patch)
2015-01-05 09:43 UTC, Ignacio Casal Quinteiro (nacho)
accepted-commit_after_freeze Details | Review
Bump gtk version to 3.12 (743 bytes, patch)
2015-01-05 09:43 UTC, Ignacio Casal Quinteiro (nacho)
accepted-commit_after_freeze Details | Review

Description Ignacio Casal Quinteiro (nacho) 2015-01-05 09:40:52 UTC
Use some of the latest stuff to improve the code
Comment 1 Ignacio Casal Quinteiro (nacho) 2015-01-05 09:42:16 UTC
Created attachment 293756 [details] [review]
Do not include INSTALL generated file
Comment 2 Ignacio Casal Quinteiro (nacho) 2015-01-05 09:42:24 UTC
Created attachment 293757 [details] [review]
Do not use deprecated margin properties
Comment 3 Ignacio Casal Quinteiro (nacho) 2015-01-05 09:42:30 UTC
Created attachment 293758 [details] [review]
pairing-dialog use G_DEFINE_WITH_PRIVATE
Comment 4 Ignacio Casal Quinteiro (nacho) 2015-01-05 09:42:37 UTC
Created attachment 293759 [details] [review]
pairing-dialog: use "use-header-bar" property
Comment 5 Ignacio Casal Quinteiro (nacho) 2015-01-05 09:42:43 UTC
Created attachment 293760 [details] [review]
pairing-dialog: no need to use g_clear_pointer on finalize
Comment 6 Ignacio Casal Quinteiro (nacho) 2015-01-05 09:42:50 UTC
Created attachment 293761 [details] [review]
pairing-dialog: no need to handle the action area anymore
Comment 7 Ignacio Casal Quinteiro (nacho) 2015-01-05 09:42:57 UTC
Created attachment 293762 [details] [review]
chooser-button: no need to keep a static parent_class var
Comment 8 Ignacio Casal Quinteiro (nacho) 2015-01-05 09:43:04 UTC
Created attachment 293763 [details] [review]
chooser-button: use g_clear_object
Comment 9 Ignacio Casal Quinteiro (nacho) 2015-01-05 09:43:11 UTC
Created attachment 293765 [details] [review]
chooser: use G_DEFINE_WITH_PRIVATE
Comment 10 Ignacio Casal Quinteiro (nacho) 2015-01-05 09:43:17 UTC
Created attachment 293766 [details] [review]
settings-row: use G_DEFINE_TYPE_WITH_PRIVATE
Comment 11 Ignacio Casal Quinteiro (nacho) 2015-01-05 09:43:22 UTC
Created attachment 293767 [details] [review]
settings-widget: use G_DEFINE_TYPE_WITH_PRIVATE
Comment 12 Ignacio Casal Quinteiro (nacho) 2015-01-05 09:43:28 UTC
Created attachment 293768 [details] [review]
settings: use icon-name intead of stock
Comment 13 Ignacio Casal Quinteiro (nacho) 2015-01-05 09:43:34 UTC
Created attachment 293770 [details] [review]
pairing-dialog: use a template to create the UI
Comment 14 Ignacio Casal Quinteiro (nacho) 2015-01-05 09:43:42 UTC
Created attachment 293771 [details] [review]
settings-row: port to use a template
Comment 15 Ignacio Casal Quinteiro (nacho) 2015-01-05 09:43:51 UTC
Created attachment 293772 [details] [review]
Bump glib requirement to 2.38

This is needed because of G_DEFINE_TYPE_WITH_PRIVATE
Comment 16 Ignacio Casal Quinteiro (nacho) 2015-01-05 09:43:56 UTC
Created attachment 293773 [details] [review]
Bump gtk version to 3.12

This is needed because of gtk_dialog_get_header_bar
Comment 17 Bastien Nocera 2015-01-05 09:56:32 UTC
Review of attachment 293756 [details] [review]:

Sure.
Comment 18 Bastien Nocera 2015-01-05 09:57:38 UTC
Review of attachment 293757 [details] [review]:

Looks fine.
Comment 19 Bastien Nocera 2015-01-05 09:58:57 UTC
Review of attachment 293756 [details] [review]:

Need to prefix the commit subject with "build: "
Comment 20 Bastien Nocera 2015-01-05 09:59:36 UTC
Review of attachment 293757 [details] [review]:

Need to prefix the commit subject with "settings: "
Comment 21 Bastien Nocera 2015-01-05 10:00:39 UTC
Review of attachment 293758 [details] [review]:

Prefix commit subject with "settings: "

I don't really see the use for that change though...

Note that gnome-bluetooth isn't branched for stable yet.
Comment 22 Bastien Nocera 2015-01-05 10:03:20 UTC
Review of attachment 293759 [details] [review]:

That looks fine, was it tested?
Comment 23 Bastien Nocera 2015-01-05 10:03:41 UTC
Review of attachment 293760 [details] [review]:

Sure.
Comment 24 Bastien Nocera 2015-01-05 10:04:04 UTC
Review of attachment 293761 [details] [review]:

Yep.
Comment 25 Ignacio Casal Quinteiro (nacho) 2015-01-05 10:13:11 UTC
Attachment 293756 [details] pushed as 344457f - Do not include INSTALL generated file
Attachment 293757 [details] pushed as 10fa6cf - Do not use deprecated margin properties
Comment 26 Ignacio Casal Quinteiro (nacho) 2015-01-05 10:17:04 UTC
Comment on attachment 293760 [details] [review]
pairing-dialog: no need to use g_clear_pointer on finalize

Attachment 293760 [details] pushed as 3bcebc7 - pairing-dialog: no need to use g_clear_pointer on finalize
Comment 27 Bastien Nocera 2015-01-05 10:31:15 UTC
Review of attachment 293762 [details] [review]:

Sure.
Comment 28 Bastien Nocera 2015-01-05 10:32:07 UTC
Review of attachment 293763 [details] [review]:

Yep.
Comment 29 Bastien Nocera 2015-01-05 10:32:50 UTC
Review of attachment 293765 [details] [review]:

Sure.
Comment 30 Bastien Nocera 2015-01-05 10:33:17 UTC
Review of attachment 293766 [details] [review]:

Sure.
Comment 31 Ignacio Casal Quinteiro (nacho) 2015-01-05 10:33:33 UTC
Attachment 293762 [details] pushed as cc1f3be - chooser-button: no need to keep a static parent_class var
Attachment 293763 [details] pushed as 34a1712 - chooser-button: use g_clear_object
Comment 32 Bastien Nocera 2015-01-05 10:33:35 UTC
Review of attachment 293767 [details] [review]:

Sure.
Comment 33 Bastien Nocera 2015-01-05 10:36:58 UTC
Review of attachment 293768 [details] [review]:

Yep.
Comment 34 Bastien Nocera 2015-01-05 10:39:17 UTC
Review of attachment 293770 [details] [review]:

Sure.

::: lib/bluetooth-pairing-dialog.c
@@ -260,3 @@
-                                       "/org/gnome/bluetooth/settings.ui",
-                                       &error);
-	if (error != NULL) {

Use the retval from gtk_builder_add_from_resource instead of checking the error, and assert if it fails. No point in the settings panel failing in weird ways.

@@ +325,3 @@
+	/* Bind class to template */
+	gtk_widget_class_set_template_from_resource (widget_class,
+	                                             "/org/gnome/bluetooth/bluetooth-pairing-dialog.ui");

On the same line is fine, we have wide screens.
Comment 35 Bastien Nocera 2015-01-05 10:41:16 UTC
Review of attachment 293771 [details] [review]:

Looks good otherwise.

::: lib/bluetooth-settings-row.c
@@ +98,2 @@
 	/* Spinner */
+	/* FIXME: why do we need this? */

It's not used, probably existed before we started setting priv->spinner.
Comment 36 Bastien Nocera 2015-01-05 10:41:33 UTC
Review of attachment 293772 [details] [review]:

Yes.
Comment 37 Bastien Nocera 2015-01-05 10:41:56 UTC
Review of attachment 293772 [details] [review]:

And don't forget to prefix the subject with "build: "
Comment 38 Ignacio Casal Quinteiro (nacho) 2015-01-05 10:42:12 UTC
(In reply to comment #34)
> Review of attachment 293770 [details] [review]:
> 
> Sure.
> 
> ::: lib/bluetooth-pairing-dialog.c
> @@ -260,3 @@
> -                                       "/org/gnome/bluetooth/settings.ui",
> -                                       &error);
> -    if (error != NULL) {
> 
> Use the retval from gtk_builder_add_from_resource instead of checking the
> error, and assert if it fails. No point in the settings panel failing in weird
> ways.

Missread the patch? This is removed

> 
> @@ +325,3 @@
> +    /* Bind class to template */
> +    gtk_widget_class_set_template_from_resource (widget_class,
> +                                                
> "/org/gnome/bluetooth/bluetooth-pairing-dialog.ui");
> 
> On the same line is fine, we have wide screens.

OK
Comment 39 Bastien Nocera 2015-01-05 10:42:25 UTC
Review of attachment 293773 [details] [review]:

Ditto about the subject prefix ("build: ")
Comment 40 Bastien Nocera 2015-01-05 10:44:39 UTC
(In reply to comment #38)
> (In reply to comment #34)
> > Review of attachment 293770 [details] [review] [details]:
> > 
> > Sure.
> > 
> > ::: lib/bluetooth-pairing-dialog.c
> > @@ -260,3 @@
> > -                                       "/org/gnome/bluetooth/settings.ui",
> > -                                       &error);
> > -    if (error != NULL) {
> > 
> > Use the retval from gtk_builder_add_from_resource instead of checking the
> > error, and assert if it fails. No point in the settings panel failing in weird
> > ways.
> 
> Missread the patch? This is removed

Misread indeed.
Comment 41 Ignacio Casal Quinteiro (nacho) 2015-01-05 10:51:07 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.