diff options
author | Felix Riemann <[email protected]> | 2013-10-04 12:07:29 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2018-07-17 21:53:38 +0200 |
commit | 5a5612ab8ec4fb31464fa35e049a4a3b7cb64393 (patch) | |
tree | 0eee4a38e9d5f8f5d39beb5132c57a84c50a0e09 /src/eom-thumb-view.c | |
parent | a3c97eb293bfff825c43bd10d5584ae5a20f5495 (diff) | |
download | eom-5a5612ab8ec4fb31464fa35e049a4a3b7cb64393.tar.bz2 eom-5a5612ab8ec4fb31464fa35e049a4a3b7cb64393.tar.xz |
Convert to G_DEFINE_TYPE_WITH_PRIVATE part 1
origin commits:
https://gitlab.gnome.org/GNOME/eog/commit/35c3864
https://gitlab.gnome.org/GNOME/eog/commit/842775b
https://gitlab.gnome.org/GNOME/eog/commit/3fe0bd4
https://gitlab.gnome.org/GNOME/eog/commit/2b25632
https://gitlab.gnome.org/GNOME/eog/commit/f0c977d
https://gitlab.gnome.org/GNOME/eog/commit/5cdb1b8
https://gitlab.gnome.org/GNOME/eog/commit/dba0bd4
https://gitlab.gnome.org/GNOME/eog/commit/8e31683
https://gitlab.gnome.org/GNOME/eog/commit/3945bb1
Diffstat (limited to 'src/eom-thumb-view.c')
-rw-r--r-- | src/eom-thumb-view.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/eom-thumb-view.c b/src/eom-thumb-view.c index a85c2d0..b4f9c67 100644 --- a/src/eom-thumb-view.c +++ b/src/eom-thumb-view.c @@ -45,9 +45,6 @@ enum { #define EOM_THUMB_VIEW_SPACING 0 -#define EOM_THUMB_VIEW_GET_PRIVATE(object) \ - (G_TYPE_INSTANCE_GET_PRIVATE ((object), EOM_TYPE_THUMB_VIEW, EomThumbViewPrivate)) - static void eom_thumb_view_init (EomThumbView *thumbview); static EomImage* eom_thumb_view_get_image_from_path (EomThumbView *thumbview, @@ -58,9 +55,6 @@ static void eom_thumb_view_popup_menu (EomThumbView *widget, static void eom_thumb_view_update_columns (EomThumbView *view); -G_DEFINE_TYPE_WITH_CODE (EomThumbView, eom_thumb_view, GTK_TYPE_ICON_VIEW, - G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL)); - static gboolean thumbview_on_query_tooltip_cb (GtkWidget *widget, gint x, @@ -94,6 +88,10 @@ struct _EomThumbViewPrivate { gulong image_removed_id; }; +G_DEFINE_TYPE_WITH_CODE (EomThumbView, eom_thumb_view, GTK_TYPE_ICON_VIEW, + G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL) \ + G_ADD_PRIVATE (EomThumbView)); + /* Drag 'n Drop */ static void @@ -237,8 +235,6 @@ eom_thumb_view_class_init (EomThumbViewClass *class) g_object_class_override_property (gobject_class, PROP_ORIENTATION, "orientation"); - - g_type_class_add_private (class, sizeof (EomThumbViewPrivate)); } static void @@ -640,7 +636,7 @@ thumbview_on_query_tooltip_cb (GtkWidget *widget, static void eom_thumb_view_init (EomThumbView *thumbview) { - thumbview->priv = EOM_THUMB_VIEW_GET_PRIVATE (thumbview); + thumbview->priv = eom_thumb_view_get_instance_private (thumbview); thumbview->priv->visible_range_changed_id = 0; thumbview->priv->image_add_id = 0; |