* [Bluez-devel] [PATCH] Require libnotify
@ 2008-02-01 15:28 Bastien Nocera
2008-02-01 15:55 ` Marcel Holtmann
0 siblings, 1 reply; 2+ messages in thread
From: Bastien Nocera @ 2008-02-01 15:28 UTC (permalink / raw)
To: BlueZ Hackers
[-- 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-02-01 15:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-01 15:28 [Bluez-devel] [PATCH] Require libnotify Bastien Nocera
2008-02-01 15:55 ` Marcel Holtmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox