Re: [PATCH 2/2] Enable usermenu

2015-09-03 Thread Rodolfo García Peñas (kix)

Hi,

I think this patch should be removed.

The menu is created and painted when the application starts but is not  
removed when the application is closed.


Without the patch, the menu is created and painted when te application  
get the focus (with mouse), and removed when the application lost the  
focus, for example, when is closed.


We should write a patch to solve the problem of getting the focus  
using keyboard (alt+tab).


Cheers,
kix

"Rodolfo García Peñas (kix)"  escribió:


This patch is mostly for testing.

"Rodolfo García Peñas (kix)"  escribió:


This patch enables the usermenu when the application is launched
and the usermenu file exists.

Signed-off-by: Rodolfo García Peñas (kix) 
---
src/actions.c | 1 +
src/application.c | 2 ++
2 files changed, 3 insertions(+)

diff --git a/src/actions.c b/src/actions.c
index 5adfab4..b210888 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -225,6 +225,7 @@ void wSetFocusTo(WScreen *scr, WWindow *wwin)
wUserMenuRefreshInstances(napp->menu, wwin);
#endif  /* USER_MENU */

+   /* kix: Only menu map with mouse, not alt+tab! */
if (wwin->flags.mapped)
wAppMenuMap(napp->menu, wwin);
}
diff --git a/src/application.c b/src/application.c
index c43df04..6ff3d3f 100644
--- a/src/application.c
+++ b/src/application.c
@@ -129,6 +129,8 @@ WApplication *wApplicationCreate(WWindow * wwin)
#ifdef USER_MENU
if (!wapp->menu)
wapp->menu = wUserMenuGet(scr, wapp->main_window_desc);
+
+   wAppMenuMap(wapp->menu, wwin);
#endif

/* Set application wide attributes from the leader */
--
2.5.0


--
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.



Rodolfo García Peñas (kix)
http://www.kix.es/


--
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.



Rodolfo García Peñas (kix)
http://www.kix.es/


--
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


Re: [PATCH 2/2] Enable usermenu

2015-09-03 Thread Josip Deanovic
On Thursday 2015-09-03 11:05:29 Rodolfo García  Peñas wrote:
> Hi,
> 
> I think this patch should be removed.
> 
> The menu is created and painted when the application starts but is not  
> removed when the application is closed.
> 
> Without the patch, the menu is created and painted when te application  
> get the focus (with mouse), and removed when the application lost the
> focus, for example, when is closed.

I would say that this is a normal *Step behavior.

> We should write a patch to solve the problem of getting the focus  
> using keyboard (alt+tab).


-- 
Josip Deanovic


--
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


Re: [PATCH 2/2] Enable usermenu

2015-08-27 Thread Josip Deanovic
On Thursday 2015-08-27 08:02:47 Yury Tarasievich wrote:
 On 08/27/2015 12:07 AM, Josip Deanovic wrote:
  On Wednesday 2015-08-26 19:59:04 Yury Tarasievich wrote:
  Another thought: could those app menus be
  automatically picked by WM from, e.g. GNUstep
  installation?
  
  Are we talking about usermenu or appmenu?
 
 I mean those app-usermenus we were talking about
 just now. Are there any useful usermenus-related
 resources for WM to pick up from GNUstep
 installation? Or is this a completely
 stand-alone-from-anything-else feature?

I don't really know because I am not a regular GNUstep
user so maybe somebody else could answer to this question.

I think that this is Windowmker specific feature.
I would like to try GNUstep again and check on this (last time
I tried it was like 10 years ago) but I am short with time.

-- 
Josip Deanovic


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


Re: [PATCH 2/2] Enable usermenu

2015-08-26 Thread Yury Tarasievich

Thank you, Josip, Zoltan,

I think I've got your meaning now. Of course, 
I've never been a heavy *STEP user, so those 
extra menus which one app here, in WM, would 
have, and others would not, does not hold such 
an appeal. On the other hand, an extra 
functionality for the same money won't hurt, 
would it?


Another thought: could those app menus be 
automatically picked by WM from, e.g. GNUstep 
installation?


-Yury

On 08/26/2015 01:40 PM, BALATON Zoltan wrote:
...


--
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


Re: [PATCH 2/2] Enable usermenu

2015-08-26 Thread Josip Deanovic
Josip DeanovicOn Wednesday 2015-08-26 23:07:28  wrote:
 On Wednesday 2015-08-26 19:59:04 Yury Tarasievich wrote:
  Another thought: could those app menus be 
  automatically picked by WM from, e.g. GNUstep 
  installation?
 
 Are we talking about usermenu or appmenu?
 
 usermenu is a feature of the windowmaker which enables sending
 a configurable keyboard events to specified window while appmenu
 is a menu programmed into an application itself (check wterm
 source and its -wm option for more info).
 
 I am not a regular GNUstep user but I don't think that GNUstep
 applications are aware of usermenu feature.
 Also, from what I have seen while I was trying few GNUstep
 applications they are not using windowmaker's usermenu feature
 appmenu
 either. They are handling their menus differently which probably
 makes it possible for GNUstep to use different window managers and
 not just windowmaker.

-- 
Josip Deanovic


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


Re: [PATCH 2/2] Enable usermenu

2015-08-26 Thread Josip Deanovic
On Wednesday 2015-08-26 19:59:04 Yury Tarasievich wrote:
 Another thought: could those app menus be 
 automatically picked by WM from, e.g. GNUstep 
 installation?

Are we talking about usermenu or appmenu?

usermenu is a feature of the windowmaker which enables sending
a configurable keyboard events to specified window while appmenu
is a menu programmed into an application itself (check wterm
source and its -wm option for more info).

I am not a regular GNUstep user but I don't think that GNUstep
applications are aware of usermenu feature.
Also, from what I have seen while I was trying few GNUstep
applications they are not using windowmaker's usermenu feature
either. They are handling their menus differently which probably
makes it possible for GNUstep to use different window managers and
not just windowmaker.

-- 
Josip Deanovic


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


Re: [PATCH 2/2] Enable usermenu

2015-08-26 Thread Josip Deanovic
On Wednesday 2015-08-26 07:12:39 Yury Tarasievich wrote:
 Hmm, so you describe a sort of 
 complex-input-assisting component.

I would call it simple. :-)

 That, in itself, is surely handy, but seems to 
 me it wasn't the intended use for usermenu. 

What is your idea of the intended use for the usermenu?

 Like, I click the app and may get this input 
 assistant from WM? I just don't see it, the 
 purpose of usermenu must be something more general.

But if you have ever used Next Step or even GNUstep
you wouldn't be that surprised by the look and feel
of the usermenu menu.

If you check some youtube movies about Next Step look and feel
you will see that such application menus are a common thing on
that operating system.
We are not accustomed to it as modern applications don't
share the menu like Next and OSX do so we don't see something
like this floating around as a normal behavior.

Since Next is hard to find and even harder to run on recent
hardware everyone who likes Next OS look should at least try
GNUstep to get the better insight how things used to behave
back then.

 Thanks for explanation, anyway.

You are welcome.

-- 
Josip Deanovic


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


Re: [PATCH 2/2] Enable usermenu

2015-08-26 Thread Yury Tarasievich

On 08/27/2015 12:07 AM, Josip Deanovic wrote:

On Wednesday 2015-08-26 19:59:04 Yury Tarasievich wrote:

Another thought: could those app menus be
automatically picked by WM from, e.g. GNUstep
installation?


Are we talking about usermenu or appmenu?


I mean those app-usermenus we were talking about 
just now. Are there any useful usermenus-related 
resources for WM to pick up from GNUstep 
installation? Or is this a completely 
stand-alone-from-anything-else feature?


-Yury


usermenu is a feature of the windowmaker which enables sending
a configurable keyboard events to specified window while appmenu
is a menu programmed into an application itself (check wterm
source and its -wm option for more info).



--
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


Re: [PATCH 2/2] Enable usermenu

2015-08-25 Thread Yury Tarasievich
Thank you so very much. I understand now how it 
functions.


Not all clear yet, though:

Call me dim, but this functionality is useful 
for what use scenario?


Like, *when* might I want a menu popping up on 
every focus change? (I assume this is explicit 
switch of focus, not 
auto-grabbing-focus-from-passing-mouse).


If somebody could offer some advice on this, please?

-Yury

On 08/25/2015 06:39 PM, Josip Deanovic wrote:
...

3. Run kcalc and every time it is focused with the pointer a menu should
appear. Selecting a option from the menu will send the specified
keyboard event to the kcalc window (kcalc.Kcalc window to be exact).



--
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


Re: [PATCH 2/2] Enable usermenu

2015-08-25 Thread Yury Tarasievich
Guys, terribly sorry for the ignorance, but I 
somehow can't figure out this new (old?) menu thing?


It is named window class.menu and has to 
reside in a specific location, that much I've got.


Now, tell me, please, when/how is this new menu 
activated; is it superceding the global menu? 
So, e.g., 'maximize' from global menu item must 
be added by hand into every such app menu?


Can't play with patching/compiling right now.

-Yury

On 08/25/2015 08:15 PM, Amadeusz Sławiński wrote:
...


--
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


Re: [PATCH 2/2] Enable usermenu

2015-08-25 Thread Amadeusz Sławiński
On Tue, 25 Aug 2015 07:45:03 +
Rodolfo García Peñas (kix) k...@kix.es wrote:

 This patch is mostly for testing.

So I tested it ;)

and I seem to have found a problem: it hardcodes path where it looks for
menus.

I personally don't like GNUstep folder in my $HOME, so I have this in
my .xinitrc:
export GNUSTEP_USER_ROOT=${HOME}/.config/WindowMaker
however when I put menu file into directory:
.config/WindowMaker/Library/WindowMaker/UserMenus 
Window Maker doesn't see it, but when I put it in 
~/GNUstep/Library/WindowMaker/UserMenus
menu appears.


As a side question, how exactly is it supposed to work? Does it send
input to active window of the app it is for? I've tried the example
one for xcalc, but used it with xterm and nothing happens when I click
menu items, I would assume it would type some numbers in, even if it
was not meant for xterm.

Amadeusz


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


Re: [PATCH 2/2] Enable usermenu

2015-08-25 Thread kix


El 25 de agosto de 2015 19:15:52 CEST, Amadeusz Sławiński am...@asmblr.net 
escribió:
On Tue, 25 Aug 2015 07:45:03 +
Rodolfo García Peñas (kix) k...@kix.es wrote:

 This patch is mostly for testing.

So I tested it ;)

and I seem to have found a problem: it hardcodes path where it looks
for
menus.

I personally don't like GNUstep folder in my $HOME, so I have this in
my .xinitrc:
export GNUSTEP_USER_ROOT=${HOME}/.config/WindowMaker
however when I put menu file into directory:
.config/WindowMaker/Library/WindowMaker/UserMenus 
Window Maker doesn't see it, but when I put it in 
~/GNUstep/Library/WindowMaker/UserMenus
menu appears.

Yes, the path is hardcoded. I will release a patch to solve it.


As a side question, how exactly is it supposed to work? Does it send
input to active window of the app it is for? I've tried the example
one for xcalc, but used it with xterm and nothing happens when I click
menu items, I would assume it would type some numbers in, even if it
was not meant for xterm.

Amadeusz

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


Re: [PATCH 2/2] Enable usermenu

2015-08-25 Thread Rodolfo García Peñas (kix)

This patch is mostly for testing.

Rodolfo García Peñas (kix) k...@kix.es escribió:


This patch enables the usermenu when the application is launched
and the usermenu file exists.

Signed-off-by: Rodolfo García Peñas (kix) k...@kix.es
---
 src/actions.c | 1 +
 src/application.c | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/src/actions.c b/src/actions.c
index 5adfab4..b210888 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -225,6 +225,7 @@ void wSetFocusTo(WScreen *scr, WWindow *wwin)
wUserMenuRefreshInstances(napp-menu, wwin);
 #endif /* USER_MENU */

+   /* kix: Only menu map with mouse, not alt+tab! */
if (wwin-flags.mapped)
wAppMenuMap(napp-menu, wwin);
}
diff --git a/src/application.c b/src/application.c
index c43df04..6ff3d3f 100644
--- a/src/application.c
+++ b/src/application.c
@@ -129,6 +129,8 @@ WApplication *wApplicationCreate(WWindow * wwin)
 #ifdef USER_MENU
if (!wapp-menu)
wapp-menu = wUserMenuGet(scr, wapp-main_window_desc);
+
+   wAppMenuMap(wapp-menu, wwin);
 #endif

/* Set application wide attributes from the leader */
--
2.5.0


--
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.



Rodolfo García Peñas (kix)
http://www.kix.es/


--
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


[PATCH 2/2] Enable usermenu

2015-08-25 Thread kix
This patch enables the usermenu when the application is launched
and the usermenu file exists.

Signed-off-by: Rodolfo García Peñas (kix) k...@kix.es
---
 src/actions.c | 1 +
 src/application.c | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/src/actions.c b/src/actions.c
index 5adfab4..b210888 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -225,6 +225,7 @@ void wSetFocusTo(WScreen *scr, WWindow *wwin)
wUserMenuRefreshInstances(napp-menu, wwin);
 #endif /* USER_MENU */
 
+   /* kix: Only menu map with mouse, not alt+tab! */
if (wwin-flags.mapped)
wAppMenuMap(napp-menu, wwin);
}
diff --git a/src/application.c b/src/application.c
index c43df04..6ff3d3f 100644
--- a/src/application.c
+++ b/src/application.c
@@ -129,6 +129,8 @@ WApplication *wApplicationCreate(WWindow * wwin)
 #ifdef USER_MENU
if (!wapp-menu)
wapp-menu = wUserMenuGet(scr, wapp-main_window_desc);
+
+   wAppMenuMap(wapp-menu, wwin);
 #endif
 
/* Set application wide attributes from the leader */
-- 
2.5.0


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


Re: [PATCH 2/2] Enable usermenu

2015-08-25 Thread Josip Deanovic
On Tuesday 2015-08-25 20:19:38 Yury Tarasievich wrote:
 Thank you so very much. I understand now how it 
 functions.
 
 Not all clear yet, though:
 
 Call me dim, but this functionality is useful 
 for what use scenario?

This feature could prove useful in case when you have an application
that requires several repetitive keyboard events and instead of
typing something in, you could just select the sequence of keyboard
events from the configured usermenu.

The possibilities and use cases are endless.
For example, with a calculator application such as xcalc or kcalc
one could come up with the usermenu containing every possible
constant you can imagine.
This could be handy for people who are using a lot of constants
in their calculations.

And this is just one simple example that came to my mind.

Another example, if you are using e-mail client which doesn't
support templates you could create a usermenu options with the keyboard
event sequences used to create a new e-mail and enter the the text
you want to use as a template.

-- 
Josip Deanovic


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


[PATCH 2/2] Enable usermenu

2015-08-24 Thread kix
This patch enables the usermenu when the application is launched
and the usermenu file exists.

The usermenu folder is ~/GNUstep/Defaults/UserMenus and was wrong
in the code.

Signed-off-by: Rodolfo García Peñas (kix) k...@kix.es
---
 src/actions.c | 1 +
 src/application.c | 2 ++
 src/wconfig.h.in  | 2 +-
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/actions.c b/src/actions.c
index 5adfab4..b210888 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -225,6 +225,7 @@ void wSetFocusTo(WScreen *scr, WWindow *wwin)
wUserMenuRefreshInstances(napp-menu, wwin);
 #endif /* USER_MENU */
 
+   /* kix: Only menu map with mouse, not alt+tab! */
if (wwin-flags.mapped)
wAppMenuMap(napp-menu, wwin);
}
diff --git a/src/application.c b/src/application.c
index c43df04..6ff3d3f 100644
--- a/src/application.c
+++ b/src/application.c
@@ -129,6 +129,8 @@ WApplication *wApplicationCreate(WWindow * wwin)
 #ifdef USER_MENU
if (!wapp-menu)
wapp-menu = wUserMenuGet(scr, wapp-main_window_desc);
+
+   wAppMenuMap(wapp-menu, wwin);
 #endif
 
/* Set application wide attributes from the leader */
diff --git a/src/wconfig.h.in b/src/wconfig.h.in
index bac5072..cd90115 100644
--- a/src/wconfig.h.in
+++ b/src/wconfig.h.in
@@ -141,7 +141,7 @@
 #ifdef USER_MENU
 #define GLOBAL_USER_MENU_PATH PKGDATADIR/UserMenus
 #define DEF_USER_MENU_PATHS \
-~/GNUstep/Library/WindowMaker/UserMenus:GLOBAL_USER_MENU_PATH
+~/GNUstep/Defaults/UserMenus:GLOBAL_USER_MENU_PATH
 #endif
 
 /* icon path */
-- 
2.5.0


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.