diff options
author | Pablo Barciela <[email protected]> | 2019-08-23 15:42:51 +0200 |
---|---|---|
committer | lukefromdc <[email protected]> | 2019-09-02 23:58:10 +0000 |
commit | f7a8ce8f311387a452304e6fa65f9153c2acf53d (patch) | |
tree | 746d8f26c720cc9a5d9779f7995bd4cc6afd0883 /gsearchtool | |
parent | 86f3072999742cbaa961c7ec5e1325c0bf84d35e (diff) | |
download | mate-utils-f7a8ce8f311387a452304e6fa65f9153c2acf53d.tar.bz2 mate-utils-f7a8ce8f311387a452304e6fa65f9153c2acf53d.tar.xz |
gsearchtool-entry: avoid 'g_type_class_add_private'
Diffstat (limited to 'gsearchtool')
-rw-r--r-- | gsearchtool/libmateui-deprecated/gsearchtool-entry.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/gsearchtool/libmateui-deprecated/gsearchtool-entry.c b/gsearchtool/libmateui-deprecated/gsearchtool-entry.c index 7b12466f..c329380a 100644 --- a/gsearchtool/libmateui-deprecated/gsearchtool-entry.c +++ b/gsearchtool/libmateui-deprecated/gsearchtool-entry.c @@ -45,9 +45,6 @@ enum { #define MIN_ITEM_LEN 0 #define GSEARCH_HISTORY_ENTRY_HISTORY_LENGTH_DEFAULT 10 -#define GSEARCH_HISTORY_ENTRY_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), \ - GSEARCH_TYPE_HISTORY_ENTRY, \ - GsearchHistoryEntryPrivate)) struct _GsearchHistoryEntryPrivate { @@ -59,7 +56,7 @@ struct _GsearchHistoryEntryPrivate GSettings *settings; }; -G_DEFINE_TYPE (GsearchHistoryEntry, gsearch_history_entry, GTK_TYPE_COMBO_BOX) +G_DEFINE_TYPE_WITH_PRIVATE (GsearchHistoryEntry, gsearch_history_entry, GTK_TYPE_COMBO_BOX) static void gsearch_history_entry_set_property (GObject *object, @@ -169,8 +166,6 @@ gsearch_history_entry_class_init (GsearchHistoryEntryClass *klass) G_PARAM_STATIC_STRINGS)); /* TODO: Add enable-completion property */ - - g_type_class_add_private (object_class, sizeof(GsearchHistoryEntryPrivate)); } static GtkListStore * @@ -460,7 +455,7 @@ gsearch_history_entry_init (GsearchHistoryEntry *entry) { GsearchHistoryEntryPrivate *priv; - priv = GSEARCH_HISTORY_ENTRY_GET_PRIVATE (entry); + priv = gsearch_history_entry_get_instance_private (entry); entry->priv = priv; priv->history_id = NULL; |