openbsd-ports/x11/gnome/controlcenter/patches/patch-panels_info_cc-info-panel_c
2011-10-17 15:33:28 +00:00

83 lines
2.2 KiB
Plaintext

$OpenBSD: patch-panels_info_cc-info-panel_c,v 1.3 2011/10/17 15:33:28 ajacoutot Exp $
No PackageKit on OpenBSD.
--- panels/info/cc-info-panel.c.orig Thu Oct 13 13:13:42 2011
+++ panels/info/cc-info-panel.c Mon Oct 17 17:07:22 2011
@@ -23,7 +23,12 @@
#include "cc-info-panel.h"
+#if defined(__FreeBSD__) || defined(__OpenBSD__)
+#include <sys/param.h>
+#include <sys/mount.h>
+#else
#include <sys/vfs.h>
+#endif
#include <polkit/polkit.h>
#include <glib.h>
@@ -1281,6 +1286,7 @@ on_pk_get_updates_ready (GObject *source,
GAsyncResult *res,
CcInfoPanel *self)
{
+#ifndef __OpenBSD__
GError *error;
GVariant *result;
@@ -1292,6 +1298,9 @@ on_pk_get_updates_ready (GObject *source,
g_error_free (error);
return;
}
+#else
+ return;
+#endif
}
static void
@@ -1299,6 +1308,7 @@ on_pk_get_tid_ready (GObject *source,
GAsyncResult *res,
CcInfoPanel *self)
{
+#ifndef __OpenBSD__
GError *error;
GVariant *result;
char *tid;
@@ -1345,6 +1355,9 @@ on_pk_get_tid_ready (GObject *source,
NULL,
(GAsyncReadyCallback) on_pk_get_updates_ready,
self);
+#else
+ return;
+#endif
}
static void
@@ -1407,6 +1420,7 @@ cc_info_panel_init (CcInfoPanel *self)
g_assert (self->priv->session_bus);
+#ifndef __OpenBSD__
self->priv->pk_proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
G_DBUS_PROXY_FLAGS_NONE,
NULL,
@@ -1428,6 +1442,7 @@ cc_info_panel_init (CcInfoPanel *self)
self);
refresh_updates (self);
}
+#endif
gtk_builder_add_from_file (self->priv->builder,
GNOMECC_UI_DIR "/info.ui",
@@ -1442,8 +1457,10 @@ cc_info_panel_init (CcInfoPanel *self)
self->priv->graphics_data = get_graphics_data ();
+#ifndef __OpenBSD__
widget = WID ("updates_button");
g_signal_connect (widget, "clicked", G_CALLBACK (on_updates_button_clicked), self);
+#endif
info_panel_setup_selector (self);
info_panel_setup_overview (self);