[file-roller/wip/jtojnar/gobject-modernization: 3/11] window: Use G_DEFINE_TYPE_WITH_PRIVATE
- From: Jan Tojnar <jtojnar src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [file-roller/wip/jtojnar/gobject-modernization: 3/11] window: Use G_DEFINE_TYPE_WITH_PRIVATE
- Date: Fri, 12 Aug 2022 17:58:37 +0000 (UTC)
commit 0092813bd4e8ea62e1c34a7b7c4137419f973d1c
Author: Jan Tojnar <jtojnar gmail com>
Date: Fri Aug 5 20:58:54 2022 +0200
window: Use G_DEFINE_TYPE_WITH_PRIVATE
src/fr-window.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/fr-window.c b/src/fr-window.c
index 6d0f6ee5..afd99ba2 100644
--- a/src/fr-window.c
+++ b/src/fr-window.c
@@ -211,10 +211,6 @@ fr_clipboard_data_set_password (FrClipboardData *clipboard_data,
/**/
-
-G_DEFINE_TYPE (FrWindow, fr_window, GTK_TYPE_APPLICATION_WINDOW)
-
-
enum {
ARCHIVE_LOADED,
PROGRESS,
@@ -378,6 +374,9 @@ struct _FrWindowPrivate {
};
+G_DEFINE_TYPE_WITH_PRIVATE (FrWindow, fr_window, GTK_TYPE_APPLICATION_WINDOW)
+
+
/* -- fr_window_free_private_data -- */
@@ -658,7 +657,6 @@ fr_window_finalize (GObject *object)
if (window->priv != NULL) {
fr_window_free_private_data (window);
- g_free (window->priv);
window->priv = NULL;
}
@@ -885,7 +883,7 @@ fr_window_class_init (FrWindowClass *klass)
static void
fr_window_init (FrWindow *window)
{
- window->priv = g_new0 (FrWindowPrivate, 1);
+ window->priv = fr_window_get_instance_private (window);
window->priv->update_dropped_files = FALSE;
window->priv->dnd_extract_is_running = FALSE;
window->priv->dnd_extract_finished_with_error = FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]