mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 12:28:22 +01:00
Add a preference for XUrgencyHint bouncing
Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
This commit is contained in:
committed by
Carlos R. Mafra
parent
8f63bdafcd
commit
5b24997446
@@ -32,7 +32,7 @@ typedef struct _Panel {
|
|||||||
|
|
||||||
WMWidget *parent;
|
WMWidget *parent;
|
||||||
|
|
||||||
WMButton *swi[10];
|
WMButton *swi[11];
|
||||||
|
|
||||||
} _Panel;
|
} _Panel;
|
||||||
|
|
||||||
@@ -52,6 +52,7 @@ static void showData(_Panel * panel)
|
|||||||
WMSetButtonSelected(panel->swi[7], GetBoolForKey("SingleClickLaunch"));
|
WMSetButtonSelected(panel->swi[7], GetBoolForKey("SingleClickLaunch"));
|
||||||
WMSetButtonSelected(panel->swi[8], GetBoolForKey("CycleActiveHeadOnly"));
|
WMSetButtonSelected(panel->swi[8], GetBoolForKey("CycleActiveHeadOnly"));
|
||||||
WMSetButtonSelected(panel->swi[9], GetBoolForKey("ShowClipTitle"));
|
WMSetButtonSelected(panel->swi[9], GetBoolForKey("ShowClipTitle"));
|
||||||
|
WMSetButtonSelected(panel->swi[10], GetBoolForKey("BounceAppIconsWhenUrgent"));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void createPanel(Panel * p)
|
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[7], _("Launch applications and restore windows with a single click."));
|
||||||
WMSetButtonText(panel->swi[8], _("Cycle windows only on the active head."));
|
WMSetButtonText(panel->swi[8], _("Cycle windows only on the active head."));
|
||||||
WMSetButtonText(panel->swi[9], _("Show workspace title on Clip."));
|
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[6], True);
|
||||||
|
WMSetButtonEnabled(panel->swi[9], True);
|
||||||
|
WMSetButtonEnabled(panel->swi[10], True);
|
||||||
|
|
||||||
WMMapSubwidgets(panel->box);
|
WMMapSubwidgets(panel->box);
|
||||||
WMSetScrollViewContentView(sv, WMWidgetView(f));
|
WMSetScrollViewContentView(sv, WMWidgetView(f));
|
||||||
@@ -118,6 +123,7 @@ static void storeDefaults(_Panel * panel)
|
|||||||
SetBoolForKey(WMGetButtonSelected(panel->swi[7]), "SingleClickLaunch");
|
SetBoolForKey(WMGetButtonSelected(panel->swi[7]), "SingleClickLaunch");
|
||||||
SetBoolForKey(WMGetButtonSelected(panel->swi[8]), "CycleActiveHeadOnly");
|
SetBoolForKey(WMGetButtonSelected(panel->swi[8]), "CycleActiveHeadOnly");
|
||||||
SetBoolForKey(WMGetButtonSelected(panel->swi[9]), "ShowClipTitle");
|
SetBoolForKey(WMGetButtonSelected(panel->swi[9]), "ShowClipTitle");
|
||||||
|
SetBoolForKey(WMGetButtonSelected(panel->swi[10]), "BounceAppIconsWhenUrgent");
|
||||||
}
|
}
|
||||||
|
|
||||||
Panel *InitExpert(WMScreen * scr, WMWidget * parent)
|
Panel *InitExpert(WMScreen * scr, WMWidget * parent)
|
||||||
|
|||||||
@@ -409,6 +409,9 @@ typedef struct WPreferences {
|
|||||||
/* shading animation */
|
/* shading animation */
|
||||||
signed char shade_speed;
|
signed char shade_speed;
|
||||||
|
|
||||||
|
/* bouncing animation */
|
||||||
|
char bounce_appicons_when_urgent;
|
||||||
|
|
||||||
int edge_resistance;
|
int edge_resistance;
|
||||||
int resize_increment;
|
int resize_increment;
|
||||||
char attract;
|
char attract;
|
||||||
|
|||||||
@@ -380,6 +380,8 @@ WDefaultEntry optionList[] = {
|
|||||||
&wPreferences.icon_slide_speed, getEnum, NULL, NULL, NULL},
|
&wPreferences.icon_slide_speed, getEnum, NULL, NULL, NULL},
|
||||||
{"ShadeSpeed", "medium", seSpeeds,
|
{"ShadeSpeed", "medium", seSpeeds,
|
||||||
&wPreferences.shade_speed, getEnum, NULL, NULL, NULL},
|
&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,
|
{"DoubleClickTime", "250", (void *)&wPreferences.dblclick_time,
|
||||||
&wPreferences.dblclick_time, getInt, setDoubleClick, NULL, NULL},
|
&wPreferences.dblclick_time, getInt, setDoubleClick, NULL, NULL},
|
||||||
{"AlignSubmenus", "NO", NULL,
|
{"AlignSubmenus", "NO", NULL,
|
||||||
|
|||||||
@@ -432,7 +432,7 @@ static void doAppUrgentBounce(void *arg)
|
|||||||
WApplication *wapp = (WApplication *)arg;
|
WApplication *wapp = (WApplication *)arg;
|
||||||
|
|
||||||
if (appIsUrgent(wapp)) {
|
if (appIsUrgent(wapp)) {
|
||||||
wAppBounce(wapp);
|
if(wPreferences.bounce_appicons_when_urgent) wAppBounce(wapp);
|
||||||
} else {
|
} else {
|
||||||
WMDeleteTimerHandler(wapp->urgent_bounce_timer);
|
WMDeleteTimerHandler(wapp->urgent_bounce_timer);
|
||||||
wapp->urgent_bounce_timer = NULL;
|
wapp->urgent_bounce_timer = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user