summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2021-09-07 06:00:07 (GMT)
committerfvogel <fvogelnew1@free.fr>2021-09-07 06:00:07 (GMT)
commit4a57a3f5d91e10c3cfe7cb28bb038d2e9cd1d179 (patch)
tree4410aac3258c9b4b226daf255134e946dcc70ec7
parent0a06dd45c40b25a43147054901f36fcaacfee637 (diff)
downloadtk-4a57a3f5d91e10c3cfe7cb28bb038d2e9cd1d179.zip
tk-4a57a3f5d91e10c3cfe7cb28bb038d2e9cd1d179.tar.gz
tk-4a57a3f5d91e10c3cfe7cb28bb038d2e9cd1d179.tar.bz2
Cosmetic changes
-rw-r--r--macosx/tkMacOSXWm.c6
-rw-r--r--win/tkWinWm.c28
2 files changed, 17 insertions, 17 deletions
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index 782bc9d..4954729 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -2387,7 +2387,7 @@ WmIconbadgeCmd(
if ([label containsString:@"."]) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "can't use \"%s\" as icon badge", Tcl_GetString(objv[3])));
+ "can't use \"%s\" as icon badge", Tcl_GetString(objv[3])));
return TCL_ERROR;
}
@@ -2399,13 +2399,13 @@ WmIconbadgeCmd(
NSArray *array = @[@"", @"!"];
if ([array containsObject: label]) {
- [dockicon setBadgeLabel: label];
+ [dockicon setBadgeLabel:label];
} else if (number > 0) {
NSString *str = [@(number) stringValue];
[dockicon setBadgeLabel:str];
} else {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "can't use \"%s\" as icon badge", Tcl_GetString(objv[3])));
+ "can't use \"%s\" as icon badge", Tcl_GetString(objv[3])));
return TCL_ERROR;
}
return TCL_OK;
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index 72ba6e0..db775f7 100644
--- a/win/tkWinWm.c
+++ b/win/tkWinWm.c
@@ -3890,8 +3890,8 @@ WmIconbadgeCmd(
HICON overlayicon;
(void) winPtr;
int badgenumber;
- char * badgestring = NULL;
- char photoname[4096];
+ char *badgestring = NULL;
+ char photoname[4096];
LPCWSTR string;
HRESULT hr;
Tk_Window badgewindow;
@@ -3909,8 +3909,7 @@ WmIconbadgeCmd(
badgewindow = Tk_NameToWindow(interp, Tcl_GetString(objv[2]), tkwin);
wmPtr = ((TkWindow *) badgewindow)->wmInfoPtr;
hwnd = wmPtr->wrapper;
- badgestring = Tcl_GetString(objv[3]);
- string = L"Alert";
+ badgestring = Tcl_GetString(objv[3]);
badgenumber = atoi(badgestring);
if (badgenumber > 9) {
@@ -3924,24 +3923,24 @@ WmIconbadgeCmd(
/*
* If badgestring is empty string, remove icon.
*/
-
- if (strcmp("", badgestring)==0) {
+
+ if (strcmp("", badgestring) == 0) {
ptbl->lpVtbl->SetOverlayIcon(ptbl, hwnd, NULL, NULL);
return TCL_OK;
}
-
+
/*
* If photo does not exist, return error. This means we do not have
* to test for decimal or negative values; no photo for such values
* is present.
*/
-
- photo = Tk_FindPhoto(interp, photoname);
- if (photo == NULL) {
- Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "can't use \"%s\" as icon badge", badgestring));
- return TCL_ERROR;
- }
+
+ photo = Tk_FindPhoto(interp, photoname);
+ if (photo == NULL) {
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "can't use \"%s\" as icon badge", badgestring));
+ return TCL_ERROR;
+ }
/*
* We have found the image. Convert to icon.
@@ -3960,6 +3959,7 @@ WmIconbadgeCmd(
* Place overlay icon on taskbar icon.
*/
+ string = L"Alert";
hr = ptbl->lpVtbl->SetOverlayIcon(ptbl, hwnd, overlayicon, string);
if (hr != S_OK) {
Tcl_SetResult(interp, "Failed to display badge icon", TCL_VOLATILE);