summaryrefslogtreecommitdiffstats
path: root/generic/tkMenubutton.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkMenubutton.c')
-rw-r--r--generic/tkMenubutton.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/generic/tkMenubutton.c b/generic/tkMenubutton.c
index dc8ac61..e2c5038 100644
--- a/generic/tkMenubutton.c
+++ b/generic/tkMenubutton.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMenubutton.c,v 1.23 2008/10/17 23:18:37 nijtmans Exp $
+ * RCS: @(#) $Id: tkMenubutton.c,v 1.24 2008/11/08 22:52:29 dkf Exp $
*/
#include "tkInt.h"
@@ -308,7 +308,7 @@ Tk_MenubuttonObjCmd(
return TCL_ERROR;
}
- Tcl_SetObjResult(interp, Tcl_NewStringObj(Tk_PathName(mbPtr->tkwin), -1));
+ Tcl_SetObjResult(interp, TkNewWindowObj(mbPtr->tkwin));
return TCL_OK;
}
@@ -363,9 +363,8 @@ MenuButtonWidgetObjCmd(
mbPtr->optionTable, objv[2], mbPtr->tkwin);
if (objPtr == NULL) {
goto error;
- } else {
- Tcl_SetObjResult(interp, objPtr);
}
+ Tcl_SetObjResult(interp, objPtr);
break;
case COMMAND_CONFIGURE:
@@ -375,9 +374,8 @@ MenuButtonWidgetObjCmd(
mbPtr->tkwin);
if (objPtr == NULL) {
goto error;
- } else {
- Tcl_SetObjResult(interp, objPtr);
}
+ Tcl_SetObjResult(interp, objPtr);
} else {
result = ConfigureMenuButton(interp, mbPtr, objc-2, objv+2);
}