Enlightenment CVS committal

Author  : lok
Project : e_modules
Module  : notification

Dir     : e_modules/notification/src


Modified Files:
        e_mod_box.c e_mod_config_item.c e_mod_macro.h e_mod_main.c 
        e_mod_main.h 


Log Message:
Make the popup at mouse over and the focus when clicking on an notification icon
optional. (For those which already have a notification config you need to
reenable them in your configuration).

===================================================================
RCS file: /cvs/e/e_modules/notification/src/e_mod_box.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- e_mod_box.c 7 Mar 2008 18:02:59 -0000       1.2
+++ e_mod_box.c 19 Mar 2008 16:32:21 -0000      1.3
@@ -229,6 +229,8 @@
   ci = E_NEW(Config_Item, 1);
   ci->id = evas_stringshare_add(id);
   ci->show_label     = 1;
+  ci->show_popup     = 1;
+  ci->focus_window   = 1;
   ci->store_low      = 1;
   ci->store_normal   = 1;
   ci->store_critical = 0;
@@ -722,15 +724,18 @@
                                    void *event_info __UNUSED__)
 {
   Notification_Box_Icon *ic;
+  Config_Item *ci;
+
+  if (!(ic = data) || !ic->n_box || !ic->n_box->inst) return;
+  if (!(ci = ic->n_box->inst->ci)) return;
 
-  ic = data;
   _notification_box_icon_signal_emit(ic, "e,state,focused", "e");
-  if (ic->n_box->inst->ci->show_label)
+  if (ci->show_label)
     {
       _notification_box_icon_fill_label(ic);
       _notification_box_icon_signal_emit(ic, "e,action,show,label", "e");
     }
-  if (!ic->popup && !ic->mouse_in_timer)
+  if (ci->show_popup && !ic->popup && !ic->mouse_in_timer)
     ic->mouse_in_timer = ecore_timer_add(0.5, 
_notification_box_cb_icon_mouse_still_in, ic);
 }
 
@@ -774,7 +779,7 @@
   b = ic->n_box;
   if ((ev->button == 1))
     {
-      if (ic->border)
+      if (b->inst->ci->focus_window && ic->border)
         {
           e_border_uniconify(ic->border);
           e_desk_show(ic->border->desk);
===================================================================
RCS file: /cvs/e/e_modules/notification/src/e_mod_config_item.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- e_mod_config_item.c 2 Mar 2008 01:33:28 -0000       1.1
+++ e_mod_config_item.c 19 Mar 2008 16:32:21 -0000      1.2
@@ -3,6 +3,8 @@
 struct _E_Config_Dialog_Data 
 {
    int show_label;
+   int show_popup;
+   int focus_window;
    int store_low;
    int store_normal;
    int store_critical;
@@ -42,6 +44,8 @@
 _ci_fill_data(Config_Item *ci, E_Config_Dialog_Data *cfdata)
 {
    cfdata->show_label     = ci->show_label;
+   cfdata->show_popup     = ci->show_popup;
+   cfdata->focus_window   = ci->focus_window;
    cfdata->store_low      = ci->store_low;
    cfdata->store_normal   = ci->store_normal;
    cfdata->store_critical = ci->store_critical;
@@ -78,6 +82,10 @@
    of = e_widget_framelist_add(evas, D_("General Settings"), 0);
    ob = e_widget_check_add(evas, D_("Show Icon Label"), &(cfdata->show_label));
    e_widget_framelist_object_append(of, ob);
+   ob = e_widget_check_add(evas, D_("Show the popup on mouse over"), 
&(cfdata->show_popup));
+   e_widget_framelist_object_append(of, ob);
+   ob = e_widget_check_add(evas, D_("Focus the source window when clicking"), 
&(cfdata->focus_window));
+   e_widget_framelist_object_append(of, ob);
    e_widget_list_object_append(o, of, 1, 1, 0.5);
 
    of = e_widget_framelist_add(evas, D_("Urgency"), 0);
@@ -101,6 +109,8 @@
    
    ci = cfd->data;
    ci->show_label     = cfdata->show_label;
+   ci->show_popup     = cfdata->show_popup;
+   ci->focus_window   = cfdata->focus_window;
    ci->store_low      = cfdata->store_low;
    ci->store_normal   = cfdata->store_normal;
    ci->store_critical = cfdata->store_critical;
===================================================================
RCS file: /cvs/e/e_modules/notification/src/e_mod_macro.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- e_mod_macro.h       7 Mar 2008 18:02:59 -0000       1.2
+++ e_mod_macro.h       19 Mar 2008 16:32:21 -0000      1.3
@@ -4,7 +4,7 @@
 #define D_(str) dgettext(PACKAGE, str)
 
 #define MOD_CFG_FILE_EPOCH 0x0002
-#define MOD_CFG_FILE_GENERATION 0x0003
+#define MOD_CFG_FILE_GENERATION 0x0004
 #define MOD_CFG_FILE_VERSION \
    ((MOD_CFG_FILE_EPOCH << 16) | MOD_CFG_FILE_GENERATION)
 
===================================================================
RCS file: /cvs/e/e_modules/notification/src/e_mod_main.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- e_mod_main.c        8 Mar 2008 00:24:03 -0000       1.10
+++ e_mod_main.c        19 Mar 2008 16:32:21 -0000      1.11
@@ -180,6 +180,8 @@
    #define D conf_item_edd
    E_CONFIG_VAL(D, T, id, STR);
    E_CONFIG_VAL(D, T, show_label, INT);
+   E_CONFIG_VAL(D, T, show_popup, INT);
+   E_CONFIG_VAL(D, T, focus_window, INT);
    E_CONFIG_VAL(D, T, store_low, INT);
    E_CONFIG_VAL(D, T, store_normal, INT);
    E_CONFIG_VAL(D, T, store_critical, INT);
===================================================================
RCS file: /cvs/e/e_modules/notification/src/e_mod_main.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- e_mod_main.h        2 Mar 2008 01:33:28 -0000       1.3
+++ e_mod_main.h        19 Mar 2008 16:32:21 -0000      1.4
@@ -54,6 +54,8 @@
 {
    const char *id;
    int show_label;
+   int show_popup;
+   int focus_window;
    int store_low;
    int store_normal;
    int store_critical;



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to