public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Bastien Nocera <hadess@hadess.net>
To: BlueZ Hackers <bluez-devel@lists.sourceforge.net>
Subject: [Bluez-devel] [PATCH] Require libnotify
Date: Fri, 01 Feb 2008 15:28:55 +0000	[thread overview]
Message-ID: <1201879735.2389.332.camel@cookie.hadess.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 139 bytes --]

Heya,

Patch to make libnotify be required for the applet, which means we can
be sure that the applet will have UI for the agents.

Cheers

[-- Attachment #2: bluez-gnome-require-libnotify.patch --]
[-- Type: text/x-patch, Size: 2807 bytes --]

Index: README
===================================================================
RCS file: /cvsroot/bluez/gnome/README,v
retrieving revision 1.7
diff -u -p -u -p -r1.7 README
--- README	5 Aug 2007 14:37:11 -0000	1.7
+++ README	1 Feb 2008 15:25:40 -0000
@@ -14,6 +14,7 @@ In order to compile Bluetooth helpers yo
 	- GCC compiler
 	- D-Bus library
 	- GTK+ library
+	- libnotify
 
 To configure run:
 	./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc
Index: configure.in
===================================================================
RCS file: /cvsroot/bluez/gnome/configure.in,v
retrieving revision 1.57
diff -u -p -u -p -r1.57 configure.in
--- configure.in	26 Dec 2007 12:02:30 -0000	1.57
+++ configure.in	1 Feb 2008 15:25:40 -0000
@@ -62,9 +62,7 @@ PKG_CHECK_MODULES(GCONF, gconf-2.0 >= 2.
 AC_SUBST(GCONF_CFLAGS)
 AC_SUBST(GCONF_LIBS)
 
-PKG_CHECK_MODULES(NOTIFY, libnotify >= 0.3.2, [
-	AC_DEFINE(HAVE_LIBNOTIFY, 1, [Define to 1 if you have libnotify support.])
-], dummy=no)
+PKG_CHECK_MODULES(NOTIFY, libnotify >= 0.3.2, dummy=yes, AC_MSG_ERROR(libnotify is required))
 AC_SUBST(NOTIFY_CFLAGS)
 AC_SUBST(NOTIFY_LIBS)
 
Index: applet/main.c
===================================================================
RCS file: /cvsroot/bluez/gnome/applet/main.c,v
retrieving revision 1.97
diff -u -p -u -p -r1.97 main.c
--- applet/main.c	1 Feb 2008 12:51:35 -0000	1.97
+++ applet/main.c	1 Feb 2008 15:25:40 -0000
@@ -43,10 +43,7 @@
 #include <glib/gi18n.h>
 
 #include <gtk/gtk.h>
-
-#ifdef HAVE_LIBNOTIFY
 #include <libnotify/notify.h>
-#endif
 
 #include "bluetooth-instance.h"
 #include "bluetooth-device-selection.h"
@@ -640,19 +637,16 @@ static void show_dialog(gpointer data, g
 	gtk_window_present(GTK_WINDOW(input->dialog));
 }
 
-#ifdef HAVE_LIBNOTIFY
 static NotifyNotification *notify = NULL;
 
 static void notify_action(NotifyNotification *notify,
 					gchar *action, gpointer user_data)
 {
 }
-#endif
 
 static void show_notification(const gchar *summary, const gchar *message,
 			      const gchar *action, gint timeout, GCallback handler)
 {
-#ifdef HAVE_LIBNOTIFY
 	NotifyActionCallback callback;
 	GdkScreen *screen;
 	GdkRectangle area;
@@ -687,18 +681,15 @@ static void show_notification(const gcha
 					       callback, NULL, NULL);
 
 	notify_notification_show(notify, NULL);
-#endif
 }
 
 static void close_notification(void)
 {
-#ifdef HAVE_LIBNOTIFY
 	if (notify) {
 		g_signal_handlers_destroy(notify);
 		notify_notification_close(notify, NULL);
 		notify = NULL;
 	}
-#endif
 }
 
 typedef struct {
@@ -1830,9 +1821,7 @@ int main(int argc, char *argv[])
 
 	gtk_window_set_default_icon_name("stock_bluetooth");
 
-#ifdef HAVE_LIBNOTIFY
 	notify_init("bluetooth-manager");
-#endif
 
 	conn = dbus_g_bus_get(DBUS_BUS_SYSTEM, &error);
 	if (error != NULL) {

[-- Attachment #3: Type: text/plain, Size: 228 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

[-- Attachment #4: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

             reply	other threads:[~2008-02-01 15:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-01 15:28 Bastien Nocera [this message]
2008-02-01 15:55 ` [Bluez-devel] [PATCH] Require libnotify Marcel Holtmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1201879735.2389.332.camel@cookie.hadess.net \
    --to=hadess@hadess.net \
    --cc=bluez-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox