summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/luncher/bar.c6
-rw-r--r--src/modules/luncher/config.c36
-rw-r--r--src/modules/luncher/grid.c6
-rw-r--r--src/modules/luncher/luncher.h1
-rw-r--r--src/modules/luncher/mod.c2
5 files changed, 46 insertions, 5 deletions
diff --git a/src/modules/luncher/bar.c b/src/modules/luncher/bar.c
index 68b2057a21..701e412af0 100644
--- a/src/modules/luncher/bar.c
+++ b/src/modules/luncher/bar.c
@@ -466,7 +466,8 @@ _bar_icon_mouse_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *eve
elm_layout_signal_emit(ic->o_layout, "e,state,default", "e");
elm_layout_signal_emit(ic->o_layout, "e,state,unfocused", "e");
ic->active = EINA_FALSE;
- elm_object_tooltip_hide(obj);
+ if (!ic->inst->cfg->hide_tooltips)
+ elm_object_tooltip_hide(obj);
E_FREE_FUNC(ic->mouse_in_timer, ecore_timer_del);
E_FREE_FUNC(ic->mouse_out_timer, ecore_timer_del);
ic->mouse_out_timer = ecore_timer_loop_add(0.25, _bar_icon_preview_hide, ic);
@@ -920,7 +921,8 @@ _bar_icon_mouse_in(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *even
if (!ic->active)
{
- elm_object_tooltip_show(obj);
+ if (!ic->inst->cfg->hide_tooltips)
+ elm_object_tooltip_show(obj);
ic->active = EINA_TRUE;
elm_layout_signal_emit(ic->o_layout, "e,state,focused", "e");
}
diff --git a/src/modules/luncher/config.c b/src/modules/luncher/config.c
index c4043c0a4b..71023f41db 100644
--- a/src/modules/luncher/config.c
+++ b/src/modules/luncher/config.c
@@ -50,6 +50,17 @@ _type_changed(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
}
static void
+_check_changed(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
+{
+ Instance *inst = data;
+
+ inst->cfg->hide_tooltips = elm_check_state_get(obj);
+
+ e_config_save_queue();
+ bar_config_updated(inst);
+}
+
+static void
_config_source_changed(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
Instance *inst = data;
@@ -277,7 +288,7 @@ config_luncher(E_Zone *zone, Instance *inst, Eina_Bool bar)
{
Evas_Object *popup, *tb, *lbl, *fr, *box, *list, *mlist;
Evas_Object *butbox, *sep, *hbox, *img, *but, *o, *group;
- Evas_Object *slider;
+ Evas_Object *slider, *check;
Elm_Object_Item *it;
luncher_config->bar = bar;
@@ -388,6 +399,29 @@ config_luncher(E_Zone *zone, Instance *inst, Eina_Bool bar)
evas_object_show(o);
lbl = elm_label_add(box);
+ elm_object_text_set(lbl, _("Tooltips:"));
+ E_ALIGN(lbl, 0.5, 0.5);
+ E_WEIGHT(lbl, EVAS_HINT_EXPAND, 0);
+ elm_box_pack_end(box, lbl);
+ evas_object_show(lbl);
+
+ check = elm_check_add(box);
+ elm_object_text_set(check, _("Hide tooltips"));
+ elm_check_state_set(check, inst->cfg->hide_tooltips);
+ E_ALIGN(check, 0.0, 0.0);
+ E_WEIGHT(check, EVAS_HINT_EXPAND, 0);
+ evas_object_smart_callback_add(check, "changed", _check_changed, inst);
+ elm_box_pack_end(box, check);
+ evas_object_show(check);
+
+ o = elm_separator_add(box);
+ elm_separator_horizontal_set(o, EINA_TRUE);
+ E_EXPAND(o);
+ E_FILL(o);
+ elm_box_pack_end(box, o);
+ evas_object_show(o);
+
+ lbl = elm_label_add(box);
elm_object_text_set(lbl, _("Preview Size:"));
E_ALIGN(lbl, 0.5, 0.5);
E_WEIGHT(lbl, EVAS_HINT_EXPAND, 0);
diff --git a/src/modules/luncher/grid.c b/src/modules/luncher/grid.c
index d3e26a82c1..f582e2858d 100644
--- a/src/modules/luncher/grid.c
+++ b/src/modules/luncher/grid.c
@@ -216,7 +216,8 @@ _grid_icon_mouse_in(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *eve
if (_grid_check_modifiers(ev->modifiers)) return;
evas_object_raise(ic->o_layout);
- elm_object_tooltip_show(obj);
+ if (!ic->inst->cfg->hide_tooltips)
+ elm_object_tooltip_show(obj);
ic->active = EINA_TRUE;
elm_layout_signal_emit(ic->o_layout, "e,state,focused", "e");
}
@@ -226,7 +227,8 @@ _grid_icon_mouse_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *ev
{
Icon *ic = data;
- elm_object_tooltip_hide(obj);
+ if (!ic->inst->cfg->hide_tooltips)
+ elm_object_tooltip_hide(obj);
elm_layout_signal_emit(ic->o_layout, "e,state,unfocused", "e");
}
diff --git a/src/modules/luncher/luncher.h b/src/modules/luncher/luncher.h
index ac2935bb85..ef98550738 100644
--- a/src/modules/luncher/luncher.h
+++ b/src/modules/luncher/luncher.h
@@ -40,6 +40,7 @@ struct _Config_Item
int id;
int version;
int preview_size;
+ int hide_tooltips;
Eina_Stringshare *dir;
Luncher_Type type;
};
diff --git a/src/modules/luncher/mod.c b/src/modules/luncher/mod.c
index 78a9b3502e..94530db5a0 100644
--- a/src/modules/luncher/mod.c
+++ b/src/modules/luncher/mod.c
@@ -23,6 +23,7 @@ luncher_init(void)
E_CONFIG_VAL(D, T, preview_size, INT);
E_CONFIG_VAL(D, T, dir, STR);
E_CONFIG_VAL(D, T, type, INT);
+ E_CONFIG_VAL(D, T, hide_tooltips, INT);
conf_edd = E_CONFIG_DD_NEW("Luncher_Config", Config);
#undef T
@@ -42,6 +43,7 @@ luncher_init(void)
ci->preview_size = 64;
ci->dir = eina_stringshare_add("default");
ci->type = E_LUNCHER_MODULE_FULL;
+ ci->hide_tooltips = 0;
luncher_config->items = eina_list_append(luncher_config->items, ci);
}
EINA_LIST_FOREACH(luncher_config->items, l, ci)