Re: [E-devel] Pager patch

2006-11-25 Thread The Rasterman
On Thu, 23 Nov 2006 00:24:02 +0200 Виктор Кожухаров [EMAIL PROTECTED]
babbled:

 В нд, 2006-11-19 в 17:44 +0900, Carsten Haitzler написа:
  On Thu, 16 Nov 2006 20:41:41 +0100 lok [EMAIL PROTECTED] babbled:
  
   On Thu, 16 Nov 2006 19:40:58 +0100
   lok [EMAIL PROTECTED] wrote:
   
Hi,

I've made some changement on the pager config.
The first one let the user choose the mouse button he wants for the two
type of drag.
And the second disable the wheel callback on the pager. The wheel
callback on the pager works only if the pager is in a shelf above
everything. By default it's disabled because scrolling above the pager
in this case make you switch by a step of 2 desktops (one is done by
the pager's callback and the other by the E's default mousebinding).
 
 can we revert this part, about removing the wheel callback. With the
 default mouse bindings NOT having the mouse wheel bound to desktop
 change, there's really no other way to _just_ change the desks with the
 wheel. and since that's the default, there are a lot more people who
 can't use the wheel for desk change, than there are people who can.

the default is NOT to use the wheel on the desktop to change - that WAS the
default at some stage. the patch is ok - except for a bug where you can't
properly set the button for drag modes.


The pager is probably the most used module, so I prefere to not commit
this patch directly. (just to be sure to not be hunt down if I've made
a mistake). And the patch also fix a small warning.

Lok
   
   ok sorry about the double posting. 
   I forgot to change two values before making the patch.
   This one is the good one. (No need to apply the previous)
  
  sounds good - note though - the default removed the wheel bindings for the
  desktop so if you started from fresh config it wouldnt jump 2 desks.
  
 -- 
 Виктор Кожухаров /Viktor Kojouharov/
 


-- 
- Codito, ergo sum - I code, therefore I am --
The Rasterman (Carsten Haitzler)[EMAIL PROTECTED]
裸好多
Tokyo, Japan (東京 日本)

-
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.phpp=sourceforgeCID=DEVDEV
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Pager patch

2006-11-22 Thread Виктор Кожухаров
В нд, 2006-11-19 в 17:44 +0900, Carsten Haitzler написа:
 On Thu, 16 Nov 2006 20:41:41 +0100 lok [EMAIL PROTECTED] babbled:
 
  On Thu, 16 Nov 2006 19:40:58 +0100
  lok [EMAIL PROTECTED] wrote:
  
   Hi,
   
   I've made some changement on the pager config.
   The first one let the user choose the mouse button he wants for the two
   type of drag.
   And the second disable the wheel callback on the pager. The wheel
   callback on the pager works only if the pager is in a shelf above
   everything. By default it's disabled because scrolling above the pager
   in this case make you switch by a step of 2 desktops (one is done by
   the pager's callback and the other by the E's default mousebinding).

can we revert this part, about removing the wheel callback. With the
default mouse bindings NOT having the mouse wheel bound to desktop
change, there's really no other way to _just_ change the desks with the
wheel. and since that's the default, there are a lot more people who
can't use the wheel for desk change, than there are people who can.
   
   The pager is probably the most used module, so I prefere to not commit
   this patch directly. (just to be sure to not be hunt down if I've made
   a mistake). And the patch also fix a small warning.
   
   Lok
  
  ok sorry about the double posting. 
  I forgot to change two values before making the patch.
  This one is the good one. (No need to apply the previous)
 
 sounds good - note though - the default removed the wheel bindings for the
 desktop so if you started from fresh config it wouldnt jump 2 desks.
 
-- 
Виктор Кожухаров /Viktor Kojouharov/


signature.asc
Description: Това е	 цифрово	 подписана	 част от	 писмото
-
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.phpp=sourceforgeCID=DEVDEV___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Pager patch

2006-11-19 Thread The Rasterman
On Thu, 16 Nov 2006 20:41:41 +0100 lok [EMAIL PROTECTED] babbled:

 On Thu, 16 Nov 2006 19:40:58 +0100
 lok [EMAIL PROTECTED] wrote:
 
  Hi,
  
  I've made some changement on the pager config.
  The first one let the user choose the mouse button he wants for the two
  type of drag.
  And the second disable the wheel callback on the pager. The wheel
  callback on the pager works only if the pager is in a shelf above
  everything. By default it's disabled because scrolling above the pager
  in this case make you switch by a step of 2 desktops (one is done by
  the pager's callback and the other by the E's default mousebinding).
  
  The pager is probably the most used module, so I prefere to not commit
  this patch directly. (just to be sure to not be hunt down if I've made
  a mistake). And the patch also fix a small warning.
  
  Lok
 
 ok sorry about the double posting. 
 I forgot to change two values before making the patch.
 This one is the good one. (No need to apply the previous)

sounds good - note though - the default removed the wheel bindings for the
desktop so if you started from fresh config it wouldnt jump 2 desks.

-- 
- Codito, ergo sum - I code, therefore I am --
The Rasterman (Carsten Haitzler)[EMAIL PROTECTED]
裸好多
Tokyo, Japan (東京 日本)

-
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.phpp=sourceforgeCID=DEVDEV
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Pager patch

2006-11-16 Thread lok
On Thu, 16 Nov 2006 19:40:58 +0100
lok [EMAIL PROTECTED] wrote:

 Hi,
 
 I've made some changement on the pager config.
 The first one let the user choose the mouse button he wants for the two
 type of drag.
 And the second disable the wheel callback on the pager. The wheel
 callback on the pager works only if the pager is in a shelf above
 everything. By default it's disabled because scrolling above the pager
 in this case make you switch by a step of 2 desktops (one is done by
 the pager's callback and the other by the E's default mousebinding).
 
 The pager is probably the most used module, so I prefere to not commit
 this patch directly. (just to be sure to not be hunt down if I've made
 a mistake). And the patch also fix a small warning.
 
 Lok

ok sorry about the double posting. 
I forgot to change two values before making the patch.
This one is the good one. (No need to apply the previous)

LokIndex: pager/e_mod_config.c
===
RCS file: /cvs/e/e17/apps/e/src/modules/pager/e_mod_config.c,v
retrieving revision 1.22
diff -u -u -r1.22 e_mod_config.c
--- pager/e_mod_config.c	3 Sep 2006 07:40:45 -	1.22
+++ pager/e_mod_config.c	16 Nov 2006 19:36:54 -
@@ -1,11 +1,37 @@
 #include e.h
 #include e_mod_main.h
 
+typedef enum _Pager_Grab_Button Pager_Grab_Button;
+enum _Pager_Grab_Button
+{
+   GRAB_BUTTON_DRAG,
+   GRAB_BUTTON_NOPLACE
+};
+
 struct _E_Config_Dialog_Data
 {
int show_popup;
double popup_speed;
int drag_resist;
+   unsigned char btn_drag;
+   unsigned char btn_noplace;
+   int flip_desk;
+
+   struct
+ {
+	Ecore_X_Window bind_win;
+	E_Dialog *dia;
+	Evas_List *handlers;
+
+	unsigned char *button1;
+	unsigned char *button2;
+ } grab;
+
+   struct
+ {
+	Evas_Object *o_btn1;
+	Evas_Object *o_btn2;
+ } gui;
 };
 
 /* Protos */
@@ -15,6 +41,11 @@
 static int _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
 static Evas_Object *_advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
 static int _advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
+static void _advanced_update_button_label(E_Config_Dialog_Data *cfdata);
+static void _grab_wnd_show(void *data1, void *data2);
+static void _grab_wnd_hide(E_Config_Dialog_Data *cfdata);
+static int _grab_mouse_down_cb(void *data, int type, void *event);
+static int _grab_key_down_cb(void *data, int type, void *event);
 
 void 
 _config_pager_module(Config_Item *ci)
@@ -47,6 +78,9 @@
cfdata-show_popup = pager_config-popup;
cfdata-popup_speed = pager_config-popup_speed;
cfdata-drag_resist = pager_config-drag_resist;
+   cfdata-btn_drag = pager_config-btn_drag;
+   cfdata-btn_noplace = pager_config-btn_noplace;
+   cfdata-flip_desk = pager_config-flip_desk;
 }
 
 static void *
@@ -111,6 +145,25 @@
e_widget_framelist_object_append(of, ob);
e_widget_list_object_append(o, of, 1, 1, 0.5);   
 
+   of = e_widget_frametable_add(evas, _(Buttons Settings), 0);
+   ob = e_widget_label_add(evas, _(Drag and select button));
+   e_widget_frametable_object_append(of, ob, 1, 1, 1, 1, 1, 1, 1, 1);
+   ob = e_widget_label_add(evas, _(Drag no place button));
+   e_widget_frametable_object_append(of, ob, 1, 2, 1, 1, 1, 1, 1, 1);
+   ob = e_widget_button_add(evas, _(Click to set), NULL, _grab_wnd_show, (void *)GRAB_BUTTON_DRAG, cfdata);
+   e_widget_frametable_object_append(of, ob, 2, 1, 1, 1, 1, 1, 0, 0);
+   cfdata-gui.o_btn1 = ob;
+   ob = e_widget_button_add(evas, _(Click to set), NULL, _grab_wnd_show, (void *)GRAB_BUTTON_NOPLACE, cfdata);
+   e_widget_frametable_object_append(of, ob, 2, 2, 1, 1, 1, 1, 0, 0);
+   cfdata-gui.o_btn2 = ob;
+   _advanced_update_button_label(cfdata);
+   e_widget_list_object_append(o, of, 1, 1, 0.5);   
+   
+   of = e_widget_framelist_add(evas, _(Wheel callback), 0);   
+   ob = e_widget_check_add(evas, _(Flip desktop on mouse wheel), (cfdata-flip_desk));
+   e_widget_framelist_object_append(of, ob);
+   e_widget_list_object_append(o, of, 1, 1, 0.5);   
+
return o;
 }
 
@@ -120,7 +173,135 @@
pager_config-popup = cfdata-show_popup;
pager_config-popup_speed = cfdata-popup_speed;
pager_config-drag_resist = cfdata-drag_resist;
+   pager_config-btn_drag = cfdata-btn_drag;
+   pager_config-btn_noplace = cfdata-btn_noplace;
+   pager_config-flip_desk = cfdata-flip_desk;
_pager_cb_config_updated();
e_config_save_queue();
+   return 1;
+}
+
+static void
+_advanced_update_button_label(E_Config_Dialog_Data *cfdata)
+{
+   char label[strlen(_(Click to set))];
+   
+   if (cfdata-btn_drag)
+ snprintf(label, strlen(_(Button ))+3, Button %d, cfdata-btn_drag);
+   else
+ snprintf(label, strlen(_(Click to set))+1, _(Click to set));
+   e_widget_button_label_set(cfdata-gui.o_btn1, label);
+   
+   if (cfdata-btn_noplace)
+ snprintf(label, strlen(_(Button ))+3, Button %d, cfdata-btn_noplace);
+   else
+ snprintf(label, strlen(_(Click