Re: Compile problem

2015-06-23 Thread Carlos R. Mafra
On Sat, 20 Jun 2015 at 18:37:08 +0200, Christophe wrote:
 - Carlos R. Mafra crma...@gmail.com a écrit :
  On Sat, 20 Jun 2015 at 12:05:42 +0200, Christophe wrote:
   - Josip Deanovic djosip+n...@linuxpages.net a écrit :
   
Further more, one cannot read the list of prerequisites as the file
INSTALL-WMAKER gets built only after you already have some of them
met e.g. autoconf, automake, possibly more.
   
   Yes, that is a known limit of the procedure in place. Actually this
   file is more meant for people compiling from the official package,
   which do not have these problems. The goal is for people compiling from
   Git to find this information online on the Website, which is an ongoing
   task.
  
  Sorry, this makes no sense.
  
  The INSTALL-WMAKER file should be a plain text for people to read without
  any hassle. It should contain information to help people install
  wmaker. Its existence cannot depend on things that the file is meant to
  warn about in the first place.
  
  Can we get the file back like it was?
 
 It is not exactly like it was, if you see what I mean ;-)
 
 Please note that when you change the version number for the next
 release, 'make' will regenerate the file for you with updated version
 information that you will probably want to include in the same
 version-change commit...

Oh, no. Definitely no. I won't include the version change in the commit,
because this is not supposed to happen.

Now I get things like this:

[mafra@mac:wmaker.git]$ git checkout wmaker-0.95.6
error: Your local changes to the following files would be overwritten by 
checkout:
INSTALL-WMAKER
Please, commit your changes or stash them before you can switch branches.
Aborting
[mafra@mac:wmaker.git]$ git diff
diff --git a/INSTALL-WMAKER b/INSTALL-WMAKER
index 64e07e4..f16c131 100644
--- a/INSTALL-WMAKER
+++ b/INSTALL-WMAKER
@@ -32,7 +32,7 @@ Copyright (c) 2015 The Window Maker Team.
 along with this program, see file COPYING for details.
 
 
-  Published by The Window Maker team on 20 June 2015.
+  Published by The Window Maker team on 23 June 2015.


and this is just annoying.


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


[repo.or.cz] wmaker-crm.git branch next updated: wmaker-0.95.6-324-g443a08e

2015-06-23 Thread crmafra
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project wmaker-crm.git.

The branch, next has been updated
  discards  7efeca43e8b63fc42bafe18f94d4e011cb3bc3b9 (commit)
  discards  3c5533bec25a4f94c42ffaf7f77c27db6ddb7ac7 (commit)
  discards  71809a2011b126a984bbbe2ed230673c62a26eeb (commit)
   via  443a08ea1683adc3d6ea0811f44e85762033deb2 (commit)
   via  791fdd1eff1dea703e1160ad474ae294e4feb55b (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (7efeca43e8b63fc42bafe18f94d4e011cb3bc3b9)
\
 N -- N -- N (443a08ea1683adc3d6ea0811f44e85762033deb2)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
http://repo.or.cz/w/wmaker-crm.git/commit/443a08ea1683adc3d6ea0811f44e85762033deb2

commit 443a08ea1683adc3d6ea0811f44e85762033deb2
Author: Doug Torrance dtorra...@monmouthcollege.edu
Date:   Mon Jun 22 09:50:51 2015 -0500

wmaker: Allow configuration of window snapping detect distances.

This patch introduces two new configuration values, SnapEdgeDetect and
SnapCornerDetect, which users can set to change the distance from an edge
or corner at which window snapping will begin.  The defaults are 1 and 10,
respectively.

Suggested-by: Josip Deanovic djosip+n...@linuxpages.net

diff --git a/NEWS b/NEWS
index fb96dbb..d60603c 100644
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,11 @@ Note that if Switch workspaces while dragging windows is 
selected under
 ~/GNUstep/Defaults/WindowMaker, then you may only snap a window to the top or
 bottom of the screen.
 
+You may set the distance (in pixels) from the edge or corner of the screen at
+which a window will begin snapping using SnapEdgeDetect and 
SnapCornerDetect
+in ~/GNUstep/Defaults/WindowMaker.  (The defaults are 1 pixel and 10 pixels,
+respectively).
+
 
 Dragging maximized windows
 --
diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index 37e3fc0..99751ff 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -360,6 +360,8 @@ extern struct WPreferences {
char no_animations;/* enable/disable animations */
char no_autowrap;  /* wrap workspace when window is 
moved to the edge */
char window_snapping;  /* enable window snapping */
+   int snap_edge_detect;  /* how far from edge to begin snap */
+   int snap_corner_detect;/* how far from corner to begin snap 
*/
char drag_maximized_window;/* behavior when a maximized window 
is dragged */
 
char highlight_active_app; /* show the focused app by 
highlighting its icon */
diff --git a/src/defaults.c b/src/defaults.c
index c5a94c6..6f9edfd 100644
--- a/src/defaults.c
+++ b/src/defaults.c
@@ -474,6 +474,10 @@ WDefaultEntry optionList[] = {
wPreferences.no_autowrap, getBool, NULL, NULL, NULL},
{WindowSnapping, NO, NULL,
wPreferences.window_snapping, getBool, NULL, NULL, NULL},
+   {SnapEdgeDetect, 1, NULL,
+   wPreferences.snap_edge_detect, getInt, NULL, NULL, NULL},
+   {SnapCornerDetect, 10, NULL,
+   wPreferences.snap_corner_detect, getInt, NULL, NULL, NULL},
{DragMaximizedWindow, Move, seDragMaximizedWindow,
wPreferences.drag_maximized_window, getEnum, NULL, NULL, NULL},
{HighlightActiveApp, YES, NULL,
diff --git a/src/moveres.c b/src/moveres.c
index cded064..e8883c8 100644
--- a/src/moveres.c
+++ b/src/moveres.c
@@ -1240,23 +1240,28 @@ static void draw_snap_frame(WWindow *wwin, int 
direction)
 
 static int get_snap_direction(WScreen *scr, int x, int y)
 {
-   if (x  1) {
-   if (y  1)
-   return SNAP_TOPLEFT;
-   if (y  scr-scr_height - 2)
-   return SNAP_BOTTOMLEFT;
+   int edge, corner;
+
+   edge = wPreferences.snap_edge_detect;
+   corner = wPreferences.snap_corner_detect;
+
+   if (x  corner  y  corner)
+   return SNAP_TOPLEFT;
+   if (x  corner  y = scr-scr_height - corner)
+   return SNAP_BOTTOMLEFT;
+   if (x  edge)
return SNAP_LEFT;
-   }
-   if (x  scr-scr_width - 2) {
-   if (y  1)
-   return SNAP_TOPRIGHT;
-   if (y  scr-scr_height - 2)
-  

Re: Compile problem

2015-06-23 Thread Carlos R. Mafra
On Tue, 23 Jun 2015 at 15:55:06 +0100, Carlos R. Mafra wrote:
 On Sat, 20 Jun 2015 at 18:37:08 +0200, Christophe wrote:
  - Carlos R. Mafra crma...@gmail.com a écrit :
   On Sat, 20 Jun 2015 at 12:05:42 +0200, Christophe wrote:
- Josip Deanovic djosip+n...@linuxpages.net a écrit :

 Further more, one cannot read the list of prerequisites as the file
 INSTALL-WMAKER gets built only after you already have some of them
 met e.g. autoconf, automake, possibly more.

Yes, that is a known limit of the procedure in place. Actually this
file is more meant for people compiling from the official package,
which do not have these problems. The goal is for people compiling from
Git to find this information online on the Website, which is an ongoing
task.
   
   Sorry, this makes no sense.
   
   The INSTALL-WMAKER file should be a plain text for people to read without
   any hassle. It should contain information to help people install
   wmaker. Its existence cannot depend on things that the file is meant to
   warn about in the first place.
   
   Can we get the file back like it was?
  
  It is not exactly like it was, if you see what I mean ;-)
  
  Please note that when you change the version number for the next
  release, 'make' will regenerate the file for you with updated version
  information that you will probably want to include in the same
  version-change commit...
 
 Oh, no. Definitely no. I won't include the version change in the commit,
 because this is not supposed to happen.

I reverted the last patch so that this won't happen. Sorry for the noise
and making you do extra work with the last patch.


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


Re: Double-click on application in wmdock does not launch the application if one instance is already running

2015-06-23 Thread Josip Deanovic
On Monday 2015-06-22 21:55:55 Charles Philip Chan wrote:
 On 22 Jun 2015, djosip+n...@linuxpages.net wrote:
  Yes but if you select Shared application icon check box in the
  window attributes then the double click would start another instance
  of the application. This is how it worked up until and including
  0.95.3.
 
 Doesn't happen here. I use Shared application icon all the time and
 double clicking does not launch a new instant.

Sorry, my mistake.
Its No application icon option, not Shared application icon.
I have just retested it.

  Windowmaker up until and including 0.95.3 would allow subsequent
  double clicks on the docked appicon to start new instances of the
  application which was probably incorrect from the windowmaker design
  (look and feel) perspective but some people learned to use that
  feature.
 
 I have used Window Maker since the beginning and have never seen this.

I have tested it with 0.80.2, windowmaker-0.95.3 and windowmaker-0.95.4.

I have even used got bisect to find which patch changed the behavior.
So the behavior I am reporting does exist, I have just mistakenly referred
to Shared application icon instead of No application icon.

You can test it yourself if you are running 0.95.3 or older.


-- 
Josip Deanovic


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


Re: Double-click on application in wmdock does not launch the application if one instance is already running

2015-06-23 Thread BALATON Zoltan

On Tue, 23 Jun 2015, Josip Deanovic wrote:

Sorry, my mistake.
Its No application icon option, not Shared application icon.
I have just retested it.


Ah, ok, that makes sense. If an app is set to not have an app icon it 
cannot be attached to the dock so when you start it the instance will not 
have an app icon so the docked one is not linked to the running instance. 
Hence clicking on it again may start a new instance. This is kind of 
consistent even if quite unintuitive.



I have even used got bisect to find which patch changed the behavior.


Did you find the patch that changed it? Or is this behaviour still there?

Regards,
BALATON Zoltan


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


Re: Double-click on application in wmdock does not launch the application if one instance is already running

2015-06-23 Thread Josip Deanovic
On Tuesday 2015-06-23 10:57:24 BALATON Zoltan wrote:
 On Tue, 23 Jun 2015, Josip Deanovic wrote:
  Sorry, my mistake.
  Its No application icon option, not Shared application icon.
  I have just retested it.
 
 Ah, ok, that makes sense. If an app is set to not have an app icon it
 cannot be attached to the dock so when you start it the instance will
 not have an app icon so the docked one is not linked to the running
 instance. Hence clicking on it again may start a new instance. This is
 kind of consistent even if quite unintuitive.

I agree.

  I have even used got bisect to find which patch changed the behavior.
 
 Did you find the patch that changed it? Or is this behaviour still
 there?

Yes, check my message sent in this thread on 2014-06-14 00:06

I'll paste it here so that you don't have to look for it.

bc0700e016c67791d3e3eab855543d849f4ce786 is the first bad commit
commit bc0700e016c67791d3e3eab855543d849f4ce786
Author: Rodolfo García Peñas (kix) k...@kix.es
Date:   Mon Jun 18 11:15:19 2012 +0200

Create WAppIcon always

When the application is created, the WAppIcon now is created always,
but it is only painted if the flag is not set.

The icon initialization to NULL can be done now at 
app_icon_create_from_docks
because it is always called.

:04 04 7c58877ad5af211acaddac5288848c2ade7b04cb 
33d52affb385d22fbf04ebad3c628b714008785d M  src


-- 
Josip Deanovic


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


[PATCH 1/2] WPrefs: Add ability to set integer values in Expert panel

2015-06-23 Thread Doug Torrance
Previously, only boolean values could be changed using the Expert panel.
This patch adds the ability to change integer values.  A new class,
OPTION_WMAKER_INT, is added.  When this class is used, a textfield and two
buttons (up and down) appear instead of a checkbox.  Users can either type
the integer value or increment/decrement it using the arrows.
---
 WPrefs.app/Expert.c | 99 +
 1 file changed, 93 insertions(+), 6 deletions(-)

diff --git a/WPrefs.app/Expert.c b/WPrefs.app/Expert.c
index 6db1dfa..0c6ed7b 100644
--- a/WPrefs.app/Expert.c
+++ b/WPrefs.app/Expert.c
@@ -33,7 +33,8 @@ static const struct {
enum {
OPTION_WMAKER,
OPTION_WMAKER_ARRAY,
-   OPTION_USERDEF
+   OPTION_USERDEF,
+   OPTION_WMAKER_INT
} class;
 
const char *op_name;  /* The identifier for the option in the config 
file */
@@ -96,6 +97,7 @@ static const struct {
 };
 
 
+
 typedef struct _Panel {
WMBox *box;
char *sectionName;
@@ -108,10 +110,37 @@ typedef struct _Panel {
 
WMButton *swi[wlengthof_nocheck(expert_options)];
 
+   WMTextField *textfield[wlengthof_nocheck(expert_options)];
+
 } _Panel;
 
 #define ICON_FILE  expert
 
+static void changeIntTextfield(void *data, int delta)
+{
+   WMTextField *textfield;
+   char *text;
+   int value;
+
+   textfield = (WMTextField *)data;
+   text = WMGetTextFieldText(textfield);
+   value = atoi(text);
+   value += delta;
+   sprintf(text, %d, value);
+   WMSetTextFieldText(textfield, text);
+}
+
+static void downButtonCallback(WMWidget *self, void *data)
+{
+   (void) self;
+   changeIntTextfield(data, -1);
+}
+
+static void upButtonCallback(WMWidget *self, void *data)
+{
+   (void) self;
+   changeIntTextfield(data, 1);
+}
 
 static void createPanel(Panel *p)
 {
@@ -137,11 +166,13 @@ static void createPanel(Panel *p)
 
udb = WMGetStandardUserDefaults();
for (i = 0; i  wlengthof(expert_options); i++) {
-   panel-swi[i] = WMCreateSwitchButton(f);
-   WMResizeWidget(panel-swi[i], FRAME_WIDTH - 40, 25);
-   WMMoveWidget(panel-swi[i], 5, 5 + i * 25);
+   if (expert_options[i].class != OPTION_WMAKER_INT) {
+   panel-swi[i] = WMCreateSwitchButton(f);
+   WMResizeWidget(panel-swi[i], FRAME_WIDTH - 40, 25);
+   WMMoveWidget(panel-swi[i], 5, 5 + i * 25);
 
-   WMSetButtonText(panel-swi[i], _(expert_options[i].label));
+   WMSetButtonText(panel-swi[i], 
_(expert_options[i].label));
+   }
 
switch (expert_options[i].class) {
case OPTION_WMAKER:
@@ -163,6 +194,49 @@ static void createPanel(Panel *p)
state = WMGetUDBoolForKey(udb, 
expert_options[i].op_name);
break;
 
+   case OPTION_WMAKER_INT:
+   {
+   char tmp[10];
+   WMButton *up, *down;
+   WMLabel *label;
+
+   panel-textfield[i] = WMCreateTextField(f);
+   WMResizeWidget(panel-textfield[i], 41, 20);
+   WMMoveWidget(panel-textfield[i], 22, 7 + i * 25);
+
+   down = WMCreateCommandButton(f);
+   WMSetButtonImage(down, 
WMGetSystemPixmap(WMWidgetScreen(down), WSIArrowDown));
+   WMSetButtonAltImage(down,
+   
WMGetSystemPixmap(WMWidgetScreen(down), WSIHighlightedArrowDown));
+   WMSetButtonImagePosition(down, WIPImageOnly);
+   WMSetButtonAction(down, downButtonCallback, 
panel-textfield[i]);
+   WMResizeWidget(down, 16, 16);
+   WMMoveWidget(down, 5, 9 + i * 25);
+
+   up = WMCreateCommandButton(f);
+   WMSetButtonImage(up, 
WMGetSystemPixmap(WMWidgetScreen(up), WSIArrowUp));
+   WMSetButtonAltImage(up, 
WMGetSystemPixmap(WMWidgetScreen(up), WSIHighlightedArrowUp));
+   WMSetButtonImagePosition(up, WIPImageOnly);
+   WMSetButtonAction(up, upButtonCallback, 
panel-textfield[i]);
+   WMResizeWidget(up, 16, 16);
+   WMMoveWidget(up, 64, 9 + i * 25);
+
+   label = WMCreateLabel(f);
+   WMSetLabelText(label, _(expert_options[i].label));
+   WMResizeWidget(label, FRAME_WIDTH - 99, 25);
+   WMMoveWidget(label, 85, 5 + i * 25);
+
+   if (GetStringForKey(expert_options[i].op_name))
+   state = 
GetIntegerForKey(expert_options[i].op_name);
+   else
+   state 

[PATCH 2/2] WPrefs: Add snap edge and corner detect to Expert panel.

2015-06-23 Thread Doug Torrance
These are both integer values, and thus use the new OPTION_WMAKER_INT class.
We also update the text describing the window snapping feature for
clarification and consistency.
---
 NEWS| 10 ++
 WPrefs.app/Expert.c |  8 +++-
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/NEWS b/NEWS
index d60603c..36fb3f4 100644
--- a/NEWS
+++ b/NEWS
@@ -9,8 +9,9 @@ Window snapping
 
 You can now snap a window, i.e., maximize it to a side or corner of the
 screen, by dragging it to that side or corner.  It is enabled by setting
-WindowSnapping = YES in ~/GNUstep/Defaults/WindowMaker or selecting Enable
-window snapping under Expert User Preferences in WPrefs.app.
+WindowSnapping = YES in ~/GNUstep/Defaults/WindowMaker or selecting Maximize
+(snap) a window to edge or corner by dragging. under Expert User Preferences
+in WPrefs.app.
 
 Note that if Switch workspaces while dragging windows is selected under
 Workspace Preferences in WPrefs.app, or if DontLinkWorkspaces = NO in
@@ -19,8 +20,9 @@ bottom of the screen.
 
 You may set the distance (in pixels) from the edge or corner of the screen at
 which a window will begin snapping using SnapEdgeDetect and 
SnapCornerDetect
-in ~/GNUstep/Defaults/WindowMaker.  (The defaults are 1 pixel and 10 pixels,
-respectively).
+in ~/GNUstep/Defaults/WindowMaker or setting Distance from edge/corner to 
begin
+window snap. under Expert User Preferences in WPrefs.app.  (The defaults are
+1 pixel and 10 pixels, respectively).
 
 
 Dragging maximized windows
diff --git a/WPrefs.app/Expert.c b/WPrefs.app/Expert.c
index 0c6ed7b..616f9ec 100644
--- a/WPrefs.app/Expert.c
+++ b/WPrefs.app/Expert.c
@@ -88,9 +88,15 @@ static const struct {
  /* default: */ False, OPTION_WMAKER, KbdModeLock },
 #endif /* XKB_MODELOCK */
 
-   { N_(Maximize a window to side or corner by dragging.),
+   { N_(Maximize (snap) a window to edge or corner by dragging.),
  /* default: */ False, OPTION_WMAKER, WindowSnapping },
 
+   { N_(Distance from edge to begin window snap.),
+ /* default: */ 1, OPTION_WMAKER_INT, SnapEdgeDetect },
+
+   { N_(Distance from corner to begin window snap.),
+ /* default: */ 10, OPTION_WMAKER_INT, SnapCornerDetect },
+
{ N_(Open dialogs in the same workspace as their owners.),
  /* default: */ False, OPTION_WMAKER, OpenTransientOnOwnerWorkspace }
 
-- 
2.1.4


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