On Wed, Oct 13, 2010 at 7:36 AM, Enlightenment SVN
<[email protected]> wrote:
> Log:
> Show mixer popup when changing the volume via keybindings.
Why?
IMHO, this is very annoying :-\
Perhaps leave that to be enabled as an option but not as default.
>
> Author: morlenxus
> Date: 2010-10-13 03:36:04 -0700 (Wed, 13 Oct 2010)
> New Revision: 53347
>
> Modified:
> trunk/e/src/modules/mixer/e_mod_main.c trunk/e/src/modules/mixer/e_mod_main.h
>
> Modified: trunk/e/src/modules/mixer/e_mod_main.c
> ===================================================================
> --- trunk/e/src/modules/mixer/e_mod_main.c 2010-10-13 09:34:40 UTC (rev
> 53346)
> +++ trunk/e/src/modules/mixer/e_mod_main.c 2010-10-13 10:36:04 UTC (rev
> 53347)
> @@ -486,6 +486,9 @@
> inst->ui.table = NULL;
> inst->ui.button = NULL;
> inst->popup = NULL;
> + if (inst->popup_timer)
> + ecore_timer_del(inst->popup_timer);
> + inst->popup_timer = NULL;
> }
>
> static void
> @@ -599,6 +602,37 @@
> }
>
> static void
> +_mixer_popup_timer_new(E_Mixer_Instance *inst)
> +{
> + if (inst->popup)
> + {
> + if (inst->popup_timer)
> + {
> + ecore_timer_del(inst->popup_timer);
> + inst->popup_timer = ecore_timer_add(1.0, _mixer_popup_timer_cb,
> inst);
> + }
> + }
> + else
> + {
> + _mixer_popup_new(inst);
> + inst->popup_timer = ecore_timer_add(1.0, _mixer_popup_timer_cb,
> inst);
> + }
> +}
> +
> +static Eina_Bool
> +_mixer_popup_timer_cb(void *data)
> +{
> + E_Mixer_Instance *inst;
> + inst = data;
> +
> + if (inst->popup)
> + _mixer_popup_del(inst);
> + inst->popup_timer = NULL;
> +
> + return ECORE_CALLBACK_CANCEL;
> +}
> +
> +static void
> _mixer_menu_cb_post(void *data, E_Menu *menu __UNUSED__)
> {
> E_Mixer_Instance *inst = data;
> @@ -978,8 +1012,12 @@
> if (!ctxt->conf)
> return;
>
> - if (ctxt->default_instance)
> - _mixer_volume_increase(ctxt->default_instance);
> +
> + if (!ctxt->default_instance)
> + return;
> +
> + _mixer_popup_timer_new(ctxt->default_instance);
> + _mixer_volume_increase(ctxt->default_instance);
> }
>
> static void
> @@ -994,8 +1032,11 @@
> if (!ctxt->conf)
> return;
>
> - if (ctxt->default_instance)
> - _mixer_volume_decrease(ctxt->default_instance);
> + if (!ctxt->default_instance)
> + return;
> +
> + _mixer_popup_timer_new(ctxt->default_instance);
> + _mixer_volume_decrease(ctxt->default_instance);
> }
>
> static void
> @@ -1010,8 +1051,11 @@
> if (!ctxt->conf)
> return;
>
> - if (ctxt->default_instance)
> - _mixer_toggle_mute(ctxt->default_instance);
> + if (!ctxt->default_instance)
> + return;
> +
> + _mixer_popup_timer_new(ctxt->default_instance);
> + _mixer_toggle_mute(ctxt->default_instance);
> }
>
> static E_Config_Dialog *
>
> Modified: trunk/e/src/modules/mixer/e_mod_main.h
> ===================================================================
> --- trunk/e/src/modules/mixer/e_mod_main.h 2010-10-13 09:34:40 UTC (rev
> 53346)
> +++ trunk/e/src/modules/mixer/e_mod_main.h 2010-10-13 10:36:04 UTC (rev
> 53347)
> @@ -29,6 +29,7 @@
> {
> E_Gadcon_Client *gcc;
> E_Gadcon_Popup *popup;
> + Ecore_Timer *popup_timer;
> E_Menu *menu;
>
> struct
> @@ -81,6 +82,8 @@
> E_Dialog *e_mixer_app_dialog_new(E_Container *con, void (*func)(E_Dialog
> *dialog, void *data), void *data);
> int e_mixer_app_dialog_select(E_Dialog *dialog, const char *card_name, const
> char *channel_name);
>
> +static void _mixer_popup_timer_new(E_Mixer_Instance *inst);
> +static Eina_Bool _mixer_popup_timer_cb(void *data);
> int e_mixer_update(E_Mixer_Instance *inst);
> const char *e_mixer_theme_path(void);
>
>
>
> ------------------------------------------------------------------------------
> Beautiful is writing same markup. Internet Explorer 9 supports
> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
> Spend less time writing and rewriting code and more time creating great
> experiences on the web. Be a part of the beta today.
> http://p.sf.net/sfu/beautyoftheweb
> _______________________________________________
> enlightenment-svn mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
>
--
Fabiano Fidêncio
ProFUSION embedded systems
http://www.profusion.mobi
------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel