Commit 5982aa63 authored by Alberts Muktupāvels's avatar Alberts Muktupāvels

panel-action-button: avoid deprecated g_type_class_add_private

parent 6d88785d
......@@ -48,10 +48,6 @@
#include "panel-lockdown.h"
#include "panel-icon-names.h"
G_DEFINE_TYPE (PanelActionButton, panel_action_button, BUTTON_TYPE_WIDGET)
#define PANEL_ACTION_BUTTON_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PANEL_TYPE_ACTION_BUTTON, PanelActionButtonPrivate))
enum {
PROP_0,
PROP_ACTION_TYPE,
......@@ -65,6 +61,8 @@ struct _PanelActionButtonPrivate {
guint dnd_enabled : 1;
};
G_DEFINE_TYPE_WITH_PRIVATE (PanelActionButton, panel_action_button, BUTTON_TYPE_WIDGET)
typedef struct {
gint enum_value;
const gchar* str;
......@@ -629,8 +627,6 @@ panel_action_button_class_init (PanelActionButtonClass *klass)
button_class->clicked = panel_action_button_clicked;
g_type_class_add_private (klass, sizeof (PanelActionButtonPrivate));
g_object_class_install_property (
gobject_class,
PROP_ACTION_TYPE,
......@@ -654,7 +650,7 @@ panel_action_button_class_init (PanelActionButtonClass *klass)
static void
panel_action_button_init (PanelActionButton *button)
{
button->priv = PANEL_ACTION_BUTTON_GET_PRIVATE (button);
button->priv = panel_action_button_get_instance_private (button);
button->priv->type = PANEL_ACTION_NONE;
button->priv->info = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment