aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac4
-rw-r--r--src/Makefile.am5
-rw-r--r--src/redshift-gtk/Makefile.am2
-rw-r--r--src/redshift-gtk/statusicon.py6
4 files changed, 13 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index d4bfc68..339f0c8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,12 +17,14 @@ AM_GNU_GETTEXT_VERSION([0.17])
AM_GNU_GETTEXT([external])
PKG_CHECK_MODULES([DRM], [libdrm], [have_drm=yes], [have_drm=no])
+
PKG_CHECK_MODULES([X11], [x11], [have_x11=yes], [have_x11=no])
PKG_CHECK_MODULES([XF86VM], [xxf86vm], [have_xf86vm=yes], [have_xf86vm=no])
PKG_CHECK_MODULES([XCB], [xcb], [have_xcb=yes], [have_xcb=no])
PKG_CHECK_MODULES([XCB_RANDR], [xcb-randr],
[have_xcb_randr=yes], [have_xcb_randr=no])
+PKG_CHECK_MODULES([GLIB], [glib-2.0 gobject-2.0], [have_glib=yes], [have_glib=no])
PKG_CHECK_MODULES([GEOCLUE], [geoclue], [have_geoclue=yes], [have_geoclue=no])
AC_CHECK_HEADER([windows.h], [have_windows_h=yes], [have_windows_h=no])
@@ -133,7 +135,7 @@ AC_ARG_ENABLE([geoclue], [AC_HELP_STRING([--enable-geoclue],
[enable Geoclue location provider])],
[enable_geoclue=$enableval],[enable_geoclue=maybe])
AS_IF([test "x$enable_geoclue" != xno], [
- AS_IF([test "x$have_geoclue" = xyes], [
+ AS_IF([test "x$have_geoclue" = xyes -a "x$have_glib" = xyes], [
AC_DEFINE([ENABLE_GEOCLUE], 1,
[Define to 1 to enable Geoclue location provider])
AC_MSG_RESULT([yes])
diff --git a/src/Makefile.am b/src/Makefile.am
index e83073b..37a0308 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -59,7 +59,10 @@ endif
if ENABLE_GEOCLUE
redshift_SOURCES += location-geoclue.c location-geoclue.h
-AM_CFLAGS += $(GEOCLUE_CFLAGS) $(GEOCLUE_LIBS)
+AM_CFLAGS += \
+ $(GEOCLUE_CFLAGS) $(GEOCLUE_LIBS) \
+ $(GLIB_CFLAGS) $(GLIB_LIBS)
redshift_LDADD += \
$(GEOCLUE_LIBS) $(GEOCLUE_CFLAGS)
+ $(GLIB_LIBS) $(GLIB_CFLAGS)
endif
diff --git a/src/redshift-gtk/Makefile.am b/src/redshift-gtk/Makefile.am
index 96d7718..c4ab24f 100644
--- a/src/redshift-gtk/Makefile.am
+++ b/src/redshift-gtk/Makefile.am
@@ -8,7 +8,7 @@ nodist_redshift_gtk_PYTHON = \
defs.py
redshift_gtkdir = $(pythondir)/redshift_gtk
-dist_bin_SCRIPTS = redshift-gtk
+bin_SCRIPTS = redshift-gtk
endif
EXTRA_DIST = defs.py.in redshift-gtk.in
diff --git a/src/redshift-gtk/statusicon.py b/src/redshift-gtk/statusicon.py
index 5685f08..08f28ef 100644
--- a/src/redshift-gtk/statusicon.py
+++ b/src/redshift-gtk/statusicon.py
@@ -79,7 +79,7 @@ class RedshiftStatusIcon(object):
# Add toggle action
self.toggle_item = Gtk.CheckMenuItem.new_with_label(_('Enabled'))
- self.toggle_item.connect('activate', self.toggle_cb)
+ self.toggle_item.connect('activate', self.toggle_item_cb)
self.status_menu.append(self.toggle_item)
# Add suspend menu
@@ -215,6 +215,10 @@ class RedshiftStatusIcon(object):
self.status_icon, button, time)
def toggle_cb(self, widget, data=None):
+ self.remove_suspend_timer()
+ self.child_toggle_status()
+
+ def toggle_item_cb(self, widget, data=None):
# Only toggle if a change from current state was requested
if self.is_enabled() != widget.get_active():
self.remove_suspend_timer()