1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 20:38:08 +01:00

Enable toggling of AppIcons bouncing

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 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.
This commit is contained in:
Giuseppe Gatta
2012-02-23 11:52:11 +01:00
committed by Carlos R. Mafra
parent e46f2b3e79
commit a97699c513
4 changed files with 9 additions and 2 deletions

View File

@@ -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)

View File

@@ -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;

View File

@@ -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,

View File

@@ -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;