summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2019-05-09 15:45:21 +0800
committerZenWalker <[email protected]>2019-05-16 11:38:50 +0200
commit2c838847a593718f230d4f9bf17fe707d6390b81 (patch)
tree2539daf5eb1b74671f20674c3ad59d33d5192db6
parent88a1df4c40d1bf8b554446c381c1ca557bff62e9 (diff)
downloadmate-panel-2c838847a593718f230d4f9bf17fe707d6390b81.tar.bz2
mate-panel-2c838847a593718f230d4f9bf17fe707d6390b81.tar.xz
[libmate-panel-applet] Avoid deprecated g_type_class_add_private
-rw-r--r--libmate-panel-applet/mate-panel-applet.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/libmate-panel-applet/mate-panel-applet.c b/libmate-panel-applet/mate-panel-applet.c
index e98fc08a..55bfad0c 100644
--- a/libmate-panel-applet/mate-panel-applet.c
+++ b/libmate-panel-applet/mate-panel-applet.c
@@ -51,11 +51,8 @@
#include "mate-panel-applet-marshal.h"
#include "mate-panel-applet-enums.h"
-#define MATE_PANEL_APPLET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PANEL_TYPE_APPLET, MatePanelAppletPrivate))
-
struct _MatePanelAppletPrivate {
GtkWidget *plug;
- GtkWidget *applet;
GDBusConnection *connection;
gboolean out_of_process;
@@ -153,7 +150,7 @@ static const GtkToggleActionEntry menu_toggle_entries[] = {
G_CALLBACK (mate_panel_applet_menu_cmd_lock) }
};
-G_DEFINE_TYPE (MatePanelApplet, mate_panel_applet, GTK_TYPE_EVENT_BOX)
+G_DEFINE_TYPE_WITH_PRIVATE (MatePanelApplet, mate_panel_applet, GTK_TYPE_EVENT_BOX)
#define MATE_PANEL_APPLET_INTERFACE "org.mate.panel.applet.Applet"
#define MATE_PANEL_APPLET_OBJECT_PATH "/org/mate/panel/applet/%s/%d"
@@ -1767,7 +1764,7 @@ static void _mate_panel_applet_prepare_css (GtkStyleContext *context)
static void
mate_panel_applet_init (MatePanelApplet *applet)
{
- applet->priv = MATE_PANEL_APPLET_GET_PRIVATE (applet);
+ applet->priv = mate_panel_applet_get_instance_private (applet);
applet->priv->flags = MATE_PANEL_APPLET_FLAGS_NONE;
applet->priv->orient = MATE_PANEL_APPLET_ORIENT_UP;
@@ -1880,8 +1877,6 @@ mate_panel_applet_class_init (MatePanelAppletClass *klass)
gobject_class->finalize = mate_panel_applet_finalize;
- g_type_class_add_private (klass, sizeof (MatePanelAppletPrivate));
-
g_object_class_install_property (gobject_class,
PROP_OUT_OF_PROCESS,
g_param_spec_boolean ("out-of-process",