Revert "privacy: Don't define structs defined in unavailable libraries"
This reverts commit 484b83f821
.
This commit is contained in:
parent
484b83f821
commit
d3097ee60e
1 changed files with 12 additions and 17 deletions
|
@ -27,12 +27,10 @@
|
||||||
|
|
||||||
#include <gio/gdesktopappinfo.h>
|
#include <gio/gdesktopappinfo.h>
|
||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
|
|
||||||
#ifdef BUILD_NETWORK
|
#ifdef BUILD_NETWORK
|
||||||
#include <NetworkManager.h>
|
# include <NetworkManager.h>
|
||||||
#if NM_CHECK_VERSION(1,10,0)
|
#else
|
||||||
#define HAS_CONNECTIVITY_CHECK 1
|
typedef struct _NMClient NMClient;
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CC_PANEL_REGISTER (CcPrivacyPanel, cc_privacy_panel)
|
CC_PANEL_REGISTER (CcPrivacyPanel, cc_privacy_panel)
|
||||||
|
@ -85,11 +83,9 @@ struct _CcPrivacyPanelPrivate
|
||||||
|
|
||||||
GtkSizeGroup *location_icon_size_group;
|
GtkSizeGroup *location_icon_size_group;
|
||||||
|
|
||||||
#ifdef HAS_CONNECTIVITY_CHECK
|
|
||||||
NMClient *nm_client;
|
NMClient *nm_client;
|
||||||
GtkWidget *connectivity_check_dialog;
|
GtkWidget *connectivity_check_dialog;
|
||||||
GtkWidget *connectivity_check_row;
|
GtkWidget *connectivity_check_row;
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
|
@ -1257,7 +1253,7 @@ add_abrt (CcPrivacyPanel *self)
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAS_CONNECTIVITY_CHECK
|
#if defined(BUILD_NETWORK) && NM_CHECK_VERSION(1,10,0)
|
||||||
static gboolean
|
static gboolean
|
||||||
transform_on_off_label (GBinding *binding G_GNUC_UNUSED,
|
transform_on_off_label (GBinding *binding G_GNUC_UNUSED,
|
||||||
const GValue *from_value,
|
const GValue *from_value,
|
||||||
|
@ -1307,6 +1303,14 @@ add_connectivity_check (CcPrivacyPanel *self)
|
||||||
w, "active",
|
w, "active",
|
||||||
G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
|
G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
static void
|
||||||
|
add_connectivity_check (CcPrivacyPanel *self)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1340,10 +1344,8 @@ cc_privacy_panel_finalize (GObject *object)
|
||||||
g_clear_pointer (&priv->location_apps_perms, g_variant_unref);
|
g_clear_pointer (&priv->location_apps_perms, g_variant_unref);
|
||||||
g_clear_pointer (&priv->location_apps_data, g_variant_unref);
|
g_clear_pointer (&priv->location_apps_data, g_variant_unref);
|
||||||
g_clear_pointer (&priv->location_app_switches, g_hash_table_unref);
|
g_clear_pointer (&priv->location_app_switches, g_hash_table_unref);
|
||||||
#ifdef HAS_CONNECTIVITY_CHECK
|
|
||||||
g_clear_object (&priv->nm_client);
|
g_clear_object (&priv->nm_client);
|
||||||
g_clear_pointer (&priv->connectivity_check_dialog, gtk_widget_destroy);
|
g_clear_pointer (&priv->connectivity_check_dialog, gtk_widget_destroy);
|
||||||
#endif
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (cc_privacy_panel_parent_class)->finalize (object);
|
G_OBJECT_CLASS (cc_privacy_panel_parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
@ -1409,12 +1411,7 @@ cc_privacy_panel_init (CcPrivacyPanel *self)
|
||||||
self->priv->trash_dialog = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "trash_dialog"));
|
self->priv->trash_dialog = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "trash_dialog"));
|
||||||
self->priv->software_dialog = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "software_dialog"));
|
self->priv->software_dialog = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "software_dialog"));
|
||||||
self->priv->abrt_dialog = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "abrt_dialog"));
|
self->priv->abrt_dialog = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "abrt_dialog"));
|
||||||
|
|
||||||
#ifdef HAS_CONNECTIVITY_CHECK
|
|
||||||
self->priv->connectivity_check_dialog = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "connectivity_check_dialog"));
|
self->priv->connectivity_check_dialog = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "connectivity_check_dialog"));
|
||||||
#else
|
|
||||||
gtk_widget_destroy (GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "connectivity_check_dialog")));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
frame = WID ("frame");
|
frame = WID ("frame");
|
||||||
widget = gtk_list_box_new ();
|
widget = gtk_list_box_new ();
|
||||||
|
@ -1449,9 +1446,7 @@ cc_privacy_panel_init (CcPrivacyPanel *self)
|
||||||
add_trash_temp (self);
|
add_trash_temp (self);
|
||||||
add_software (self);
|
add_software (self);
|
||||||
add_abrt (self);
|
add_abrt (self);
|
||||||
#ifdef HAS_CONNECTIVITY_CHECK
|
|
||||||
add_connectivity_check (self);
|
add_connectivity_check (self);
|
||||||
#endif
|
|
||||||
|
|
||||||
g_signal_connect (self->priv->lockdown_settings, "changed",
|
g_signal_connect (self->priv->lockdown_settings, "changed",
|
||||||
G_CALLBACK (on_lockdown_settings_changed), self);
|
G_CALLBACK (on_lockdown_settings_changed), self);
|
||||||
|
|
Loading…
Add table
Reference in a new issue