A call to distros

2012-02-21 Thread Carlos R. Mafra
On Tue, 21 Feb 2012 at 11:27:46 +0100, BALATON Zoltan wrote:
 This could be as simple as having some dockapps packaged and installed
 via Suggests and having a menu from where they can be started and if
 the user likes them they can dock them. This allows customisation and
 avoids the one size fits all problem. 

There's no solution to one size fits all.

What I'm saying is that distros should spend a bit more time thinking
about turning the default wmaker workspace more useful by default.
They should choose a set of dockapps which get the job done the first
time a user logs in. Just giving them a xterm is simply not inviting.

The user might prefer another dockapp, but he/she will be able to
change that later, once he/she is convinced that using wmaker
is cool. But having preferences is a _completely_ different problem. 

 (This menu and the way to use the dock and clip could be hinted in an
 info panel to make it easier for new users.)

Having stuff in the info panel means C code inside src/, and I oppose
to that.

One possible solution that distros could find is to have a firefox
icon in the dock that once clicked opens up a local 
Welcome to Window Maker screen with some interesting information.
Or something along these lines.

I've seen a startup screen in KDE the last time I installed it.
It was not a firefox thing, but we are not going to write a program
like they did to do this :-)

What I'm saying is that for all these years distros simply put a
Window Maker rpm in the repository and *run away*. Natural selection
selected the few of us who are here on wmaker-dev today.

Window Maker is not a desktop enviroment. But it also does not
turn using a computer a less efficient task - quite the contrary.
But if you don't have some key dockapps to do the simple stuff,
using WMaker _will_ be a pain.

Let's see. Does a default install of KDE offer you a lonely konsole
in the desktop and say hey, if you really want to connect to the
internet or mount your usb stick just install this package by typing
these commands. Then open your konsole and run those programs you
installed. No, they don't do that. Why? Because 99,99% of people
would do that anyway, so they do it for them.

But a distro Window Maker does not have even the information screen!

If the wmaker people inside distros even tried to address this
issue, that would be progress.


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


Patch to toggle AppIcons bouncing

2012-02-21 Thread Just a Normal Person
Hi, I have noticed that in WindowMaker 0.95.2 application icons bounce
when some actions are done, like starting a program, etc.
Disabling Superfluous or Animations also disabled the minimizing
animation which I am used to, so doing that didn't do the job.
Everyone has got his or her own tastes, but I did not like the new
behavior and didn't find any way to disable it without affecting other
things.
So I made a patch to fix just that. It is below.
It adds a new option in WPrefs.app's Expert Tab called Do not make
AppIcons bounce which when enabled,
disables any type of bouncing for Application Icons, restoring the old behavior.
Bouncing stays the new default behavior.

*** CUT HERE ***

diff --git a/WPrefs.app/Expert.c b/WPrefs.app/Expert.c
index e86480d..04b1648 100644
--- a/WPrefs.app/Expert.c
+++ b/WPrefs.app/Expert.c
@@ -31,7 +31,7 @@ typedef struct _Panel {

WMWidget *parent;

-   WMButton *swi[13];
+   WMButton *swi[14];

 } _Panel;

@@ -54,6 +54,7 @@ static void showData(_Panel * panel)
WMSetButtonSelected(panel-swi[10],
GetBoolForKey(BounceAppIconsWhenUrgent));
WMSetButtonSelected(panel-swi[11],
GetBoolForKey(RaiseAppIconsWhenBouncing));
WMSetButtonSelected(panel-swi[12],
GetBoolForKey(OpaqueMoveResizeKeyboard));
+   WMSetButtonSelected(panel-swi[13], 
GetBoolForKey(DoNotMakeAppIconsBounce));
 }

 static void createPanel(Panel * p)
@@ -97,6 +98,7 @@ static void createPanel(Panel * p)
WMSetButtonText(panel-swi[10], _(Bounce AppIcons when the
application wants attention.));
WMSetButtonText(panel-swi[11], _(Raise AppIcons when bouncing.));
WMSetButtonText(panel-swi[12], _(Opaque Move,Resize with keyboard.));
+   WMSetButtonText(panel-swi[13], _(Do not make AppIcons bounce.));

/* If the item is default true, enable the button here */
WMSetButtonEnabled(panel-swi[6], True);
@@ -129,6 +131,7 @@ static void storeDefaults(_Panel * panel)
SetBoolForKey(WMGetButtonSelected(panel-swi[10]),
BounceAppIconsWhenUrgent);
SetBoolForKey(WMGetButtonSelected(panel-swi[11]),
RaiseAppIconsWhenBouncing);
SetBoolForKey(WMGetButtonSelected(panel-swi[12]),
OpaqueMoveResizeKeyboard);
+   SetBoolForKey(WMGetButtonSelected(panel-swi[13]), 
DoNotMakeAppIconsBounce);
 }

 Panel *InitExpert(WMScreen * scr, WMWidget * parent)
diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index c0560a7..9153496 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -411,6 +411,7 @@ typedef struct WPreferences {
 /* bouncing animation */
 char bounce_appicons_when_urgent;
 char raise_appicons_when_bouncing;
+char do_not_make_appicons_bounce;

 int edge_resistance;
 int resize_increment;
diff --git a/src/defaults.c b/src/defaults.c
index b5ea8e2..cad53b0 100644
--- a/src/defaults.c
+++ b/src/defaults.c
@@ -387,6 +387,8 @@ WDefaultEntry optionList[] = {
wPreferences.bounce_appicons_when_urgent, getBool, NULL, NULL, 
NULL},
{RaiseAppIconsWhenBouncing, NO, NULL,
wPreferences.raise_appicons_when_bouncing, getBool, NULL, NULL, 
NULL},
+   {DoNotMakeAppIconsBounce, NO, NULL,
+   wPreferences.do_not_make_appicons_bounce, getBool, NULL, NULL, 
NULL},
{DoubleClickTime, 250, (void *)wPreferences.dblclick_time,
wPreferences.dblclick_time, getInt, setDoubleClick, NULL, NULL},
{AlignSubmenus, NO, NULL,
diff --git a/src/superfluous.c b/src/superfluous.c
index 50b60fe..78679ae 100644
--- a/src/superfluous.c
+++ b/src/superfluous.c
@@ -394,7 +394,8 @@ static int bounceDirection(WAppIcon *aicon)

 void wAppBounce(WApplication *wapp)
 {
-   if (!wPreferences.no_animations  wapp-app_icon  
!wapp-flags.bouncing) {
+   if (!wPreferences.no_animations  wapp-app_icon  
!wapp-flags.bouncing
+!wPreferences.do_not_make_appicons_bounce) {
++wapp-refcount;
wapp-flags.bouncing = 1;

*** CUT HERE ***

Commit message: Enable toggling of AppIcons bouncing

Regards!
Giuseppe Gatta


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


Help with patch about icons

2012-02-21 Thread Rodolfo García Peñas
Hi,

I am writing a patch to do the following.

- The WApplication structure has a WWindow struct.
- The WWindow struct has aa RImage struct (net_icon_image)
- The WApplication structure has a WAppIcon struct.
- The WAppIcon struct has WIcon struct.
- The WIcon struct has a RImage struct (file_image).

Why need two different images in the same struct?

Ok, I have a problem with this situation, because one wine application show the 
correct icon in the appicon, but shows a different (the default) icon when I 
hit Alt+Tab (cycling). This is because net_icon_image is used in switchpanel.c, 
when the panel is created. And the appicon.c uses the file_image.

Then, I try to remove net_icon_image. Is not difficult, because is used in a 
few files. But I have problems.

I wrote two patches, the first can be applied without problems, because are 
comments and one memset remove (is not needed IMO).

The second patch is more insteresting. It removes the net_icon_image. The 
problem... the correct image is not showed :-?
And I don't know why. I check the pointers, and all is correct. The image 
variable is poiting to the correct file_image variable.

Help?

Thanks a lot.
kix


From 693b3ad7ea4e0dfe44c08bc2891c54ae58171c4a Mon Sep 17 00:00:00 2001
From: Rodolfo García Peñas (kix) k...@kix.es
Date: Mon, 20 Feb 2012 01:44:37 +0100
Subject: [PATCH 1/2] WindowMaker: Add comments to switchpanel init

Some comments are added to the switchpanel initialization function.
memset to zero is removed because is done in wmalloc.
---
 src/switchpanel.c |   32 +---
 1 files changed, 21 insertions(+), 11 deletions(-)

diff --git a/src/switchpanel.c b/src/switchpanel.c
index aac3a22..27e9d21 100644
--- a/src/switchpanel.c
+++ b/src/switchpanel.c
@@ -421,10 +421,11 @@ static WMArray *makeWindowListArray(WWindow *curwin, int 
include_unmapped, Bool
return windows;
 }
 
+/* SwitchPanel creation */
 WSwitchPanel *wInitSwitchPanel(WScreen * scr, WWindow * curwin, Bool 
class_only)
 {
WWindow *wwin;
-   WSwitchPanel *panel = wmalloc(sizeof(WSwitchPanel));
+   WSwitchPanel *panel;
WMFrame *viewport;
int i;
int width, height;
@@ -433,22 +434,24 @@ WSwitchPanel *wInitSwitchPanel(WScreen * scr, WWindow * 
curwin, Bool class_only)
WMRect rect;
rect = wGetRectForHead(scr, wGetHeadForPointerLocation(scr));
 
-   memset(panel, 0, sizeof(WSwitchPanel));
-
+   /* SwitchPanel creation */
+   panel = wmalloc(sizeof(WSwitchPanel));
panel-scr = scr;
-
panel-windows = makeWindowListArray(curwin, wPreferences.swtileImage 
!= NULL, class_only);
-   count = WMGetArrayItemCount(panel-windows);
 
+   /* Count the number of items, if is zero, returns without switchpanel */
+   count = WMGetArrayItemCount(panel-windows);
if (count == 0) {
WMFreeArray(panel-windows);
wfree(panel);
return NULL;
}
 
+   /* Set the width of the panel, usint the number of items */
width = ICON_TILE_SIZE * count;
iconsThatFitCount = count;
 
+   /* If the item size is  switchpanel width, resize */
if (width  rect.size.width) {
iconsThatFitCount = (rect.size.width - SCREEN_BORDER_SPACING) / 
ICON_TILE_SIZE;
width = iconsThatFitCount * ICON_TILE_SIZE;
@@ -456,16 +459,23 @@ WSwitchPanel *wInitSwitchPanel(WScreen * scr, WWindow * 
curwin, Bool class_only)
 
panel-visibleCount = iconsThatFitCount;
 
+   /* If not swtileImage, don't load images. The work is done */
if (!wPreferences.swtileImage)
return panel;
 
+   /* SwitchPanel heigth */
height = LABEL_HEIGHT + ICON_TILE_SIZE;
 
+   /* Create the tileTmp and getTile from sPreferences.swtileImage */
panel-tileTmp = RCreateImage(ICON_TILE_SIZE, ICON_TILE_SIZE, 1);
panel-tile = getTile();
-   if (panel-tile  wPreferences.swbackImage[8]) {
+
+   /* panel-tile must exists, because we check wPreferences.swtileImage
+* before and getTile returns it in the worst case */
+   if (panel-tile  wPreferences.swbackImage[8])
panel-bg = createBackImage(width + 2 * BORDER_SPACE, height + 
2 * BORDER_SPACE);
-   }
+
+   /* If tile or tileTmp don't exists, clean */
if (!panel-tileTmp || !panel-tile) {
if (panel-bg)
RReleaseImage(panel-bg);
@@ -478,11 +488,11 @@ WSwitchPanel *wInitSwitchPanel(WScreen * scr, WWindow * 
curwin, Bool class_only)
panel-tileTmp = NULL;
}
 
+   /* Fill the structure */
panel-white = WMWhiteColor(scr-wmscreen);
panel-font = WMBoldSystemFontOfSize(scr-wmscreen, 12);
panel-icons = WMCreateArray(count);
panel-images = WMCreateArray(count);
-
panel-win = WMCreateWindow(scr-wmscreen, );
 
if (!panel-bg) {
@@ -515,6 +525,7 @@ WSwitchPanel 

Re: Launch WPrefs by default via the primary dock button (was: Defaul dockapps on distros)

2012-02-21 Thread Carlos R. Mafra
On Tue, 21 Feb 2012 at  0:23:41 +, SJS wrote:
 
 The problem statement, as I understand it, is that there's not enough cool
 stuff readily accessible on a default installation from a major distribution
 to get the attention of the ADD crowd.

It's not cool stuff. I worry about two things only. Mounting external
media and connecting to a wireless network. And I see a lot of people
spreading wrong information about this, that if you use wmaker you
have to give up the confort of an easy way to do that.

That's why I wrote the advertisement on www.windowmaker.org/docs.php

And the only reason I care about this is because I think it might
help attracting a few new users.

But hey, it seems difficult to convince others about this. And
that's not something that I can solve myself. So I'll stop now.


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


Re: Launch WPrefs by default via the primary dock button

2012-02-21 Thread John H. Robinson, IV
Carlos R. Mafra wrote:
 
 The text is not even accurate, Window Maker is not part of the GNUstep
 project, afaik.

Not really, but Window Maker is the window manager of choice for
GNUstep. There is a lot of symbiosis between the two.

-john


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


Re: Launch WPrefs by default via the primary dock button

2012-02-21 Thread Martin Dietze
On Tue, February 21, 2012, John H. Robinson, IV wrote:

 Not really, but Window Maker is the window manager of choice for
 GNUstep. There is a lot of symbiosis between the two.

Would not call it symbiosis since one works perfectly well
without the other, also WM is not based on *Step code.

Cheers,

M'bert

-- 
--- / http://herbert.the-little-red-haired-girl.org / -
=+= 
Warum geht ein Bratscher nicht �ber einen Friedhof?
Zu viele Kreuze...


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