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 771844 - file-conflict-dialog: port to use G_DECLARE* type declarations
file-conflict-dialog: 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:35 UTC by Ernestas Kulik
Modified: 2016-10-07 13:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
file-conflict-dialog: port to G_DECLARE* type (20.83 KB, patch)
2016-10-03 21:43 UTC, Sirbu Lavinia Stefania
none Details | Review
file-conflict-dialog: port to G_DECLARE* type (21.09 KB, patch)
2016-10-06 18:10 UTC, Sirbu Lavinia Stefania
none Details | Review
file-conflict-dialog: port to G_DECLARE* type (21.43 KB, patch)
2016-10-06 18:36 UTC, Sirbu Lavinia Stefania
committed Details | Review

Description Ernestas Kulik 2016-09-22 15:35:00 UTC
See bug 771777.
Comment 1 Sirbu Lavinia Stefania 2016-10-03 21:43:15 UTC
Created attachment 336841 [details] [review]
file-conflict-dialog: port to G_DECLARE* type

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-04 20:26:16 UTC
Review of attachment 336841 [details] [review]:

It looks mostly good! Just a nitpick:

::: src/nautilus-file-conflict-dialog.c
@@ +319,3 @@
+
+    fcd->skip_button =
+        gtk_dialog_add_button (dialog, _("_Skip"), CONFLICT_RESPONSE_SKIP);

actually we should do the oposite:
fcd->skip_button = gtk_dialog_add_button (dialog,
                                          _("_Skip"), CONFLICT_RESPONSE_SKIP);

The first line after the equal goes in the same line of the equal.
Comment 3 Sirbu Lavinia Stefania 2016-10-06 18:10:40 UTC
Created attachment 337087 [details] [review]
file-conflict-dialog: port to G_DECLARE* type

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 Carlos Soriano 2016-10-06 18:28:17 UTC
Review of attachment 337087 [details] [review]:

Looking mostly good! You forgot:

::: src/nautilus-file-conflict-dialog.h
@@ +28,3 @@
 #include <gtk/gtk.h>
 
+G_BEGIN_DECLS

you forgot the G_END_DECLS
Comment 5 Sirbu Lavinia Stefania 2016-10-06 18:36:43 UTC
Created attachment 337093 [details] [review]
file-conflict-dialog: port to G_DECLARE* type

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 Carlos Soriano 2016-10-07 07:47:10 UTC
Review of attachment 337093 [details] [review]:

Looks good now, thanks!
Comment 7 Ernestas Kulik 2016-10-07 13:00:21 UTC
Attachment 337093 [details] pushed as 4e4d4df - file-conflict-dialog: port to G_DECLARE* type