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
via faa74a14b1f01a343bf3f183e2515dcff2ecc006 (commit)
via c7e3666e62e738dc72561d482f05ea980cf8d7ab (commit)
from df601267e640ce7eb171f2ce5044915a3cc358b2 (commit)
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/faa74a14b1f01a343bf3f183e2515dcff2ecc006
commit faa74a14b1f01a343bf3f183e2515dcff2ecc006
Author: BALATON Zoltan <[email protected]>
Date: Fri Nov 16 22:07:47 2012 +0100
WPrefs: Fixed handling of options which default to true
Two problems caused Boolean options which default to true to be shown
incorrectly when the option was not already present in the defaults
database.
First a typo (Enabled instead of Selected) caused the switch button to stay
off then because GetBoolForKey key returns False also when the option
is not set it would have been turned off while it should stay on to
reflect the default value of the option.
diff --git a/WPrefs.app/Expert.c b/WPrefs.app/Expert.c
index 177bbd8..ee8d625 100644
--- a/WPrefs.app/Expert.c
+++ b/WPrefs.app/Expert.c
@@ -53,10 +53,13 @@ static void showData(_Panel * panel)
WMSetButtonSelected(panel->swi[3], GetBoolForKey("UseSaveUnders"));
WMSetButtonSelected(panel->swi[4], GetBoolForKey("DontConfirmKill"));
WMSetButtonSelected(panel->swi[5], GetBoolForKey("DisableBlinking"));
- WMSetButtonSelected(panel->swi[6], GetBoolForKey("AntialiasedText"));
+ if (GetStringForKey("AntialiasedText"))
+ WMSetButtonSelected(panel->swi[6],
GetBoolForKey("AntialiasedText"));
WMSetButtonSelected(panel->swi[7],
GetBoolForKey("CycleActiveHeadOnly"));
- WMSetButtonSelected(panel->swi[8], GetBoolForKey("ShowClipTitle"));
- WMSetButtonSelected(panel->swi[9], GetBoolForKey("HighlightActiveApp"));
+ if (GetStringForKey("ShowClipTitle"))
+ WMSetButtonSelected(panel->swi[8],
GetBoolForKey("ShowClipTitle"));
+ if (GetStringForKey("HighlightActiveApp"))
+ WMSetButtonSelected(panel->swi[9],
GetBoolForKey("HighlightActiveApp"));
#ifdef XKB_MODELOCK
WMSetButtonSelected(panel->swi[10], GetBoolForKey("KbdModeLock"));
#endif /* XKB_MODELOCK */
@@ -104,10 +107,10 @@ static void createPanel(Panel * p)
WMSetButtonText(panel->swi[10], _("Enable keyboard language switch
button in window titlebars."));
#endif /* XKB_MODELOCK */
- /* If the item is default true, enable the button here */
- WMSetButtonEnabled(panel->swi[6], True);
- WMSetButtonEnabled(panel->swi[8], True);
- WMSetButtonEnabled(panel->swi[9], True);
+ /* If the item is default true, switch it on here */
+ WMSetButtonSelected(panel->swi[6], True);
+ WMSetButtonSelected(panel->swi[8], True);
+ WMSetButtonSelected(panel->swi[9], True);
WMMapSubwidgets(panel->box);
WMSetScrollViewContentView(sv, WMWidgetView(f));
diff --git a/WPrefs.app/Preferences.c b/WPrefs.app/Preferences.c
index 8c0ef2c..9399023 100644
--- a/WPrefs.app/Preferences.c
+++ b/WPrefs.app/Preferences.c
@@ -127,7 +127,8 @@ static void showData(_Panel * panel)
}
WMSetButtonSelected(panel->bounceB,
GetBoolForKey("DoNotMakeAppIconsBounce"));
- WMSetButtonSelected(panel->bounceUrgB,
GetBoolForKey("BounceAppIconsWhenUrgent"));
+ if (GetStringForKey("BounceAppIconsWhenUrgent"))
+ WMSetButtonSelected(panel->bounceUrgB,
GetBoolForKey("BounceAppIconsWhenUrgent"));
WMSetButtonSelected(panel->bounceRaisB,
GetBoolForKey("RaiseAppIconsWhenBouncing"));
WMSetButtonSelected(panel->ballB[0],
GetBoolForKey("WindowTitleBalloons"));
@@ -278,7 +279,7 @@ static void createPanel(Panel * p)
WMResizeWidget(panel->bounceUrgB, 210, 30);
WMMoveWidget(panel->bounceUrgB, 15, 39);
WMSetButtonText(panel->bounceUrgB, _("Bounce AppIcon when the
application wants attention."));
- WMSetButtonEnabled(panel->bounceUrgB, True); /* defaults to true */
+ WMSetButtonSelected(panel->bounceUrgB, True); /* defaults to true */
panel->bounceRaisB = WMCreateSwitchButton(panel->optF);
WMResizeWidget(panel->bounceRaisB, 210, 25);
http://repo.or.cz/w/wmaker-crm.git/commit/c7e3666e62e738dc72561d482f05ea980cf8d7ab
commit c7e3666e62e738dc72561d482f05ea980cf8d7ab
Author: BALATON Zoltan <[email protected]>
Date: Fri Nov 16 21:53:57 2012 +0100
Made highlighting the AppIcon of the active app configurable at run time
diff --git a/WPrefs.app/Expert.c b/WPrefs.app/Expert.c
index f897384..177bbd8 100644
--- a/WPrefs.app/Expert.c
+++ b/WPrefs.app/Expert.c
@@ -22,9 +22,9 @@
#include "WPrefs.h"
#ifdef XKB_MODELOCK
-#define NUMITEMS 10
+#define NUMITEMS 11
#else
-#define NUMITEMS 9
+#define NUMITEMS 10
#endif
typedef struct _Panel {
@@ -56,8 +56,9 @@ static void showData(_Panel * panel)
WMSetButtonSelected(panel->swi[6], GetBoolForKey("AntialiasedText"));
WMSetButtonSelected(panel->swi[7],
GetBoolForKey("CycleActiveHeadOnly"));
WMSetButtonSelected(panel->swi[8], GetBoolForKey("ShowClipTitle"));
+ WMSetButtonSelected(panel->swi[9], GetBoolForKey("HighlightActiveApp"));
#ifdef XKB_MODELOCK
- WMSetButtonSelected(panel->swi[9], GetBoolForKey("KbdModeLock"));
+ WMSetButtonSelected(panel->swi[10], GetBoolForKey("KbdModeLock"));
#endif /* XKB_MODELOCK */
}
@@ -98,13 +99,15 @@ static void createPanel(Panel * p)
WMSetButtonText(panel->swi[6], _("Smooth font edges (needs restart)."));
WMSetButtonText(panel->swi[7], _("Cycle windows only on the active
head."));
WMSetButtonText(panel->swi[8], _("Show workspace title on Clip."));
+ WMSetButtonText(panel->swi[9], _("Highlight the icon of the application
when it has the focus."));
#ifdef XKB_MODELOCK
- WMSetButtonText(panel->swi[9], _("Enable keyboard language switch
button in window titlebars."));
+ WMSetButtonText(panel->swi[10], _("Enable keyboard language switch
button in window titlebars."));
#endif /* XKB_MODELOCK */
/* If the item is default true, enable the button here */
WMSetButtonEnabled(panel->swi[6], True);
WMSetButtonEnabled(panel->swi[8], True);
+ WMSetButtonEnabled(panel->swi[9], True);
WMMapSubwidgets(panel->box);
WMSetScrollViewContentView(sv, WMWidgetView(f));
@@ -128,8 +131,9 @@ static void storeDefaults(_Panel * panel)
SetBoolForKey(WMGetButtonSelected(panel->swi[6]), "AntialiasedText");
SetBoolForKey(WMGetButtonSelected(panel->swi[7]),
"CycleActiveHeadOnly");
SetBoolForKey(WMGetButtonSelected(panel->swi[8]), "ShowClipTitle");
+ SetBoolForKey(WMGetButtonSelected(panel->swi[9]), "HighlightActiveApp");
#ifdef XKB_MODELOCK
- SetBoolForKey(WMGetButtonSelected(panel->swi[9]), "KbdModeLock");
+ SetBoolForKey(WMGetButtonSelected(panel->swi[10]), "KbdModeLock");
#endif /* XKB_MODELOCK */
}
diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index 804695b..ca89299 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -351,12 +351,12 @@ typedef struct WPreferences {
#endif
char no_dithering; /* use dithering or not */
char no_animations; /* enable/disable animations */
- char no_autowrap; /* wrap workspace when window is moved
- * to the edge */
+ char no_autowrap; /* wrap workspace when window is moved
to the edge */
+ char highlight_active_app; /* show the focused app by highlighting
its icon */
char auto_arrange_icons; /* automagically arrange icons */
char icon_box_position; /* position to place icons */
- signed char iconification_style; /* position to place icons */
+ signed char iconification_style; /* position to place icons */
char disable_root_mouse; /* disable button events in root window
*/
char auto_focus; /* focus window when it's mapped */
char *icon_back_file; /* background image for icons */
diff --git a/src/actions.c b/src/actions.c
index 7dceaff..a79de8a 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -136,7 +136,8 @@ void wSetFocusTo(WScreen *scr, WWindow *wwin)
if (oapp) {
wAppMenuUnmap(oapp->menu);
- wApplicationDeactivate(oapp);
+ if (wPreferences.highlight_active_app)
+ wApplicationDeactivate(oapp);
}
WMPostNotificationName(WMNChangedFocus, NULL, (void *)True);
@@ -199,7 +200,8 @@ void wSetFocusTo(WScreen *scr, WWindow *wwin)
if (oapp && oapp != napp) {
wAppMenuUnmap(oapp->menu);
- wApplicationDeactivate(oapp);
+ if (wPreferences.highlight_active_app)
+ wApplicationDeactivate(oapp);
}
}
@@ -213,7 +215,7 @@ void wSetFocusTo(WScreen *scr, WWindow *wwin)
if (wwin->flags.mapped)
wAppMenuMap(napp->menu, wwin);
}
- if (napp)
+ if (napp && wPreferences.highlight_active_app)
wApplicationActivate(napp);
XFlush(dpy);
diff --git a/src/appicon.c b/src/appicon.c
index ac0c4ba..7b59792 100644
--- a/src/appicon.c
+++ b/src/appicon.c
@@ -243,6 +243,8 @@ void removeAppIconFor(WApplication *wapp)
if (!wapp->app_icon)
return;
+ if (wPreferences.highlight_active_app)
+ wIconSetHighlited(wapp->app_icon->icon, False);
if (wapp->app_icon->docked && !wapp->app_icon->attracted) {
wapp->app_icon->running = 0;
/* since we keep it, we don't care if it was attracted or not */
diff --git a/src/application.c b/src/application.c
index 7c52fa0..b52a35f 100644
--- a/src/application.c
+++ b/src/application.c
@@ -194,7 +194,6 @@ void wApplicationDestroy(WApplication * wapp)
XDeleteContext(dpy, wapp->main_window, wAppWinContext);
wAppMenuDestroy(wapp->menu);
- wApplicationDeactivate(wapp);
/* Remove application icon */
removeAppIconFor(wapp);
@@ -212,20 +211,16 @@ void wApplicationDestroy(WApplication * wapp)
void wApplicationActivate(WApplication *wapp)
{
-#ifdef NEWAPPICON
if (wapp->app_icon) {
wIconSetHighlited(wapp->app_icon->icon, True);
wAppIconPaint(wapp->app_icon);
}
-#endif
}
void wApplicationDeactivate(WApplication *wapp)
{
-#ifdef NEWAPPICON
if (wapp->app_icon) {
wIconSetHighlited(wapp->app_icon->icon, False);
wAppIconPaint(wapp->app_icon);
}
-#endif
}
diff --git a/src/defaults.c b/src/defaults.c
index 5e48d12..e8c33e0 100644
--- a/src/defaults.c
+++ b/src/defaults.c
@@ -416,6 +416,8 @@ WDefaultEntry optionList[] = {
&wPreferences.no_animations, getBool, NULL, NULL, NULL},
{"DontLinkWorkspaces", "NO", NULL,
&wPreferences.no_autowrap, getBool, NULL, NULL, NULL},
+ {"HighlightActiveApp", "YES", NULL,
+ &wPreferences.highlight_active_app, getBool, NULL, NULL, NULL},
{"AutoArrangeIcons", "NO", NULL,
&wPreferences.auto_arrange_icons, getBool, NULL, NULL, NULL},
{"NoWindowOverDock", "NO", NULL,
diff --git a/src/icon.c b/src/icon.c
index 6a0e817..843cb73 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -554,7 +554,6 @@ static void cycleColor(void *data)
icon->handlerID = WMAddTimerHandler(COLOR_CYCLE_DELAY, cycleColor,
icon);
}
-#ifdef NEWAPPICON
void wIconSetHighlited(WIcon *icon, Bool flag)
{
if (icon->highlighted == flag)
@@ -563,7 +562,6 @@ void wIconSetHighlited(WIcon *icon, Bool flag)
icon->highlighted = flag;
update_icon_pixmap(icon);
}
-#endif
void wIconSelect(WIcon * icon)
{
diff --git a/src/icon.h b/src/icon.h
index dfa30bc..5c83733 100644
--- a/src/icon.h
+++ b/src/icon.h
@@ -70,7 +70,6 @@ RImage *wIconValidateIconSize(RImage *icon, int max_size);
char *wIconStore(WIcon *icon);
char *get_name_for_instance_class(char *wm_instance, char *wm_class);
-#ifdef NEWAPPICON
void wIconSetHighlited(WIcon *icon, Bool flag);
-#endif /* NEWAPPICON */
+
#endif /* WMICON_H_ */
diff --git a/src/wconfig.h.in b/src/wconfig.h.in
index baef446..f4acba8 100644
--- a/src/wconfig.h.in
+++ b/src/wconfig.h.in
@@ -35,9 +35,6 @@
/* If you want animations for iconification, shading, icon arrangement etc. */
#define ANIMATIONS
-/* If you want the application icon to be highlighted when it has the focus */
-#define NEWAPPICON
-
/* support for XDND drop in the Dock. Experimental */
/*#define XDND*/
diff --git a/src/window.c b/src/window.c
index 551cc21..7f12c65 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1658,7 +1658,8 @@ void wUnmanageWindow(WWindow *wwin, Bool restore, Bool
destroyed)
WApplication *napp = scr->focused_window ?
wApplicationOf(scr->focused_window->main_window) : NULL;
if (oapp && oapp != napp) {
wAppMenuUnmap(oapp->menu);
- wApplicationDeactivate(oapp);
+ if (wPreferences.highlight_active_app)
+ wApplicationDeactivate(oapp);
}
wNETCleanupFrameExtents(wwin);
-----------------------------------------------------------------------
Summary of changes:
WPrefs.app/Expert.c | 27 +++++++++++++++++----------
WPrefs.app/Preferences.c | 5 +++--
src/WindowMaker.h | 6 +++---
src/actions.c | 8 +++++---
src/appicon.c | 2 ++
src/application.c | 5 -----
src/defaults.c | 2 ++
src/icon.c | 2 --
src/icon.h | 3 +--
src/wconfig.h.in | 3 ---
src/window.c | 3 ++-
11 files changed, 35 insertions(+), 31 deletions(-)
repo.or.cz automatic notification. Contact project admin [email protected]
if you want to unsubscribe, or site admin [email protected] if you receive
no reply.
--
wmaker-crm.git ("The Window Maker window manager")
--
To unsubscribe, send mail to [email protected].