discomfitor pushed a commit to branch master.
commit 3a983e8d59816e25a3ebd90f71ae86685c64cc2e
Author: Mike Blumenkrantz <[email protected]>
Date: Tue Apr 23 16:46:26 2013 +0100
move border shadow checks to e_util
---
src/bin/e_border.c | 8 +-------
src/bin/e_utils.c | 12 ++++++++++++
src/bin/e_utils.h | 2 ++
3 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/src/bin/e_border.c b/src/bin/e_border.c
index be5b7c2..d4b8d9b 100644
--- a/src/bin/e_border.c
+++ b/src/bin/e_border.c
@@ -4917,14 +4917,8 @@ _e_border_free(E_Border *bd)
static void
_e_border_shadow(E_Border *bd)
{
- Eina_Bool on = EINA_FALSE;
if (!bd->bg_object) return;
- on = !bd->client.e.state.video;
- if (on)
- on = !bd->fullscreen;
- if (on)
- on = !!e_util_strcmp(bd->client.border.name, "borderless");
- if (on)
+ if (e_util_border_shadow_state_get(bd))
edje_object_signal_emit(bd->bg_object, "e,state,shadow,on", "e");
else
edje_object_signal_emit(bd->bg_object, "e,state,shadow,off", "e");
diff --git a/src/bin/e_utils.c b/src/bin/e_utils.c
index d1420bc..480c30d 100644
--- a/src/bin/e_utils.c
+++ b/src/bin/e_utils.c
@@ -1720,3 +1720,15 @@ e_util_evas_objects_above_print_smart(Evas_Object *o)
fprintf(stderr, "[%p] - %s(%s) %s\n", a, evas_object_type_get(a),
evas_object_name_get(a), evas_object_visible_get(a) ? "VISIBLE" : "HIDDEN");
}
}
+
+EAPI Eina_Bool
+e_util_border_shadow_state_get(const E_Border *bd)
+{
+ Eina_Bool on;
+ on = !bd->client.e.state.video;
+ if (on)
+ on = !bd->fullscreen;
+ if (on)
+ on = !!e_util_strcmp(bd->client.border.name, "borderless");
+ return on;
+}
diff --git a/src/bin/e_utils.h b/src/bin/e_utils.h
index 448ccdd..faac34c 100644
--- a/src/bin/e_utils.h
+++ b/src/bin/e_utils.h
@@ -73,6 +73,8 @@ EAPI char *e_util_string_append_quoted(char *str, size_t
*size, size_t *len, con
EAPI void e_util_evas_objects_above_print(Evas_Object *o);
EAPI void e_util_evas_objects_above_print_smart(Evas_Object *o);
+EAPI Eina_Bool e_util_border_shadow_state_get(const E_Border *bd);
+
static inline E_Container *
e_util_container_current_get(void)
{
--
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr