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 771840 - toolbar: port to use G_DECLARE* type declarations
toolbar: port to use G_DECLARE* type declarations
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: general
3.21.x
Other All
: Normal minor
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks: 771777
 
 
Reported: 2016-09-22 15:07 UTC by Ernestas Kulik
Modified: 2016-10-08 13:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
toolbar: port to G_DECLARE* type declarations (32.00 KB, patch)
2016-10-06 21:34 UTC, Sirbu Lavinia Stefania
none Details | Review
toolbar: port to G_DECLARE* type declarations (32.65 KB, patch)
2016-10-07 17:59 UTC, Sirbu Lavinia Stefania
none Details | Review
toolbar: port to G_DECLARE* type declarations (32.75 KB, patch)
2016-10-07 18:24 UTC, Sirbu Lavinia Stefania
committed Details | Review

Description Ernestas Kulik 2016-09-22 15:07:29 UTC
See bug 771777.
Comment 1 Sirbu Lavinia Stefania 2016-10-06 21:34:05 UTC
Created attachment 337113 [details] [review]
toolbar: port to G_DECLARE* type declarations

Currently we are using the old GObject class declarations, which have two
problems.

One problem is that we cannot use smart pointers like g_autoptr. The other
problem is the boilerplate code generated that makes the code less readable,
so harder to understand.

To fix this use G_DECLARE* type.
Comment 2 Carlos Soriano 2016-10-07 07:21:02 UTC
Review of attachment 337113 [details] [review]:

Looks almost good, see:

::: src/nautilus-toolbar.c
@@ +518,1 @@
                                                                         (GSourceFunc) on_remove_operations_button_attention_style_timeout,

alignment is wrong now
Comment 3 Sirbu Lavinia Stefania 2016-10-07 17:59:24 UTC
Created attachment 337192 [details] [review]
toolbar: port to G_DECLARE* type declarations

Currently we are using the old GObject class declarations, which have two
problems.

One problem is that we cannot use smart pointers like g_autoptr. The other
problem is the boilerplate code generated that makes the code less readable,
so harder to understand.

To fix this use G_DECLARE* type.
Comment 4 Ernestas Kulik 2016-10-07 18:11:26 UTC
Review of attachment 337192 [details] [review]:

Quack quack.

::: src/nautilus-toolbar.c
@@ +895,3 @@
     GtkWidget *menu_popover;
 
+    // self->priv = nautilus_toolbar_get_instance (self);

What’s this? :)

::: src/nautilus-toolbar.h
@@ +43,1 @@
 					       gboolean show_location_entry);

Align the second parameter.
Comment 5 Sirbu Lavinia Stefania 2016-10-07 18:24:59 UTC
Created attachment 337195 [details] [review]
toolbar: port to G_DECLARE* type declarations

Currently we are using the old GObject class declarations, which have two
problems.

One problem is that we cannot use smart pointers like g_autoptr. The other
problem is the boilerplate code generated that makes the code less readable,
so harder to understand.

To fix this use G_DECLARE* type.
Comment 6 Ernestas Kulik 2016-10-07 18:35:20 UTC
Review of attachment 337195 [details] [review]:

Looks quack to me now! Thanks!
Comment 7 Ernestas Kulik 2016-10-08 13:16:42 UTC
Attachment 337195 [details] pushed as aa0cacd - toolbar: port to G_DECLARE* type declarations