Enlightenment CVS committal

Author  : lok
Project : e_modules
Module  : mixer

Dir     : e_modules/mixer


Modified Files:
        e_mod_config.c e_mod_main.c e_mod_main.h 


Log Message:
Added popup options.

===================================================================
RCS file: /cvs/e/e_modules/mixer/e_mod_config.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- e_mod_config.c      31 Dec 2006 12:31:24 -0000      1.19
+++ e_mod_config.c      21 Jan 2007 08:57:12 -0000      1.20
@@ -9,9 +9,12 @@
    int card_id;
    int channel_id;
    int mode;
-       
+
    char *app;
    int use_app;
+   
+   int show_popup;
+   double popup_speed;
 };
 
 /* Protos */
@@ -58,6 +61,8 @@
    cfdata->channel_id = ci->channel_id;
    cfdata->mode = ci->mode;
    cfdata->use_app = ci->use_app;
+   cfdata->show_popup = ci->show_popup;
+   cfdata->popup_speed = ci->popup_speed;
    if (ci->app != NULL)
      cfdata->app = strdup(ci->app);
 }
@@ -146,6 +151,15 @@
               }
          }     
      }
+   ot = e_widget_frametable_add(evas, D_("Mixer Popup"), 1);
+   ob = e_widget_check_add(evas, D_("Show Popup"), &(cfdata->show_popup));
+   e_widget_frametable_object_append(ot, ob, 0, 0, 1, 1, 1, 0, 1, 0);
+   ob = e_widget_label_add(evas, D_("Popup Speed"));
+   e_widget_frametable_object_append(ot, ob, 0, 1, 1, 1, 1, 0, 1, 0);
+   ob = e_widget_slider_add(evas, 1, 0, D_("%1.1f seconds"), 0.1, 9.9, 0.1, 0, 
&(cfdata->popup_speed), NULL, 160);
+   e_widget_frametable_object_append(ot, ob, 0, 2, 1, 1, 1, 0, 1, 0);
+
+   e_widget_list_object_append(o, ot, 1, 1, 0.5);
    
    return o;
 }
@@ -161,6 +175,8 @@
    ci->channel_id = cfdata->channel_id;
    ci->mode = cfdata->mode;
    ci->use_app = cfdata->use_app;
+   ci->show_popup = cfdata->show_popup;
+   ci->popup_speed = cfdata->popup_speed;
    if (ci->app) evas_stringshare_del(ci->app);
    if (cfdata->app != NULL)
      ci->app = evas_stringshare_add(cfdata->app);
===================================================================
RCS file: /cvs/e/e_modules/mixer/e_mod_main.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -3 -r1.58 -r1.59
--- e_mod_main.c        31 Dec 2006 12:31:24 -0000      1.58
+++ e_mod_main.c        21 Jan 2007 08:57:12 -0000      1.59
@@ -492,13 +492,15 @@
    E_CONFIG_VAL(D, T, mode, INT);
    E_CONFIG_VAL(D, T, app, STR);
    E_CONFIG_VAL(D, T, use_app, INT);
+   E_CONFIG_VAL(D, T, show_popup, INT);
+   E_CONFIG_VAL(D, T, popup_speed, DOUBLE);
 
    conf_edd = E_CONFIG_DD_NEW("Mixer_Config", Config);
 #undef T
 #undef D
 #define T Config
 #define D conf_edd
-      E_CONFIG_VAL(D, T, decrease_vol_key.context, INT);
+   E_CONFIG_VAL(D, T, decrease_vol_key.context, INT);
    E_CONFIG_VAL(D, T, decrease_vol_key.modifiers, INT);
    E_CONFIG_VAL(D, T, decrease_vol_key.key, STR);
    E_CONFIG_VAL(D, T, decrease_vol_key.action, STR);
@@ -534,6 +536,8 @@
        ci->mode = SIMPLE_MODE;
        ci->app = evas_stringshare_add("");
        ci->use_app = 0;
+       ci->show_popup = 1;
+       ci->popup_speed = 2.0;
        mixer_config->items = evas_list_append(mixer_config->items, ci);
      }
    mixer_register_module_actions();
@@ -1156,7 +1160,7 @@
    if (!(con = e_container_current_get(e_manager_current_get()))) return;
 
    ci = _mixer_config_item_get(inst->mixer, inst->gcc->id);
-   if (!ci) return;
+   if (!ci && !ci->show_popup) return;
 
    if (!(win = inst->mixer->gauge_win))
      {
@@ -1194,7 +1198,7 @@
    
    if (win->timer) ecore_timer_del(win->timer);
 
-   win->timer = ecore_timer_add(3.0, _mixer_window_gauge_visible_cb, win);
+   win->timer = ecore_timer_add(ci->popup_speed, 
_mixer_window_gauge_visible_cb, win);
 }
 
 static void
===================================================================
RCS file: /cvs/e/e_modules/mixer/e_mod_main.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- e_mod_main.h        11 Nov 2006 19:58:58 -0000      1.9
+++ e_mod_main.h        21 Jan 2007 08:57:12 -0000      1.10
@@ -29,6 +29,9 @@
        
    const char *app;
    int         use_app;
+      
+   int    show_popup;
+   double popup_speed;
 };
 
 EAPI extern E_Module_Api e_modapi;



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to