diff options
author | fvogel <fvogelnew1@free.fr> | 2021-09-03 20:07:29 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2021-09-03 20:07:29 (GMT) |
commit | 27cb8bf2eaa43adc600c106adafa6a50e4d9435d (patch) | |
tree | 158b9a746cc8b44dc835c891ecd159b6e10ace77 /macosx/tkMacOSXWm.c | |
parent | 9aa714b50964297b970fb346c030d089f98320f9 (diff) | |
download | tk-27cb8bf2eaa43adc600c106adafa6a50e4d9435d.zip tk-27cb8bf2eaa43adc600c106adafa6a50e4d9435d.tar.gz tk-27cb8bf2eaa43adc600c106adafa6a50e4d9435d.tar.bz2 |
Cosmetic: Indentation, and so on.
Diffstat (limited to 'macosx/tkMacOSXWm.c')
-rw-r--r-- | macosx/tkMacOSXWm.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index d41b8cc..2a46f12 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -195,6 +195,7 @@ static int tkMacOSXWmAttrNotifyVal = 0; /* * The following stores the name of the "wm iconphoto" image. */ + char *base_icon = NULL; /* @@ -1287,7 +1288,7 @@ Tk_WmObjCmd( return WmGridCmd(tkwin, winPtr, interp, objc, objv); case WMOPT_GROUP: return WmGroupCmd(tkwin, winPtr, interp, objc, objv); - case WMOPT_ICONBADGE: + case WMOPT_ICONBADGE: return WmIconbadgeCmd(tkwin, winPtr, interp, objc, objv); case WMOPT_ICONBITMAP: return WmIconbitmapCmd(tkwin, winPtr, interp, objc, objv); @@ -2372,17 +2373,20 @@ WmIconbadgeCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - + (void) winPtr; + NSString *label; + if (objc < 4) { Tcl_WrongNumArgs(interp, 2, objv,"window badge"); return TCL_ERROR; } - (void) winPtr; - NSString *label; label = [NSString stringWithUTF8String:Tcl_GetString(objv[3])]; - /* Set the icon badge on the Dock icon. */ + /* + * Set the icon badge on the Dock icon. + */ + NSDockTile *dockicon = [NSApp dockTile]; [dockicon setBadgeLabel: label]; return TCL_OK; @@ -2690,7 +2694,6 @@ WmIconphotoCmd( return TCL_OK; } - if ((objc == 3) && (base_icon !=NULL)) { Tcl_SetObjResult(interp, Tcl_NewStringObj(base_icon, -1)); return TCL_OK; |