Signed-off-by: Brad Jorsch <[email protected]>
---
 WPrefs.app/Expert.c |    8 +++++++-
 src/WindowMaker.h   |    3 +++
 src/defaults.c      |    2 ++
 src/superfluous.c   |    2 +-
 4 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/WPrefs.app/Expert.c b/WPrefs.app/Expert.c
index fd0c700..263af90 100644
--- a/WPrefs.app/Expert.c
+++ b/WPrefs.app/Expert.c
@@ -32,7 +32,7 @@ typedef struct _Panel {
 
        WMWidget *parent;
 
-       WMButton *swi[10];
+       WMButton *swi[11];
 
 } _Panel;
 
@@ -52,6 +52,7 @@ static void showData(_Panel * panel)
        WMSetButtonSelected(panel->swi[7], GetBoolForKey("SingleClickLaunch"));
        WMSetButtonSelected(panel->swi[8], 
GetBoolForKey("CycleActiveHeadOnly"));
        WMSetButtonSelected(panel->swi[9], GetBoolForKey("ShowClipTitle"));
+       WMSetButtonSelected(panel->swi[10], 
GetBoolForKey("BounceAppIconsWhenUrgent"));
 }
 
 static void createPanel(Panel * p)
@@ -92,8 +93,12 @@ static void createPanel(Panel * p)
        WMSetButtonText(panel->swi[7], _("Launch applications and restore 
windows with a single click."));
        WMSetButtonText(panel->swi[8], _("Cycle windows only on the active 
head."));
        WMSetButtonText(panel->swi[9], _("Show workspace title on Clip."));
+       WMSetButtonText(panel->swi[10], _("Bounce AppIcons when the application 
wants attention."));
 
+        /* If the item is default true, enable the button here */
        WMSetButtonEnabled(panel->swi[6], True);
+       WMSetButtonEnabled(panel->swi[9], True);
+       WMSetButtonEnabled(panel->swi[10], True);
 
        WMMapSubwidgets(panel->box);
        WMSetScrollViewContentView(sv, WMWidgetView(f));
@@ -118,6 +123,7 @@ static void storeDefaults(_Panel * panel)
        SetBoolForKey(WMGetButtonSelected(panel->swi[7]), "SingleClickLaunch");
        SetBoolForKey(WMGetButtonSelected(panel->swi[8]), 
"CycleActiveHeadOnly");
        SetBoolForKey(WMGetButtonSelected(panel->swi[9]), "ShowClipTitle");
+       SetBoolForKey(WMGetButtonSelected(panel->swi[10]), 
"BounceAppIconsWhenUrgent");
 }
 
 Panel *InitExpert(WMScreen * scr, WMWidget * parent)
diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index 37f5557..9aaacb5 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -409,6 +409,9 @@ typedef struct WPreferences {
     /* shading animation */
     signed char shade_speed;
 
+    /* bouncing animation */
+    char bounce_appicons_when_urgent;
+
     int edge_resistance;
     int resize_increment;
     char attract;
diff --git a/src/defaults.c b/src/defaults.c
index 6e002bd..9183382 100644
--- a/src/defaults.c
+++ b/src/defaults.c
@@ -380,6 +380,8 @@ WDefaultEntry optionList[] = {
            &wPreferences.icon_slide_speed, getEnum, NULL, NULL, NULL},
        {"ShadeSpeed", "medium", seSpeeds,
            &wPreferences.shade_speed, getEnum, NULL, NULL, NULL},
+       {"BounceAppIconsWhenUrgent", "YES", NULL,
+           &wPreferences.bounce_appicons_when_urgent, 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 be809c3..6271851 100644
--- a/src/superfluous.c
+++ b/src/superfluous.c
@@ -432,7 +432,7 @@ static void doAppUrgentBounce(void *arg)
        WApplication *wapp = (WApplication *)arg;
 
        if (appIsUrgent(wapp)) {
-               wAppBounce(wapp);
+               if(wPreferences.bounce_appicons_when_urgent) wAppBounce(wapp);
        } else {
                WMDeleteTimerHandler(wapp->urgent_bounce_timer);
                wapp->urgent_bounce_timer = NULL;
-- 
1.7.1


-- 
To unsubscribe, send mail to [email protected].

Reply via email to