aboutsummaryrefslogtreecommitdiff
path: root/src/device-menu-mgr.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2012-02-23 08:42:27 -0600
committerTed Gould <ted@gould.cx>2012-02-23 08:42:27 -0600
commit8125b675b131f6599b0c9a8ed0c041f24533f76d (patch)
tree09fbb7903aaa06514ef04e11b0fc04648e086128 /src/device-menu-mgr.c
parent7609f062397a3f33fa6587972e200edefa5e7222 (diff)
parent68cf3cfad3861048d620b2486abf47d5a3ce2886 (diff)
downloadayatana-indicator-session-8125b675b131f6599b0c9a8ed0c041f24533f76d.tar.gz
ayatana-indicator-session-8125b675b131f6599b0c9a8ed0c041f24533f76d.tar.bz2
ayatana-indicator-session-8125b675b131f6599b0c9a8ed0c041f24533f76d.zip
Make GUDev optional for arch's that can't support it
Diffstat (limited to 'src/device-menu-mgr.c')
-rw-r--r--src/device-menu-mgr.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/device-menu-mgr.c b/src/device-menu-mgr.c
index f8f0696..cfdb55d 100644
--- a/src/device-menu-mgr.c
+++ b/src/device-menu-mgr.c
@@ -31,7 +31,9 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include "apt-watcher.h"
#endif /* HAVE_APT */
+#ifdef HAS_GUDEV
#include "udev-mgr.h"
+#endif /* HAS_GUDEV */
#define UP_ADDRESS "org.freedesktop.UPower"
#define UP_OBJECT "/org/freedesktop/UPower"
@@ -47,7 +49,9 @@ struct _DeviceMenuMgr
#ifdef HAVE_APT
AptWatcher* apt_watcher;
#endif /* HAVE_APT */
+#ifdef HAS_GUDEV
UdevMgr* udev_mgr;
+#endif /* HAS_GUDEV */
};
static GSettings *lockdown_settings = NULL;
@@ -733,8 +737,10 @@ device_menu_mgr_build_static_items (DeviceMenuMgr* self, gboolean greeter_mode)
restart_shutdown_logout_mi->shutdown_mi = shutdown_mi;
update_menu_entries(restart_shutdown_logout_mi);
+#ifdef HAS_GUDEV
// Time to create the udev mgr and hand it the static relevant items.
self->udev_mgr = udev_mgr_new (scanners_menuitem, webcam_menuitem);
+#endif
}
static void