summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2011-03-20 20:08:39 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2011-03-20 20:08:39 +0000
commit9822e843ca0d51032c8cafa534cff25208458032 (patch)
treea3b780187d78a1c8e71f345c7fd97ed6e319b211
parent376327480b37a6d0a88029f070df991e6add71dc (diff)
#define our own log2() function for FreeBSD (issue 22), hopefully fix a reported libnotify crash due to no notify_init (issue 21)
-rw-r--r--src/Makefile.am2
-rw-r--r--src/trg-main-window.c1
-rw-r--r--src/trg-torrent-graph.c4
3 files changed, 5 insertions, 2 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 4527e0c..a022cd6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -71,7 +71,7 @@ transmission_remote_gtk_SOURCES = main.c \
trg-torrent-graph.c \
$(NULL)
-transmission_remote_gtk_LDFLAGS = -lcurl $(jsonglib_LIBS) $(gtk_LIBS) $(gthread_LIBS) $(GEOIP_LIBS) $(gconf_LIBS) $(gio_LIBS) $(unique_LIBS) $(notify_LIBS) $(libproxy_LIBS)
+transmission_remote_gtk_LDFLAGS = -lm -lcurl $(jsonglib_LIBS) $(gtk_LIBS) $(gthread_LIBS) $(GEOIP_LIBS) $(gconf_LIBS) $(gio_LIBS) $(unique_LIBS) $(notify_LIBS) $(libproxy_LIBS)
install-data-local: install-icons update-icon-cache
GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) gconftool-2 --makefile-install-rule $(srcdir)/$(schema_DATA)
diff --git a/src/trg-main-window.c b/src/trg-main-window.c
index 883faa3..4e21cf7 100644
--- a/src/trg-main-window.c
+++ b/src/trg-main-window.c
@@ -1782,6 +1782,7 @@ static GObject *trg_main_window_constructor(GType type,
if (priv->icon)
gtk_window_set_default_icon(priv->icon);
+ notify_init(PACKAGE_NAME);
gtk_window_set_title(GTK_WINDOW(self), PACKAGE_NAME);
gtk_window_set_default_size(GTK_WINDOW(self), 1000, 600);
g_signal_connect(G_OBJECT(self), "delete-event",
diff --git a/src/trg-torrent-graph.c b/src/trg-torrent-graph.c
index 16b8f64..b5ce339 100644
--- a/src/trg-torrent-graph.c
+++ b/src/trg-torrent-graph.c
@@ -23,7 +23,6 @@
*/
#include <math.h>
-
#include <glib.h>
#include <cairo.h>
#include <glib/gi18n.h>
@@ -32,6 +31,9 @@
#include "trg-torrent-graph.h"
#include "util.h"
+/* damn you freebsd */
+#define log2(x) (log(x)/M_LN2)
+
#define GRAPH_NUM_POINTS 62
#define GRAPH_MIN_HEIGHT 40
#define GRAPH_NUM_LINES 2