72 lines
2.0 KiB
Plaintext
72 lines
2.0 KiB
Plaintext
$OpenBSD: patch-gnome-session_gsm-logout-dialog_c,v 1.4 2010/09/30 07:37:05 ajacoutot Exp $
|
|
|
|
OpenBSD does not support uPower.
|
|
|
|
--- gnome-session/gsm-logout-dialog.c.orig Thu Jul 15 14:53:08 2010
|
|
+++ gnome-session/gsm-logout-dialog.c Tue Sep 28 13:50:55 2010
|
|
@@ -27,7 +27,9 @@
|
|
#include <glib/gi18n.h>
|
|
#include <gtk/gtk.h>
|
|
|
|
+#ifndef __OpenBSD__
|
|
#include <upower.h>
|
|
+#endif
|
|
|
|
#include "gsm-logout-dialog.h"
|
|
#include "gsm-consolekit.h"
|
|
@@ -50,7 +52,9 @@ struct _GsmLogoutDialogPrivate
|
|
{
|
|
GsmDialogLogoutType type;
|
|
|
|
+#ifndef __OpenBSD__
|
|
UpClient *up_client;
|
|
+#endif
|
|
GsmConsolekit *consolekit;
|
|
|
|
int timeout;
|
|
@@ -142,7 +146,9 @@ gsm_logout_dialog_init (GsmLogoutDialog *logout_dialog
|
|
gtk_window_set_keep_above (GTK_WINDOW (logout_dialog), TRUE);
|
|
gtk_window_stick (GTK_WINDOW (logout_dialog));
|
|
|
|
+#ifndef __OpenBSD__
|
|
logout_dialog->priv->up_client = up_client_new ();
|
|
+#endif
|
|
|
|
logout_dialog->priv->consolekit = gsm_get_consolekit ();
|
|
|
|
@@ -166,10 +172,12 @@ gsm_logout_dialog_destroy (GsmLogoutDialog *logout_dia
|
|
logout_dialog->priv->timeout_id = 0;
|
|
}
|
|
|
|
+#ifndef __OpenBSD__
|
|
if (logout_dialog->priv->up_client) {
|
|
g_object_unref (logout_dialog->priv->up_client);
|
|
logout_dialog->priv->up_client = NULL;
|
|
}
|
|
+#endif
|
|
|
|
if (logout_dialog->priv->consolekit) {
|
|
g_object_unref (logout_dialog->priv->consolekit);
|
|
@@ -182,13 +190,21 @@ gsm_logout_dialog_destroy (GsmLogoutDialog *logout_dia
|
|
static gboolean
|
|
gsm_logout_supports_system_suspend (GsmLogoutDialog *logout_dialog)
|
|
{
|
|
+#ifndef __OpenBSD__
|
|
return up_client_get_can_suspend (logout_dialog->priv->up_client);
|
|
+#else
|
|
+ return FALSE;
|
|
+#endif
|
|
}
|
|
|
|
static gboolean
|
|
gsm_logout_supports_system_hibernate (GsmLogoutDialog *logout_dialog)
|
|
{
|
|
+#ifndef __OpenBSD__
|
|
return up_client_get_can_hibernate (logout_dialog->priv->up_client);
|
|
+#else
|
|
+ return FALSE;
|
|
+#endif
|
|
}
|
|
|
|
static gboolean
|