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 705551 - Switch to G_ADD_PRIVATE() all the things!
Switch to G_ADD_PRIVATE() all the things!
Status: RESOLVED FIXED
Product: gnome-photos
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: GNOME photos maintainer(s)
GNOME photos maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-08-06 09:46 UTC by Emanuele Aina
Modified: 2013-08-06 16:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Switch to G_ADD_PRIVATE() all the things! (66.72 KB, patch)
2013-08-06 09:46 UTC, Emanuele Aina
committed Details | Review

Description Emanuele Aina 2013-08-06 09:46:45 UTC
Since after commit f0b9f17bd we now depend on new enough GTK+/GLib
versions to be able to use GtkWidget templates, let's switch to
G_ADD_PRIVATE()/G_DEFINE_TYPE_WITH_PRIVATE() and friends for all the
photos-* objects.

Note that I've ported only the photos-* files as I suppose we want to keep the
eog-* and gegl-* ones in sync with their original sources.
Comment 1 Emanuele Aina 2013-08-06 09:46:54 UTC
Created attachment 250948 [details] [review]
Switch to G_ADD_PRIVATE() all the things!

Since after commit f0b9f17bd we now depend on new enough GTK+/GLib
versions to be able to use GtkWidget templates, let's switch to
G_ADD_PRIVATE()/G_DEFINE_TYPE_WITH_PRIVATE() and friends for all the
photos-* objects.
Comment 2 Debarshi Ray 2013-08-06 16:44:42 UTC
Review of attachment 250948 [details] [review]:

Wonderful! You read my mind. Many thanks for this clean-up.

::: src/photos-offset-collections-controller.c
@@ +39,1 @@
+G_DEFINE_TYPE_WITH_PRIVATE (PhotosOffsetCollectionsController, photos_offset_collections_controller, PHOTOS_TYPE_OFFSET_CONTROLLER);

I prefer to break this up so that we don't exceed 120 characters per line.

::: src/photos-offset-favorites-controller.c
@@ +39,1 @@
+G_DEFINE_TYPE_WITH_PRIVATE (PhotosOffsetFavoritesController, photos_offset_favorites_controller, PHOTOS_TYPE_OFFSET_CONTROLLER);

Ditto.

::: src/photos-tracker-collections-controller.c
@@ +36,1 @@
+G_DEFINE_TYPE_WITH_PRIVATE (PhotosTrackerCollectionsController, photos_tracker_collections_controller, PHOTOS_TYPE_TRACKER_CONTROLLER);

Ditto.

::: src/photos-tracker-favorites-controller.c
@@ +36,1 @@
+G_DEFINE_TYPE_WITH_PRIVATE (PhotosTrackerFavoritesController, photos_tracker_favorites_controller, PHOTOS_TYPE_TRACKER_CONTROLLER);

Ditto.
Comment 3 Debarshi Ray 2013-08-06 16:45:11 UTC
Committed after the making the above adjustments.