Try again to fix profiler setup

We were trying to store the profiler_id
in a struct that does not exist at the time.
Store it somewhere else.
This commit is contained in:
Matthias Clasen
2019-05-14 20:09:44 +00:00
parent c009611401
commit 599806ca82
2 changed files with 5 additions and 6 deletions

View File

@@ -168,6 +168,7 @@ typedef struct
GtkActionMuxer *muxer;
GtkBuilder *menus_builder;
gchar *help_overlay_path;
guint profiler_id;
} GtkApplicationPrivate;
G_DEFINE_TYPE_WITH_PRIVATE (GtkApplication, gtk_application, G_TYPE_APPLICATION)
@@ -689,8 +690,7 @@ gtk_application_dbus_register (GApplication *application,
const char *obect_path,
GError **error)
{
GtkApplicationPrivate *priv = gtk_application_get_instance_private (application);
GtkApplicationImplDBus *dbus = (GtkApplicationImplDBus *) priv->impl;
GtkApplicationPrivate *priv = gtk_application_get_instance_private (GTK_APPLICATION (application));
GDBusInterfaceVTable vtable = {
sysprof_profiler_method_call,
NULL,
@@ -710,7 +710,7 @@ gtk_application_dbus_register (GApplication *application,
g_dbus_node_info_unref (info);
}
dbus->profiler_id = g_dbus_connection_register_object (connection,
priv->profiler_id = g_dbus_connection_register_object (connection,
"/org/gtk/Profiler",
org_gnome_Sysprof3_Profiler,
&vtable,
@@ -726,9 +726,9 @@ gtk_application_dbus_unregister (GApplication *application,
GDBusConnection *connection,
const char *obect_path)
{
GtkApplicationImplDBus *dbus = (GtkApplicationImplDBus *) application;
GtkApplicationPrivate *priv = gtk_application_get_instance_private (GTK_APPLICATION (application));
g_dbus_connection_unregister_object (connection, dbus->profiler_id);
g_dbus_connection_unregister_object (connection, priv->profiler_id);
}
#else

View File

@@ -127,7 +127,6 @@ typedef struct
gchar *menubar_path;
guint menubar_id;
guint profiler_id;
/* Session management... */
GDBusProxy *sm_proxy;