summaryrefslogtreecommitdiff
path: root/shell/eggfindbar.c
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-08-09 12:32:21 +0200
committerlukefromdc <[email protected]>2019-08-16 20:40:31 +0000
commit6dd1aa3fb88f5093cfe6b202df11146ff7878d83 (patch)
treeaf787eaecd3f690ab2f17dcaaa267709f7b9d2b8 /shell/eggfindbar.c
parentd8c5ec0785df76b003a167d24158f64eb81de91d (diff)
downloadatril-6dd1aa3fb88f5093cfe6b202df11146ff7878d83.tar.bz2
atril-6dd1aa3fb88f5093cfe6b202df11146ff7878d83.tar.xz
eggfindbar: avoid 'g_type_class_add_private'
Diffstat (limited to 'shell/eggfindbar.c')
-rw-r--r--shell/eggfindbar.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/shell/eggfindbar.c b/shell/eggfindbar.c
index a0abdd4b..b5a54403 100644
--- a/shell/eggfindbar.c
+++ b/shell/eggfindbar.c
@@ -43,8 +43,6 @@ struct _EggFindBarPrivate
guint case_sensitive : 1;
};
-#define EGG_FIND_BAR_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EGG_TYPE_FIND_BAR, EggFindBarPrivate))
-
enum {
PROP_0,
PROP_SEARCH_STRING,
@@ -64,7 +62,7 @@ static void egg_find_bar_show (GtkWidget *widget);
static void egg_find_bar_hide (GtkWidget *widget);
void egg_find_bar_grab_focus (GtkWidget *widget);
-G_DEFINE_TYPE (EggFindBar, egg_find_bar, GTK_TYPE_TOOLBAR);
+G_DEFINE_TYPE_WITH_PRIVATE (EggFindBar, egg_find_bar, GTK_TYPE_TOOLBAR);
enum
{
@@ -162,8 +160,6 @@ egg_find_bar_class_init (EggFindBarClass *klass)
FALSE,
G_PARAM_READWRITE));
- g_type_class_add_private (object_class, sizeof (EggFindBarPrivate));
-
binding_set = gtk_binding_set_by_class (klass);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Escape, 0,
@@ -292,7 +288,7 @@ egg_find_bar_init (EggFindBar *find_bar)
GtkWidget *arrow;
/* Data */
- priv = EGG_FIND_BAR_GET_PRIVATE (find_bar);
+ priv = egg_find_bar_get_instance_private (find_bar);
find_bar->priv = priv;
priv->search_string = NULL;