Permalink
Browse files

build: Provide an option to disable the idle background loop video

  • Loading branch information...
1 parent ad80334 commit 5f4db71d3453c57520b0a0642d1806eb35895167 @dlespiau dlespiau committed Jun 8, 2011
Showing with 33 additions and 8 deletions.
  1. +13 −0 configure.ac
  2. +4 −1 data/Makefile.am
  3. +16 −7 mex/mex-player.c
View
@@ -209,6 +209,18 @@ AS_CASE(["$with_online"],
[AC_MSG_ERROR([Unknown argument "$with_online" to --with-online])]
)
+# enable idle video
+AC_ARG_ENABLE([idle-video],
+ [AC_HELP_STRING([--enable-idle-video=@<:@no/yes@:>@],
+ [Play the idle video in the background @<:@default=yes@:>@])],
+ [],
+ [enable_idle_video=yes])
+
+AS_IF([test "x$enable_idle_video" = "xyes"],
+ [AC_DEFINE([ENABLE_IDLE_VIDEO], 1,
+ [Play the idle video in the background])])
+AM_CONDITIONAL([ENABLE_IDLE_VIDEO], [test "x$enable_idle_video" = "xyes"])
+
# enable strict compiler flags
AC_ARG_ENABLE([maintainer-flags],
[AC_HELP_STRING([--enable-maintainer-flags=@<:@no/yes@:>@],
@@ -404,5 +416,6 @@ echo " Webremote : ${enable_webremote}"
echo ""
echo " • Extra:"
echo " Enable LIRC support: ${enable_lirc}"
+echo " Play the idle video: ${enable_idle_video}"
echo " Media playback : ${with_player}"
echo ""
View
@@ -36,11 +36,14 @@ dist_style_DATA = \
style/queue-spinner-highlight.png \
style/scroll-bg.png \
style/scroll-bar.png \
- style/background-loop.mkv \
style/thumb-noContent.png \
style/spinner.png \
style.css
+if ENABLE_IDLE_VIDEO
+dist_style_DATA +=style/background-loop.mkv
+endif
+
shellstyledir = $(pkgdatadir)/shell/style
dist_shellstyle_DATA = \
shell/style.css \
View
@@ -937,8 +937,6 @@ mex_player_set_idle_mode (MexPlayer *player,
if (idle)
{
- gchar *tmp;
-
clutter_actor_hide (priv->controls);
clutter_actor_hide (priv->info_panel);
mx_widget_set_disabled (MX_WIDGET (player), TRUE);
@@ -950,12 +948,20 @@ mex_player_set_idle_mode (MexPlayer *player,
priv->content = NULL;
}
- tmp = g_strconcat ("file://", mex_get_data_dir (),
- "/common/style/background-loop.mkv", NULL);
- clutter_media_set_uri (priv->media, tmp);
- g_free (tmp);
+#ifdef ENABLE_IDLE_VIDEO
+ {
+ gchar *tmp;
- clutter_media_set_playing (priv->media, TRUE);
+ tmp = g_strconcat ("file://", mex_get_data_dir (),
+ "/common/style/background-loop.mkv", NULL);
+ clutter_media_set_uri (priv->media, tmp);
+ g_free (tmp);
+
+ clutter_media_set_playing (priv->media, TRUE);
+ }
+#else
+ clutter_media_set_uri (priv->media, NULL);
+#endif
/* we're idle so we don't mind the screensaver coming on */
mex_screensaver_uninhibit (priv->screensaver);
@@ -966,8 +972,11 @@ mex_player_set_idle_mode (MexPlayer *player,
clutter_actor_show (priv->info_panel);
mx_widget_set_disabled (MX_WIDGET (player), FALSE);
clutter_actor_set_reactive (CLUTTER_ACTOR (player), TRUE);
+
+#ifdef ENABLE_IDLE_VIDEO
clutter_media_set_playing (priv->media, FALSE);
clutter_media_set_uri (priv->media, NULL);
+#endif
/* we're playing real content so don't allow the screensaver */
mex_screensaver_inhibit (priv->screensaver);

0 comments on commit 5f4db71

Please sign in to comment.