Unbreak runtime.

This commit is contained in:
ajacoutot 2013-04-11 10:14:37 +00:00
parent 4532b539ef
commit a7fda8a636
5 changed files with 97 additions and 4 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.3 2013/04/10 09:40:02 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.4 2013/04/11 10:14:37 ajacoutot Exp $
SHARED_ONLY= Yes
@ -6,7 +6,7 @@ COMMENT= personal file-sharing service for GNOME
GNOME_PROJECT= gnome-user-share
GNOME_VERSION= 3.8.0
REVISION= 1
REVISION= 2
CATEGORIES= www sysutils

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-src_obexftp_c,v 1.1 2013/04/11 10:14:37 ajacoutot Exp $
https://bugzilla.gnome.org/show_bug.cgi?id=697537
--- src/obexftp.c.orig Thu Apr 11 10:36:45 2013
+++ src/obexftp.c Thu Apr 11 10:37:26 2013
@@ -44,7 +44,7 @@ obexftp_up (void)
char *public_dir, *server;
gboolean allow_write, require_pairing;
- settings = g_settings_new (GNOME_USER_SHARE_SCHEMAS);
+ settings = g_settings_new (GNOME_USER_SHARE_BLUETOOTH_SCHEMAS);
require_pairing = g_settings_get_boolean (settings, FILE_SHARING_BLUETOOTH_REQUIRE_PAIRING);
server = NULL;

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-src_obexpush_c,v 1.1 2013/04/11 10:14:37 ajacoutot Exp $
https://bugzilla.gnome.org/show_bug.cgi?id=697537
--- src/obexpush.c.orig Thu Apr 11 10:36:41 2013
+++ src/obexpush.c Thu Apr 11 10:37:18 2013
@@ -352,7 +352,7 @@ transfer_completed_cb (DBusGProxy *session,
if (filename == NULL)
return;
- settings = g_settings_new (GNOME_USER_SHARE_SCHEMAS);
+ settings = g_settings_new (GNOME_USER_SHARE_BLUETOOTH_SCHEMAS);
display_notify = g_settings_get_boolean (settings, FILE_SHARING_BLUETOOTH_OBEXPUSH_NOTIFY);
g_object_unref (settings);

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-src_user_share-private_h,v 1.1 2013/04/11 10:14:37 ajacoutot Exp $
https://bugzilla.gnome.org/show_bug.cgi?id=697537
--- src/user_share-private.h.orig Thu Apr 11 10:36:54 2013
+++ src/user_share-private.h Thu Apr 11 10:37:48 2013
@@ -26,6 +26,7 @@
#define _USER_SHARE_PRIVATE_H_
#define GNOME_USER_SHARE_SCHEMAS "org.gnome.desktop.file-sharing"
+#define GNOME_USER_SHARE_BLUETOOTH_SCHEMAS "org.gnome.desktop.file-sharing-bluetooth"
#define FILE_SHARING_ENABLED "enabled"
#define FILE_SHARING_BLUETOOTH_ENABLED "bluetooth-enabled"

View File

@ -1,9 +1,9 @@
$OpenBSD: patch-src_user_share_c,v 1.3 2013/04/10 09:40:02 ajacoutot Exp $
$OpenBSD: patch-src_user_share_c,v 1.4 2013/04/11 10:14:37 ajacoutot Exp $
https://bugzilla.gnome.org/show_bug.cgi?id=697537
--- src/user_share.c.orig Thu Feb 21 09:18:06 2013
+++ src/user_share.c Mon Apr 8 11:57:10 2013
+++ src/user_share.c Thu Apr 11 11:55:12 2013
@@ -27,7 +27,9 @@
#include <gtk/gtk.h>
#include <glib/gi18n.h>
@ -53,3 +53,52 @@ https://bugzilla.gnome.org/show_bug.cgi?id=697537
}
static void
@@ -367,6 +375,7 @@ main (int argc, char **argv)
G_GNUC_UNUSED int x_fd;
Window selection_owner;
Atom xatom;
+ int ret = 0;
bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
@@ -412,11 +421,23 @@ main (int argc, char **argv)
migrate_old_configuration ();
settings = g_settings_new (GNOME_USER_SHARE_SCHEMAS);
- if (g_settings_get_boolean (settings, FILE_SHARING_ENABLED) == FALSE &&
- g_settings_get_boolean (settings, FILE_SHARING_BLUETOOTH_ENABLED) == FALSE &&
- g_settings_get_boolean (settings, FILE_SHARING_BLUETOOTH_OBEXPUSH_ENABLED) == FALSE)
- return 1;
+ if (g_settings_get_boolean (settings, FILE_SHARING_ENABLED) == FALSE)
+ ret = 1;
+#ifdef HAVE_BLUETOOTH
+ if (ret) {
+ settings = g_settings_new (GNOME_USER_SHARE_BLUETOOTH_SCHEMAS);
+ if (g_settings_get_boolean (settings, FILE_SHARING_BLUETOOTH_ENABLED) == FALSE &&
+ g_settings_get_boolean (settings, FILE_SHARING_BLUETOOTH_OBEXPUSH_ENABLED) == FALSE)
+ ret = 1;
+ } else {
+ ret = 0;
+ }
+#endif
+
+ if (ret)
+ return ret;
+
x_fd = ConnectionNumber (xdisplay);
XSetIOErrorHandler (x_io_error_handler);
@@ -434,10 +455,12 @@ main (int argc, char **argv)
/* Initial setting */
file_sharing_enabled_changed ();
+#ifdef HAVE_BLUETOOTH
file_sharing_bluetooth_enabled_changed ();
file_sharing_bluetooth_obexpush_accept_files_changed ();
file_sharing_bluetooth_obexpush_notify_changed ();
file_sharing_bluetooth_obexpush_enabled_changed ();
+#endif
gtk_main ();
g_object_unref (settings);